diff mbox series

[ovs-dev,ovn] ovn-northd: Remove useless flow for GW_REDIRECT.

Message ID 1588789720-70388-1-git-send-email-hzhou@ovn.org
State Accepted
Headers show
Series [ovs-dev,ovn] ovn-northd: Remove useless flow for GW_REDIRECT. | expand

Commit Message

Han Zhou May 6, 2020, 6:28 p.m. UTC
Remove the flow in lr_in_gw_redirect stage:

        A priority-150 logical flow with match
        <code>outport == <var>GW</var> &amp;&amp;
        eth.dst == 00:00:00:00:00:00</code> has actions
        <code>outport = <var>CR</var>; next;</code>, where
        <var>GW</var> is the logical router distributed gateway
        port and <var>CR</var> is the <code>chassisredirect</code>
        port representing the instance of the logical router
        distributed gateway port on the
        <code>redirect-chassis</code>.

The commit c0bf32d ("Manage ARP process locally in a DVR scenario") updated
the priority-100 flow in this stage to priority 200, which makes this
priority-150 flow useless, because whatever packets matching this flow
would also match the priority-50 flow.

Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 northd/ovn-northd.8.xml | 12 ------------
 northd/ovn-northd.c     | 11 -----------
 2 files changed, 23 deletions(-)

Comments

Numan Siddique May 7, 2020, 6:36 a.m. UTC | #1
On Wed, May 6, 2020 at 11:59 PM Han Zhou <hzhou@ovn.org> wrote:

> Remove the flow in lr_in_gw_redirect stage:
>
>         A priority-150 logical flow with match
>         <code>outport == <var>GW</var> &amp;&amp;
>         eth.dst == 00:00:00:00:00:00</code> has actions
>         <code>outport = <var>CR</var>; next;</code>, where
>         <var>GW</var> is the logical router distributed gateway
>         port and <var>CR</var> is the <code>chassisredirect</code>
>         port representing the instance of the logical router
>         distributed gateway port on the
>         <code>redirect-chassis</code>.
>
> The commit c0bf32d ("Manage ARP process locally in a DVR scenario") updated
> the priority-100 flow in this stage to priority 200, which makes this
> priority-150 flow useless, because whatever packets matching this flow
> would also match the priority-50 flow.
>
> Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> Signed-off-by: Han Zhou <hzhou@ovn.org>
>

Acked-by: Numan Siddique <numans@ovn.org>

Thanks
Numan


> ---
>  northd/ovn-northd.8.xml | 12 ------------
>  northd/ovn-northd.c     | 11 -----------
>  2 files changed, 23 deletions(-)
>
> diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
> index 1f81742..8f224b0 100644
> --- a/northd/ovn-northd.8.xml
> +++ b/northd/ovn-northd.8.xml
> @@ -2909,18 +2909,6 @@ icmp4 {
>
>      <ul>
>        <li>
> -        A priority-150 logical flow with match
> -        <code>outport == <var>GW</var> &amp;&amp;
> -        eth.dst == 00:00:00:00:00:00</code> has actions
> -        <code>outport = <var>CR</var>; next;</code>, where
> -        <var>GW</var> is the logical router distributed gateway
> -        port and <var>CR</var> is the <code>chassisredirect</code>
> -        port representing the instance of the logical router
> -        distributed gateway port on the
> -        <code>redirect-chassis</code>.
> -      </li>
> -
> -      <li>
>          For each NAT rule in the OVN Northbound database that can
>          be handled in a distributed manner, a priority-200 logical
>          flow with match <code>ip4.src == <var>B</var> &amp;&amp;
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 3f03e41..b0344d7 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -10156,17 +10156,6 @@ build_lrouter_flows(struct hmap *datapaths,
> struct hmap *ports,
>              ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT,
> 50,
>                                      ds_cstr(&match), ds_cstr(&actions),
>                                      stage_hint);
> -
> -            /* If the Ethernet destination has not been resolved,
> -             * redirect to the central instance of the l3dgw_port.
> -             * Such traffic will be replaced by an ARP request or ND
> -             * Neighbor Solicitation in the ARP request ingress
> -             * table, before being redirected to the central instance.
> -             */
> -            ds_put_format(&match, " && eth.dst == 00:00:00:00:00:00");
> -            ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT,
> 150,
> -                                    ds_cstr(&match), ds_cstr(&actions),
> -                                    stage_hint);
>          }
>
>          /* Packets are allowed by default. */
> --
> 2.1.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Lorenzo Bianconi May 7, 2020, 9:50 a.m. UTC | #2
> Remove the flow in lr_in_gw_redirect stage:
> 
>         A priority-150 logical flow with match
>         <code>outport == <var>GW</var> &amp;&amp;
>         eth.dst == 00:00:00:00:00:00</code> has actions
>         <code>outport = <var>CR</var>; next;</code>, where
>         <var>GW</var> is the logical router distributed gateway
>         port and <var>CR</var> is the <code>chassisredirect</code>
>         port representing the instance of the logical router
>         distributed gateway port on the
>         <code>redirect-chassis</code>.
> 
> The commit c0bf32d ("Manage ARP process locally in a DVR scenario") updated
> the priority-100 flow in this stage to priority 200, which makes this
> priority-150 flow useless, because whatever packets matching this flow
> would also match the priority-50 flow.
> 
> Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> Signed-off-by: Han Zhou <hzhou@ovn.org>

