Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-29 Thread Jan Scheurich
> > The optimization Yi refers to only affects the slow path translation. > > > > OVS 2.8 does not immediately trigger an immediate recirculation after > > translating > > encap(nsh,...). There is no need to do so as the flow key of the resulting > > packet > > can be determined from the encap()

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-29 Thread Yang, Yi
On Fri, Sep 29, 2017 at 07:10:52AM +, Jan Scheurich wrote: > > From: Yang, Yi [mailto:yi.y.y...@intel.com] > > Sent: Friday, 29 September, 2017 08:41 > > To: Pravin Shelar > > Cc: Jiri Benc ; net...@vger.kernel.org; > > d...@openvswitch.org; e...@erig.me;

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-29 Thread Jan Scheurich
> From: Yang, Yi [mailto:yi.y.y...@intel.com] > Sent: Friday, 29 September, 2017 08:41 > To: Pravin Shelar > Cc: Jiri Benc ; net...@vger.kernel.org; > d...@openvswitch.org; e...@erig.me; da...@davemloft.net; Jan Scheurich > >

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-29 Thread Yang, Yi
On Fri, Sep 29, 2017 at 02:28:38AM +0800, Pravin Shelar wrote: > On Tue, Sep 26, 2017 at 6:39 PM, Yang, Yi wrote: > > On Tue, Sep 26, 2017 at 06:49:14PM +0800, Jiri Benc wrote: > >> On Tue, 26 Sep 2017 12:55:39 +0800, Yang, Yi wrote: > >> > After push_nsh, the packet won't be

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-28 Thread Pravin Shelar
On Tue, Sep 26, 2017 at 6:39 PM, Yang, Yi wrote: > On Tue, Sep 26, 2017 at 06:49:14PM +0800, Jiri Benc wrote: >> On Tue, 26 Sep 2017 12:55:39 +0800, Yang, Yi wrote: >> > After push_nsh, the packet won't be recirculated to flow pipeline, so >> > key->eth.type must be set

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-26 Thread Yang, Yi
On Wed, Sep 27, 2017 at 04:59:36AM +0800, Eric Garver wrote: > On Tue, Sep 26, 2017 at 01:02:15PM +0800, Yang, Yi wrote: > > On Tue, Sep 26, 2017 at 03:28:42AM +0800, Eric Garver wrote: > > > On Mon, Sep 25, 2017 at 10:16:09PM +0800, Yi Yang wrote: > > > > + > > > > + length =

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-26 Thread Eric Garver
On Tue, Sep 26, 2017 at 01:02:15PM +0800, Yang, Yi wrote: > On Tue, Sep 26, 2017 at 03:28:42AM +0800, Eric Garver wrote: > > On Mon, Sep 25, 2017 at 10:16:09PM +0800, Yi Yang wrote: > > > + > > > + length = nsh_hdr_len(nsh_hdr); > > > + skb_pull(skb, length); > > > > Do you need to verify you can

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-26 Thread Jiri Benc
On Tue, 26 Sep 2017 12:55:39 +0800, Yang, Yi wrote: > After push_nsh, the packet won't be recirculated to flow pipeline, so > key->eth.type must be set explicitly here, but for pop_nsh, the packet > will be recirculated to flow pipeline, it will be reparsed, so > key->eth.type will be set in

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-25 Thread Yang, Yi
On Tue, Sep 26, 2017 at 03:28:42AM +0800, Eric Garver wrote: > On Mon, Sep 25, 2017 at 10:16:09PM +0800, Yi Yang wrote: > > + > > + length = nsh_hdr_len(nsh_hdr); > > + skb_pull(skb, length); > > Do you need to verify you can actually pull length bytes? I don't see > any guarantee. I have

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-25 Thread Yang, Yi
On Tue, Sep 26, 2017 at 02:14:39AM +0800, Jiri Benc wrote: > On Mon, 25 Sep 2017 22:16:09 +0800, Yi Yang wrote: > > + return err; > > + > > + key->eth.type = htons(ETH_P_NSH); > > I wonder why you have this assignment here. The key is invalidated, > thus nothing should rely on

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-25 Thread Jiri Benc
On Mon, 25 Sep 2017 22:16:09 +0800, Yi Yang wrote: > + skb->protocol = htons(ETH_P_NSH); > + skb_reset_mac_header(skb); > + skb_reset_mac_len(skb); > + skb_reset_network_header(skb); The last two lines are swapped. Network header needs to be reset before mac_len. > + > +

[ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-25 Thread Yi Yang
v8->v9 - Fix build error reported by daily intel build because nsh module isn't selected by openvswitch v7->v8 - Rework nested value and mask for OVS_KEY_ATTR_NSH - Change pop_nsh to adapt to nsh kernel module - Fix many issues per comments from Jiri Benc v6->v7 - Remove NSH GSO patches

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-18 Thread Yang, Yi
On Thu, Sep 14, 2017 at 05:09:02PM +0800, Jiri Benc wrote: > On Thu, 14 Sep 2017 16:37:59 +0800, Yi Yang wrote: > > OVS master and 2.8 branch has merged NSH userspace > > patch series, this patch is to enable NSH support > > in kernel data path in order that OVS can support > > NSH in compat mode

Re: [ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-14 Thread Jiri Benc
On Thu, 14 Sep 2017 16:37:59 +0800, Yi Yang wrote: > OVS master and 2.8 branch has merged NSH userspace > patch series, this patch is to enable NSH support > in kernel data path in order that OVS can support > NSH in compat mode by porting this. http://vger.kernel.org/~davem/net-next.html

[ovs-dev] [PATCH net-next v9] openvswitch: enable NSH support

2017-09-14 Thread Yi Yang
v8->v9 - Fix build error reported by daily intel build because nsh module isn't selected by openvswitch v7->v8 - Rework nested value and mask for OVS_KEY_ATTR_NSH - Change pop_nsh to adapt to nsh kernel module - Fix many issues per comments from Jiri Benc v6->v7 - Remove NSH GSO patches