mbox series

[ovs-dev,v6,0/4] nsh: add new nsh key ttl and action dec_nsh_ttl

Message ID 1512741865-97333-1-git-send-email-yi.y.yang@intel.com
Headers show
Series nsh: add new nsh key ttl and action dec_nsh_ttl | expand

Message

Yang, Yi Dec. 8, 2017, 2:04 p.m. UTC
v5->v6
  - Rebase v5 to master
  - Refactor netlink message format to align to NSH kernel
    implementation
  - Add dec_nsh_ttl unit test into tests/nsh.at
  - Fix unit test unstable issue

v4->v5
  - Remove fix patch 1 in v4 because it is merged
  - Fix several comments by Jan Scheurich

v3->v4
  - Add new action dec_nsh_ttl
  - Remove encap_nsh and decap_nsh changes
  - Remove netlink rework to adapt to OVS 2.8
  - Dynamically allocate struct ovs_action_encap_nsh and put
    appropriate size for ENCAP_NSH netlink message.

v2->v3
  - Fix several comments Jan Scheurich

v1->v2
  - Rework per kernel datapath review comments
  - Add new NSH key ttl
  - Add many helpers in nsh.h and replace much code
    with these helpers
  - nsh.h includes the lasted NSH spec
  - bits of flags and mdtype have a change

This patch refactored NSH netlink keys, push_nsh action
 and netlink message format to align to NSH kernel
implementation. It also adds new NSH key 'ttl' and a new
action dec_nsh_ttl to follow the lasted IETF NSH draft:

https://datatracker.ietf.org/doc/draft-ietf-sfc-nsh/


Yi Yang (4):
  nsh: rework NSH netlink keys and actions
  nsh: add new flow key 'ttl'
  nsh: fix nested mask for OVS_KEY_ATTR_NSH
  nsh: add dec_nsh_ttl action

 datapath/linux/compat/include/linux/openvswitch.h |  58 +-
 include/openvswitch/flow.h                        |   6 +-
 include/openvswitch/meta-flow.h                   |  31 +-
 include/openvswitch/nsh.h                         | 122 +++-
 include/openvswitch/ofp-actions.h                 |   1 +
 include/openvswitch/packets.h                     |   9 +-
 lib/dpif-netdev.c                                 |   4 +-
 lib/dpif.c                                        |   4 +-
 lib/flow.c                                        |  61 +-
 lib/flow.h                                        |   2 +-
 lib/match.c                                       |  24 +-
 lib/meta-flow.c                                   |  69 +-
 lib/meta-flow.xml                                 |   6 +-
 lib/nx-match.c                                    |  20 +-
 lib/odp-execute.c                                 |  82 ++-
 lib/odp-util.c                                    | 830 +++++++++++++++++-----
 lib/odp-util.h                                    |   5 +
 lib/ofp-actions.c                                 |  49 ++
 lib/packets.c                                     |  27 +-
 lib/packets.h                                     |   5 +-
 ofproto/ofproto-dpif-ipfix.c                      |   4 +-
 ofproto/ofproto-dpif-sflow.c                      |   4 +-
 ofproto/ofproto-dpif-xlate.c                      |  62 +-
 tests/nsh.at                                      |  63 +-
 utilities/ovs-ofctl.8.in                          |  13 +-
 25 files changed, 1160 insertions(+), 401 deletions(-)

Comments

