diff mbox series

[ovs-dev] meta-flow: Make "nw_frag" a synonym for "ip_frag".

Message ID 20180920183442.23048-1-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev] meta-flow: Make "nw_frag" a synonym for "ip_frag". | expand

Commit Message

Ben Pfaff Sept. 20, 2018, 6:34 p.m. UTC
Since the time that support for IP fragments was introduce, the OVS
functions that format flows have used "nw_frag", but the ones that parse
flows have expected "ip_frag".  Obviously this is a bug and it's a surprise
that it's gone so long without anyone reporting the problem.  This fixes
it and adds a test.

Reported-by: Gurucharan Shetty <guru@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 include/openvswitch/meta-flow.h |  2 +-
 tests/ofproto-dpif.at           | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Gurucharan Shetty Sept. 20, 2018, 7:32 p.m. UTC | #1
On Thu, 20 Sep 2018 at 11:34, Ben Pfaff <blp@ovn.org> wrote:

> Since the time that support for IP fragments was introduce, the OVS
> functions that format flows have used "nw_frag", but the ones that parse
> flows have expected "ip_frag".  Obviously this is a bug and it's a surprise
> that it's gone so long without anyone reporting the problem.  This fixes
> it and adds a test.
>
> Reported-by: Gurucharan Shetty <guru@ovn.org>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
>

Thanks for the quick fix.
Acked-by: Gurucharan Shetty <guru@ovn.org>


> ---
>  include/openvswitch/meta-flow.h |  2 +-
>  tests/ofproto-dpif.at           | 10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/openvswitch/meta-flow.h
> b/include/openvswitch/meta-flow.h
> index 627c8a3912a3..152f512db3e8 100644
> --- a/include/openvswitch/meta-flow.h
> +++ b/include/openvswitch/meta-flow.h
> @@ -1454,7 +1454,7 @@ enum OVS_PACKED_ENUM mf_field_id {
>       */
>      MFF_IP_TTL,
>
> -    /* "ip_frag".
> +    /* "ip_frag" (aka "nw_frag").
>       *
>       * IP fragment information.
>       *
> diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> index 362c58db437b..6b1499f99d78 100644
> --- a/tests/ofproto-dpif.at
> +++ b/tests/ofproto-dpif.at
> @@ -4337,11 +4337,11 @@ AT_SETUP([ofproto-dpif - fragment handling -
> trace])
>  OVS_VSWITCHD_START
>  add_of_ports br0 1 2 3 4 5 6 90
>  AT_DATA([flows.txt], [dnl
> -priority=75 tcp ip_frag=no    tp_dst=80
> actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
> -priority=75 tcp ip_frag=first tp_dst=80
> actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
> -priority=50 tcp ip_frag=no
> actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
> -priority=50 tcp ip_frag=first
>  actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
> -priority=50 tcp ip_frag=later           actions=output:6
> +priority=75 tcp nw_frag=no    tp_dst=80
> actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
> +priority=75 tcp nw_frag=first tp_dst=80
> actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
> +priority=50 tcp nw_frag=no
> actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
> +priority=50 tcp nw_frag=first
>  actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
> +priority=50 tcp nw_frag=later           actions=output:6
>  ])
>  AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
>
> --
> 2.16.1
>
>
Ben Pfaff Sept. 20, 2018, 9:15 p.m. UTC | #2
On Thu, Sep 20, 2018 at 12:32:57PM -0700, Guru Shetty wrote:
> On Thu, 20 Sep 2018 at 11:34, Ben Pfaff <blp@ovn.org> wrote:
> 
> > Since the time that support for IP fragments was introduce, the OVS
> > functions that format flows have used "nw_frag", but the ones that parse
> > flows have expected "ip_frag".  Obviously this is a bug and it's a surprise
> > that it's gone so long without anyone reporting the problem.  This fixes
> > it and adds a test.
> >
> > Reported-by: Gurucharan Shetty <guru@ovn.org>
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> >
> 
> Thanks for the quick fix.
> Acked-by: Gurucharan Shetty <guru@ovn.org>

Thanks, applied to master and backported as far as branch-2.4.
diff mbox series

Patch

diff --git a/include/openvswitch/meta-flow.h b/include/openvswitch/meta-flow.h
index 627c8a3912a3..152f512db3e8 100644
--- a/include/openvswitch/meta-flow.h
+++ b/include/openvswitch/meta-flow.h
@@ -1454,7 +1454,7 @@  enum OVS_PACKED_ENUM mf_field_id {
      */
     MFF_IP_TTL,
 
-    /* "ip_frag".
+    /* "ip_frag" (aka "nw_frag").
      *
      * IP fragment information.
      *
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 362c58db437b..6b1499f99d78 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -4337,11 +4337,11 @@  AT_SETUP([ofproto-dpif - fragment handling - trace])
 OVS_VSWITCHD_START
 add_of_ports br0 1 2 3 4 5 6 90
 AT_DATA([flows.txt], [dnl
-priority=75 tcp ip_frag=no    tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
-priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
-priority=50 tcp ip_frag=no              actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
-priority=50 tcp ip_frag=first           actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
-priority=50 tcp ip_frag=later           actions=output:6
+priority=75 tcp nw_frag=no    tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
+priority=75 tcp nw_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
+priority=50 tcp nw_frag=no              actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
+priority=50 tcp nw_frag=first           actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
+priority=50 tcp nw_frag=later           actions=output:6
 ])
 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])