Thanks Han

Tested-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

> ---
>  northd/ovn-northd.8.xml | 12 ------------
>  northd/ovn-northd.c     | 11 -----------
>  2 files changed, 23 deletions(-)
> 
> diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
> index 1f81742..8f224b0 100644
> --- a/northd/ovn-northd.8.xml
> +++ b/northd/ovn-northd.8.xml
> @@ -2909,18 +2909,6 @@ icmp4 {
>  
>      <ul>
>        <li>
> -        A priority-150 logical flow with match
> -        <code>outport == <var>GW</var> &amp;&amp;
> -        eth.dst == 00:00:00:00:00:00</code> has actions
> -        <code>outport = <var>CR</var>; next;</code>, where
> -        <var>GW</var> is the logical router distributed gateway
> -        port and <var>CR</var> is the <code>chassisredirect</code>
> -        port representing the instance of the logical router
> -        distributed gateway port on the
> -        <code>redirect-chassis</code>.
> -      </li>
> -
> -      <li>
>          For each NAT rule in the OVN Northbound database that can
>          be handled in a distributed manner, a priority-200 logical
>          flow with match <code>ip4.src == <var>B</var> &amp;&amp;
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 3f03e41..b0344d7 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -10156,17 +10156,6 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
>              ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT, 50,
>                                      ds_cstr(&match), ds_cstr(&actions),
>                                      stage_hint);
> -
> -            /* If the Ethernet destination has not been resolved,
> -             * redirect to the central instance of the l3dgw_port.
> -             * Such traffic will be replaced by an ARP request or ND
> -             * Neighbor Solicitation in the ARP request ingress
> -             * table, before being redirected to the central instance.
> -             */
> -            ds_put_format(&match, " && eth.dst == 00:00:00:00:00:00");
> -            ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT, 150,
> -                                    ds_cstr(&match), ds_cstr(&actions),
> -                                    stage_hint);
>          }
>  
>          /* Packets are allowed by default. */
> -- 
> 2.1.0
>
Han Zhou May 7, 2020, 5:14 p.m. UTC | #3
On Thu, May 7, 2020 at 2:50 AM Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
wrote:
>
> > Remove the flow in lr_in_gw_redirect stage:
> >
> >         A priority-150 logical flow with match
> >         <code>outport == <var>GW</var> &amp;&amp;
> >         eth.dst == 00:00:00:00:00:00</code> has actions
> >         <code>outport = <var>CR</var>; next;</code>, where
> >         <var>GW</var> is the logical router distributed gateway
> >         port and <var>CR</var> is the <code>chassisredirect</code>
> >         port representing the instance of the logical router
> >         distributed gateway port on the
> >         <code>redirect-chassis</code>.
> >
> > The commit c0bf32d ("Manage ARP process locally in a DVR scenario")
updated
> > the priority-100 flow in this stage to priority 200, which makes this
> > priority-150 flow useless, because whatever packets matching this flow
> > would also match the priority-50 flow.
> >
> > Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> > Signed-off-by: Han Zhou <hzhou@ovn.org>
>
> Thanks Han
>
> Tested-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Thanks Numan and Lorenzo. I applied this to master.

