netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Garver <e@erig.me>
To: "Yang, Yi" <yi.y.yang@intel.com>
Cc: dev@openvswitch.org, netdev@vger.kernel.org, jbenc@redhat.com
Subject: Re: [ovs-dev] [PATCH v3] openvswitch: enable NSH support
Date: Thu, 17 Aug 2017 10:14:14 -0400	[thread overview]
Message-ID: <20170817141414.GA21173@dev-rhel7> (raw)
In-Reply-To: <20170816234940.GB123125@cran64.bj.intel.com>

On Thu, Aug 17, 2017 at 07:49:41AM +0800, Yang, Yi wrote:
> On Wed, Aug 16, 2017 at 11:15:28PM +0800, Eric Garver wrote:
> > On Wed, Aug 16, 2017 at 01:35:30PM +0800, Yi Yang wrote:
> > > +
> > > +#define NSH_DST_PORT    4790     /* UDP Port for NSH on VXLAN. */
> > > +#define ETH_P_NSH       0x894F   /* Ethertype for NSH. */
> > 
> > ETH_P_NSH probably belongs in include/uapi/linux/if_ether.h with all the
> > other ETH_P_* defines.
> > 
> 
> Ok, I'll move it to include/uapi/linux/if_ether.h, but in userspace, we
> still need to keep it in nsh.h.
> 
> > >  
> > > +struct ovs_key_nsh {
> > > +	__u8 flags;
> > > +	__u8 mdtype;
> > > +	__u8 np;
> > > +	__u8 pad;
> > > +	__be32 path_hdr;
> > > +	__be32 context[NSH_MD1_CONTEXT_SIZE];
> > > +};
> > > +
> > >  struct sw_flow_key {
> > >  	u8 tun_opts[IP_TUNNEL_OPTS_MAX];
> > >  	u8 tun_opts_len;
> > > @@ -144,6 +154,7 @@ struct sw_flow_key {
> > >  			};
> > >  		} ipv6;
> > >  	};
> > > +	struct ovs_key_nsh nsh;         /* network service header */
> > 
> > Are you intentionally not reserving space in the flow key for
> > OVS_NSH_KEY_ATTR_MD2? I know it's not supported yet, but much of the
> > code is stubbed out for it - just making sure this wasn't an oversight.
> > 
> 
> For MD type 2, we'll reuse tun_metedata keys in struct flow_tnl which
> will be reworked and it will be shared by NSH and GENEVE, so we won't
> have new keys in "struct ovs_key_nsh" for MD type 2.

Be careful here. VXLAN also uses tun_metadata for GBP. VXLAN-GPE (+ NSH)
and VXLAN-GBP are mutually exclusive AFAICS, but you should verify it
all behaves as expected.

[..]

      reply	other threads:[~2017-08-17 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16  5:35 [PATCH v3] openvswitch: enable NSH support Yi Yang
2017-08-16  9:19 ` Jiri Benc
2017-08-16  9:31   ` Yang, Yi
2017-08-16 14:03     ` Jiri Benc
2017-08-16 23:37       ` Yang, Yi
     [not found] ` <1502861730-76203-1-git-send-email-yi.y.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-08-16 15:15   ` Eric Garver
2017-08-16 23:49     ` Yang, Yi
2017-08-17 14:14       ` Eric Garver [this message]

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=20170817141414.GA21173@dev-rhel7 \
    --to=e@erig.me \
    --cc=dev@openvswitch.org \
    --cc=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=yi.y.yang@intel.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).