Gregory Rose Dec. 8, 2017, 4:42 p.m. UTC | #1
On 12/8/2017 6:04 AM, Yi Yang wrote:
> v5->v6
>    - Rebase v5 to master
>    - Refactor netlink message format to align to NSH kernel
>      implementation
>    - Add dec_nsh_ttl unit test into tests/nsh.at
>    - Fix unit test unstable issue
>
> v4->v5
>    - Remove fix patch 1 in v4 because it is merged
>    - Fix several comments by Jan Scheurich
>
> v3->v4
>    - Add new action dec_nsh_ttl
>    - Remove encap_nsh and decap_nsh changes
>    - Remove netlink rework to adapt to OVS 2.8
>    - Dynamically allocate struct ovs_action_encap_nsh and put
>      appropriate size for ENCAP_NSH netlink message.
>
> v2->v3
>    - Fix several comments Jan Scheurich
>
> v1->v2
>    - Rework per kernel datapath review comments
>    - Add new NSH key ttl
>    - Add many helpers in nsh.h and replace much code
>      with these helpers
>    - nsh.h includes the lasted NSH spec
>    - bits of flags and mdtype have a change
>
> This patch refactored NSH netlink keys, push_nsh action
>   and netlink message format to align to NSH kernel
> implementation. It also adds new NSH key 'ttl' and a new
> action dec_nsh_ttl to follow the lasted IETF NSH draft:
>
> https://datatracker.ietf.org/doc/draft-ietf-sfc-nsh/
>
>
> Yi Yang (4):
>    nsh: rework NSH netlink keys and actions
>    nsh: add new flow key 'ttl'
>    nsh: fix nested mask for OVS_KEY_ATTR_NSH
>    nsh: add dec_nsh_ttl action
>
>   datapath/linux/compat/include/linux/openvswitch.h |  58 +-
>   include/openvswitch/flow.h                        |   6 +-
>   include/openvswitch/meta-flow.h                   |  31 +-
>   include/openvswitch/nsh.h                         | 122 +++-
>   include/openvswitch/ofp-actions.h                 |   1 +
>   include/openvswitch/packets.h                     |   9 +-
>   lib/dpif-netdev.c                                 |   4 +-
>   lib/dpif.c                                        |   4 +-
>   lib/flow.c                                        |  61 +-
>   lib/flow.h                                        |   2 +-
>   lib/match.c                                       |  24 +-
>   lib/meta-flow.c                                   |  69 +-
>   lib/meta-flow.xml                                 |   6 +-
>   lib/nx-match.c                                    |  20 +-
>   lib/odp-execute.c                                 |  82 ++-
>   lib/odp-util.c                                    | 830 +++++++++++++++++-----
>   lib/odp-util.h                                    |   5 +
>   lib/ofp-actions.c                                 |  49 ++
>   lib/packets.c                                     |  27 +-
>   lib/packets.h                                     |   5 +-
>   ofproto/ofproto-dpif-ipfix.c                      |   4 +-
>   ofproto/ofproto-dpif-sflow.c                      |   4 +-
>   ofproto/ofproto-dpif-xlate.c                      |  62 +-
>   tests/nsh.at                                      |  63 +-
>   utilities/ovs-ofctl.8.in                          |  13 +-
>   25 files changed, 1160 insertions(+), 401 deletions(-)
>

