netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Tom Herbert <therbert@google.com>
Cc: David Miller <davem@davemloft.net>,
	Jesse Gross <jesse@nicira.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Pravin B Shelar <pshelar@nicira.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	Linux Netdev List <netdev@vger.kernel.org>,
	"dev@openvswitch.org" <dev@openvswitch.org>
Subject: Re: [PATCH 1/5] vxlan: Group Policy extension
Date: Thu, 15 Jan 2015 03:20:28 +0000	[thread overview]
Message-ID: <20150115032028.GA29974@casper.infradead.org> (raw)
In-Reply-To: <CA+mtBx9QV89vb+kwY4PUnemwqq-vWgpU4paDEs0FjYVDS2MsXQ@mail.gmail.com>

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);

  reply	other threads:[~2015-01-15  3:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15  2:53 [PATCH 0/5 net-next v6] VXLAN Group Policy Extension Thomas Graf
2015-01-15  2:53 ` [PATCH 1/5] vxlan: Group Policy extension Thomas Graf
2015-01-15  3:06   ` Tom Herbert
2015-01-15  3:20     ` Thomas Graf [this message]
2015-01-15  2:53 ` [PATCH 2/5] vxlan: Only bind to sockets with compatible flags enabled Thomas Graf
2015-01-15  2:53 ` [PATCH 3/5] openvswitch: Rename GENEVE_TUN_OPTS() to TUN_METADATA_OPTS() Thomas Graf
     [not found] ` <cover.1421290198.git.tgraf-G/eBtMaohhA@public.gmane.org>
2015-01-15  2:53   ` [PATCH 4/5] openvswitch: Allow for any level of nesting in flow attributes Thomas Graf
2015-01-15  2:53 ` [PATCH 5/5] openvswitch: Support VXLAN Group Policy extension Thomas Graf
2015-01-15  6:12 ` [PATCH 0/5 net-next v6] VXLAN Group Policy Extension David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-01-15  0:10 [PATCH 0/5 net-next v5] " Thomas Graf
2015-01-15  0:10 ` [PATCH 1/5] vxlan: Group Policy extension Thomas Graf
2015-01-15  0:18   ` Tom Herbert
2015-01-15  0:23     ` Thomas Graf
2015-01-15  1:08       ` Tom Herbert
2015-01-15  1:28         ` Thomas Graf
2015-01-15  2:55           ` Thomas Graf
2015-01-15  2:59             ` Tom Herbert
2015-01-13 16:20 [PATCH 0/5 net-next v4] VXLAN Group Policy Extension Thomas Graf
2015-01-13 16:20 ` [PATCH 1/5] vxlan: Group Policy extension Thomas Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150115032028.GA29974@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=jesse@nicira.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=pshelar@nicira.com \
    --cc=stephen@networkplumber.org \
    --cc=therbert@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).