[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D17271981@AcuExch.aculab.com>
Date: Mon, 14 Jul 2014 08:46:51 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Stephen Hemminger' <stephen@...workplumber.org>,
Thomas Graf <tgraf@...g.ch>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"therbert@...gle.com" <therbert@...gle.com>,
"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>,
"pshelar@...ira.com" <pshelar@...ira.com>,
"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
"dborkman@...hat.com" <dborkman@...hat.com>,
"Pritesh Kothari (pritkoth)" <pritkoth@...co.com>,
Madhu Challa <challa@...ronetworks.com>
Subject: RE: [PATCH 1/2 net-next] vxlan: Be liberal on receive and only
require the I bit to be set
From: Stephen Hemminger
> On Fri, 11 Jul 2014 18:59:49 +0200
> Thomas Graf <tgraf@...g.ch> wrote:
>
> > @@ -1617,7 +1646,9 @@ static int vxlan6_xmit_skb(struct vxlan_sock *vs,
> > }
> >
> > vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));
> > - vxh->vx_flags = htonl(VXLAN_FLAGS);
> > + vxlan_flags(vxh) = VXLAN_FLAG_VNI;
> > + vxh->vx_reserved1 = 0;
> > + vxh->vx_reserved2 = 0;
> > vxh->vx_vni = vni;
> >
>
> Okay, but initializing bitfields generates crappy code.
> Can we just alias and do one assignment.
If you write to all the bitfields gcc ought to manage to do a single write.
If it doesn't then all the bitfields should be ripped out :-)
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists