[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161017.105706.175400937082419121.davem@davemloft.net>
Date: Mon, 17 Oct 2016 10:57:06 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: david.lebrun@...ouvain.be
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/9] ipv6: implement dataplane support for rthdr type 4
(Segment Routing Header)
From: David Lebrun <david.lebrun@...ouvain.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.
Powered by blists - more mailing lists