On Tue, Dec 1, 2020 at 4:00 PM Dumitru Ceara <[email protected]> wrote:
>
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-dev/2020-November/377876.html
> Reported-by: Renat Nurgaliyev <[email protected]>
> Suggested-by: Han Zhou <[email protected]>
> Fixes: a2b88dc51365 ("pinctrl: Directly update MAC_Bindings created by self 
> originated GARPs.")
> Signed-off-by: Dumitru Ceara <[email protected]>

Thanks for the fix. I applied this patch to master.

I think this needs to be backported, but it doesn't apply cleanly to
the branch. Can you please submit the backport patches ?

Thanks
Numan

> ---
>  controller/pinctrl.c |  7 +++++++
>  northd/ovn-northd.c  |  7 +++++++
>  tests/ovn.at         | 19 +++++++++++++++++++
>  3 files changed, 33 insertions(+)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 291202c..c6540c1 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -3907,6 +3907,13 @@ send_garp_locally(struct ovsdb_idl_txn *ovnsb_idl_txn,
>              continue;
>          }
>
> +        /* Skip datapaths that don't automatically learn ARPs from requests. 
> */
> +        if (!smap_get_bool(&remote->datapath->external_ids,
> +                           "always_learn_from_arp_request",
> +                           true)) {
> +            continue;
> +        }
> +
>          struct ds ip_s = DS_EMPTY_INITIALIZER;
>
>          ip_format_masked(ip, OVS_BE32_MAX, &ip_s);
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 47a177c..4ca0271 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -1189,6 +1189,13 @@ ovn_datapath_update_external_ids(struct ovn_datapath 
> *od)
>          if (nat_default_ct >= 0) {
>              smap_add_format(&ids, "snat-ct-zone", "%d", nat_default_ct);
>          }
> +
> +        bool learn_from_arp_request =
> +            smap_get_bool(&od->nbr->options, "always_learn_from_arp_request",
> +                          true);
> +        if (!learn_from_arp_request) {
> +            smap_add(&ids, "always_learn_from_arp_request", "false");
> +        }
>      }
>
>      sbrec_datapath_binding_set_external_ids(od->sb, &ids);
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 5b7a64c..97e3e49 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -15962,6 +15962,25 @@ 
> fffffffffffff0000000010108060001080006040001f00000000101ac1804c8000000000000ac18
>  
> fffffffffffff0000000010108060001080006040001f00000000101ac1804dd000000000000ac1804dd
>  ])
>
> +# Now make sure that always_learn_from_arp_request=false is also honored
> +# for locally injected mac bindings.
> +check ovn-nbctl set logical_router lr0 
> options:always_learn_from_arp_request=false
> +check ovn-nbctl set logical_router lr1 
> options:always_learn_from_arp_request=false
> +check ovn-nbctl --wait=hv sync
> +
> +# Recreate two floating IPs, one for each VIF.
> +check ovn-nbctl lr-nat-del lr0 dnat_and_snat 172.24.4.100
> +check ovn-nbctl lr-nat-del lr1 dnat_and_snat 172.24.4.200
> +
> +check ovn-sbctl --all destroy mac_binding
> +
> +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.24.4.100 10.0.0.10
> +check ovn-nbctl lr-nat-add lr1 dnat_and_snat 172.24.4.200 20.0.0.10
> +check ovn-nbctl --wait=hv sync
> +
> +check_row_count MAC_Binding 0 logical_port=lr0-pub ip=172.24.4.200
> +check_row_count MAC_Binding 0 logical_port=lr1-pub ip=172.24.4.100
> +
>  OVN_CLEANUP([hv1])
>  AT_CLEANUP
>
> --
> 1.8.3.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to