From: David Lebrun <david.leb...@uclouvain.be>
Date: Mon, 17 Oct 2016 16:42:22 +0200

> +/*
> + * SRH
> + */
> +struct ipv6_sr_hdr {
> +     __u8    nexthdr;
> +     __u8    hdrlen;
> +     __u8    type;
> +     __u8    segments_left;
> +     __u8    first_segment;
> +     __be16  flags;
> +     __u8    reserved;
> +
> +     struct in6_addr segments[0];
> +} __attribute__((packed));

Please don't use packed, it results in extremely inefficient code on
several architectures.

You can simply declare the flags as two 8-bit pieces and all will work
out fine.

Reply via email to