>
> > ---
> >  northd/ovn-northd.8.xml | 12 ------------
> >  northd/ovn-northd.c     | 11 -----------
> >  2 files changed, 23 deletions(-)
> >
> > diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
> > index 1f81742..8f224b0 100644
> > --- a/northd/ovn-northd.8.xml
> > +++ b/northd/ovn-northd.8.xml
> > @@ -2909,18 +2909,6 @@ icmp4 {
> >
> >      <ul>
> >        <li>
> > -        A priority-150 logical flow with match
> > -        <code>outport == <var>GW</var> &amp;&amp;
> > -        eth.dst == 00:00:00:00:00:00</code> has actions
> > -        <code>outport = <var>CR</var>; next;</code>, where
> > -        <var>GW</var> is the logical router distributed gateway
> > -        port and <var>CR</var> is the <code>chassisredirect</code>
> > -        port representing the instance of the logical router
> > -        distributed gateway port on the
> > -        <code>redirect-chassis</code>.
> > -      </li>
> > -
> > -      <li>
> >          For each NAT rule in the OVN Northbound database that can
> >          be handled in a distributed manner, a priority-200 logical
> >          flow with match <code>ip4.src == <var>B</var> &amp;&amp;
> > diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> > index 3f03e41..b0344d7 100644
> > --- a/northd/ovn-northd.c
> > +++ b/northd/ovn-northd.c
> > @@ -10156,17 +10156,6 @@ build_lrouter_flows(struct hmap *datapaths,
struct hmap *ports,
> >              ovn_lflow_add_with_hint(lflows, od,
S_ROUTER_IN_GW_REDIRECT, 50,
> >                                      ds_cstr(&match), ds_cstr(&actions),
> >                                      stage_hint);
> > -
> > -            /* If the Ethernet destination has not been resolved,
> > -             * redirect to the central instance of the l3dgw_port.
> > -             * Such traffic will be replaced by an ARP request or ND
> > -             * Neighbor Solicitation in the ARP request ingress
> > -             * table, before being redirected to the central instance.
> > -             */
> > -            ds_put_format(&match, " && eth.dst == 00:00:00:00:00:00");
> > -            ovn_lflow_add_with_hint(lflows, od,
S_ROUTER_IN_GW_REDIRECT, 150,
> > -                                    ds_cstr(&match), ds_cstr(&actions),
> > -                                    stage_hint);
> >          }
> >
> >          /* Packets are allowed by default. */
> > --
> > 2.1.0
> >
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
index 1f81742..8f224b0 100644
--- a/northd/ovn-northd.8.xml
+++ b/northd/ovn-northd.8.xml
@@ -2909,18 +2909,6 @@  icmp4 {
 
     <ul>
       <li>
-        A priority-150 logical flow with match
-        <code>outport == <var>GW</var> &amp;&amp;
-        eth.dst == 00:00:00:00:00:00</code> has actions
-        <code>outport = <var>CR</var>; next;</code>, where
-        <var>GW</var> is the logical router distributed gateway
-        port and <var>CR</var> is the <code>chassisredirect</code>
-        port representing the instance of the logical router
-        distributed gateway port on the
-        <code>redirect-chassis</code>.
-      </li>
-
-      <li>
         For each NAT rule in the OVN Northbound database that can
         be handled in a distributed manner, a priority-200 logical
         flow with match <code>ip4.src == <var>B</var> &amp;&amp;
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 3f03e41..b0344d7 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -10156,17 +10156,6 @@  build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
             ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT, 50,
                                     ds_cstr(&match), ds_cstr(&actions),
                                     stage_hint);
-
-            /* If the Ethernet destination has not been resolved,
-             * redirect to the central instance of the l3dgw_port.
-             * Such traffic will be replaced by an ARP request or ND
-             * Neighbor Solicitation in the ARP request ingress
-             * table, before being redirected to the central instance.
-             */
-            ds_put_format(&match, " && eth.dst == 00:00:00:00:00:00");
-            ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT, 150,
-                                    ds_cstr(&match), ds_cstr(&actions),
-                                    stage_hint);
         }
 
         /* Packets are allowed by default. */