I don't see any backport of the upstream kernel datapath changes? I'm 
working on catching our out of tree datapath code with the upstream 
Linux kernel datapath and your patch (commit 
b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 " openvswitch: enable NSH 
support") needs the backport as well as compat layer changes.

Do you plan on doing that work?

Thanks,

- Greg
Yang, Yi Dec. 11, 2017, 12:39 a.m. UTC | #2
On Sat, Dec 09, 2017 at 12:42:32AM +0800, Gregory Rose wrote:
> On 12/8/2017 6:04 AM, Yi Yang wrote:
> > v5->v6
> >    - Rebase v5 to master
> >    - Refactor netlink message format to align to NSH kernel
> >      implementation
> >    - Add dec_nsh_ttl unit test into tests/nsh.at
> >    - Fix unit test unstable issue
> >
> 
> I don't see any backport of the upstream kernel datapath changes? I'm 
> working on catching our out of tree datapath code with the upstream 
> Linux kernel datapath and your patch (commit 
> b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 " openvswitch: enable NSH 
> support") needs the backport as well as compat layer changes.
> 
> Do you plan on doing that work?
> 
> Thanks,
> 
> - Greg

Greg, yes, I'll backport kernel datapath patches once this patch series
is merged. BTW this doesn't depend on the kernel datapath patches.
Gregory Rose Dec. 11, 2017, 6:25 p.m. UTC | #3
On 12/10/2017 4:39 PM, Yang, Yi wrote:
> On Sat, Dec 09, 2017 at 12:42:32AM +0800, Gregory Rose wrote:
>> On 12/8/2017 6:04 AM, Yi Yang wrote:
>>> v5->v6
>>>     - Rebase v5 to master
>>>     - Refactor netlink message format to align to NSH kernel
>>>       implementation
>>>     - Add dec_nsh_ttl unit test into tests/nsh.at
>>>     - Fix unit test unstable issue
>>>
>> I don't see any backport of the upstream kernel datapath changes? I'm
>> working on catching our out of tree datapath code with the upstream
>> Linux kernel datapath and your patch (commit
>> b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 " openvswitch: enable NSH
>> support") needs the backport as well as compat layer changes.
>>
>> Do you plan on doing that work?
>>
>> Thanks,
>>
>> - Greg
> Greg, yes, I'll backport kernel datapath patches once this patch series
> is merged. BTW this doesn't depend on the kernel datapath patches.

Understood that this series of patches  you sent does not require the 
kernel datapath backport
but I found that the kernel datapath patches do modify the openvswitch 
uapi header and adds
new switch cases.  These need to be handled eventually which can be done 
when you do the
backport.

Thanks for coordinating!

- Greg
Ben Pfaff Dec. 11, 2017, 6:55 p.m. UTC | #4
On Mon, Dec 11, 2017 at 10:25:54AM -0800, Gregory Rose wrote:
> On 12/10/2017 4:39 PM, Yang, Yi wrote:
> >On Sat, Dec 09, 2017 at 12:42:32AM +0800, Gregory Rose wrote:
> >>On 12/8/2017 6:04 AM, Yi Yang wrote:
> >>>v5->v6
> >>>    - Rebase v5 to master
> >>>    - Refactor netlink message format to align to NSH kernel
> >>>      implementation
> >>>    - Add dec_nsh_ttl unit test into tests/nsh.at
> >>>    - Fix unit test unstable issue
> >>>
> >>I don't see any backport of the upstream kernel datapath changes? I'm
> >>working on catching our out of tree datapath code with the upstream
> >>Linux kernel datapath and your patch (commit
> >>b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 " openvswitch: enable NSH
> >>support") needs the backport as well as compat layer changes.
> >>
> >>Do you plan on doing that work?
> >>
> >>Thanks,
> >>
> >>- Greg
> >Greg, yes, I'll backport kernel datapath patches once this patch series
> >is merged. BTW this doesn't depend on the kernel datapath patches.
> 
> Understood that this series of patches  you sent does not require the kernel
> datapath backport
> but I found that the kernel datapath patches do modify the openvswitch uapi
> header and adds
> new switch cases.  These need to be handled eventually which can be done
> when you do the
> backport.

Greg and Yi, can you help me understand the compatibility and patch
workflow implications of accepting this series now instead of after the
kernel datapath backport?  In your opinions, is it important to apply
them in a particular order?

Thanks,

Ben.
Gregory Rose Dec. 11, 2017, 7:15 p.m. UTC | #5
On 12/11/2017 10:55 AM, Ben Pfaff wrote:
> On Mon, Dec 11, 2017 at 10:25:54AM -0800, Gregory Rose wrote:
>> On 12/10/2017 4:39 PM, Yang, Yi wrote:
>>> On Sat, Dec 09, 2017 at 12:42:32AM +0800, Gregory Rose wrote:
>>>> On 12/8/2017 6:04 AM, Yi Yang wrote:
>>>>> v5->v6
>>>>>     - Rebase v5 to master
>>>>>     - Refactor netlink message format to align to NSH kernel
>>>>>       implementation
>>>>>     - Add dec_nsh_ttl unit test into tests/nsh.at
>>>>>     - Fix unit test unstable issue
>>>>>
>>>> I don't see any backport of the upstream kernel datapath changes? I'm
>>>> working on catching our out of tree datapath code with the upstream
>>>> Linux kernel datapath and your patch (commit
>>>> b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 " openvswitch: enable NSH
>>>> support") needs the backport as well as compat layer changes.
>>>>
>>>> Do you plan on doing that work?
>>>>
>>>> Thanks,
>>>>
>>>> - Greg
>>> Greg, yes, I'll backport kernel datapath patches once this patch series
>>> is merged. BTW this doesn't depend on the kernel datapath patches.
>> Understood that this series of patches  you sent does not require the kernel
>> datapath backport
>> but I found that the kernel datapath patches do modify the openvswitch uapi
>> header and adds
>> new switch cases.  These need to be handled eventually which can be done
>> when you do the
>> backport.
> Greg and Yi, can you help me understand the compatibility and patch
> workflow implications of accepting this series now instead of after the
> kernel datapath backport?  In your opinions, is it important to apply
> them in a particular order?

Ben,

I started backporting the upstream NSH patch from Yi and found that I 
had to make some
related user space changes to make it compile correctly.  So it would 
appear that the upstream
kernel patch would require this set of patches first.

That said, let's get Yi's response since he is far more familiar with 
the NSH work than I am.

Thanks,

- Greg
Yang, Yi Dec. 12, 2017, 1:16 a.m. UTC | #6
On Tue, Dec 12, 2017 at 03:15:49AM +0800, Gregory Rose wrote:
> On 12/11/2017 10:55 AM, Ben Pfaff wrote:
> > On Mon, Dec 11, 2017 at 10:25:54AM -0800, Gregory Rose wrote:
> >> On 12/10/2017 4:39 PM, Yang, Yi wrote:
> >>> On Sat, Dec 09, 2017 at 12:42:32AM +0800, Gregory Rose wrote:
> >>>> On 12/8/2017 6:04 AM, Yi Yang wrote:
> >>>>> v5->v6
> >>>>>     - Rebase v5 to master
> >>>>>     - Refactor netlink message format to align to NSH kernel
> >>>>>       implementation
> >>>>>     - Add dec_nsh_ttl unit test into tests/nsh.at
> >>>>>     - Fix unit test unstable issue
> >>>>>
> >>>> I don't see any backport of the upstream kernel datapath changes? I'm
> >>>> working on catching our out of tree datapath code with the upstream
> >>>> Linux kernel datapath and your patch (commit
> >>>> b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 " openvswitch: enable NSH
> >>>> support") needs the backport as well as compat layer changes.
> >>>>
> >>>> Do you plan on doing that work?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> - Greg
> >>> Greg, yes, I'll backport kernel datapath patches once this patch series
> >>> is merged. BTW this doesn't depend on the kernel datapath patches.
> >> Understood that this series of patches  you sent does not require the kernel
> >> datapath backport
> >> but I found that the kernel datapath patches do modify the openvswitch uapi
> >> header and adds
> >> new switch cases.  These need to be handled eventually which can be done
> >> when you do the
> >> backport.
> > Greg and Yi, can you help me understand the compatibility and patch
> > workflow implications of accepting this series now instead of after the
> > kernel datapath backport?  In your opinions, is it important to apply
> > them in a particular order?
> 
> Ben,
> 
> I started backporting the upstream NSH patch from Yi and found that I 
> had to make some
> related user space changes to make it compile correctly.  So it would 
> appear that the upstream
> kernel patch would require this set of patches first.
> 
> That said, let's get Yi's response since he is far more familiar with 
> the NSH work than I am.
> 
> Thanks,
> 
> - Greg
>

We need to apply this patch series first, we do need to change some
header files when we backport NSH kernel patch, this is inevitable
, we only can support NSH userspace in current OVS. After applying
this patch series, NSH kernel backport patches will make sure both
userspace and kernel data path can work.