[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150115032028.GA29974@casper.infradead.org>
Date:	Thu, 15 Jan 2015 03:20:28 +0000
From:	Thomas Graf <tgraf@...g.ch>
To:	Tom Herbert <therbert@...gle.com>
Cc:	David Miller <davem@...emloft.net>, Jesse Gross <jesse@...ira.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Pravin B Shelar <pshelar@...ira.com>,
	Alexei Starovoitov <alexei.starovoitov@...il.com>,
	Nicolas Dichtel <nicolas.dichtel@...nd.com>,
	Linux Netdev List <netdev@...r.kernel.org>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [PATCH 1/5] vxlan: Group Policy extension
On 01/14/15 at 07:06pm, Tom Herbert wrote:
> > +struct vxlan_metadata {
> > +       __be32          vni;
> > +       u32             gbp;
> 
> Should this be __be32 also and use ntohl/htonl when setting to/from skb->mark?
The bitmask is stored in host byte order in vxlan_metadata to be
compatible with skb->mark and converted to network byte order on
the wire, see:
        gbp = (struct vxlanhdr_gbp *)vxh;
        md.gbp = ntohs(gbp->policy_id);
and:
	gbp->policy_id = htons(md->gbp & VXLAN_GBP_ID_MASK);
--
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