diff mbox

[ovs-dev] ovn-vtep: fix arping from vtep-gw physical port

Message ID CAKgLnsH09Zuh8vWB5g4SLrBOqPr1rPu7vJFZmaXUUixU3vtS_Q@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Darrell Ball Sept. 20, 2016, 3:21 a.m. UTC
On Mon, Sep 19, 2016 at 2:32 PM, Ramu Ramamurthy <ramu.ramamurthy@gmail.com>
wrote:

> Currently, arping from a vetp-gw physical-switch port to
> a VIF IP address does not work.
>
> When a physical-switch-port arps for an IP address
> of a VIF, that arp packet comes into the VIF hypervisor via a
> vxlan tunnel. That arp packet must not be responded-to by the
> arp responder table. Its treatment must be similar to the
> arps coming in from the localnet port - which is to
> skip the arp responder table.
>
> Signed-off-by: Ramu Ramamurthy <ramu.ramamurthy@us.ibm.com>
> ---
>  ovn/northd/ovn-northd.8.xml | 3 ++-
>  ovn/northd/ovn-northd.c     | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
> index 307e8be..d6dc860 100644
> --- a/ovn/northd/ovn-northd.8.xml
> +++ b/ovn/northd/ovn-northd.8.xml
> @@ -422,7 +422,8 @@
>      <ul>
>        <li>
>          Priority-100 flows to skip ARP responder if inport is of type
> -        <code>localnet</code>, and advances directly to the next table.
> +        <code>localnet</code> or <code>vtep</code>, and advances directly
> to
> +        the next table.
>        </li>
>
>        <li>
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index 5ccb516..ebbc18a 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -2669,7 +2669,8 @@ build_lswitch_flows(struct hmap *datapaths, struct
> hmap *ports,
>              continue;
>          }
>
> -        if (!strcmp(op->nbsp->type, "localnet")) {
> +        if (!strcmp(op->nbsp->type, "localnet")
> +            || !strcmp(op->nbsp->type, "vtep")) {
>              ds_clear(&match);
>              ds_put_format(&match, "inport == %s", op->json_key);
>              ovn_lflow_add(lflows, op->od, S_SWITCH_IN_ARP_ND_RSP, 100,
> --
> 1.9.1
>


Does the following diff work on your system?


             ovn_lflow_add(lflows, op->od, S_SWITCH_IN_ARP_ND_RSP, 100,






>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>

Comments

Ramu Ramamurthy Sept. 20, 2016, 9:38 p.m. UTC | #1
>
> Does the following diff work on your system?
>
>
> diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
> index 7797417..4f1cd89 100644
> --- a/ovn/northd/ovn-northd.8.xml
> +++ b/ovn/northd/ovn-northd.8.xml
> @@ -421,8 +421,8 @@
>
>      <ul>
>        <li>
> -        Priority-100 flows to skip ARP responder if inport is of type
> -        <code>localnet</code>, and advances directly to the next table.
> +        Priority-100 flows to skip ARP responder if inport is not
> associated
> +        with a local VIF, and advances directly to the next table.
>        </li>
>
>        <li>
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index 8c7e80c..bcb9738 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -2428,7 +2428,9 @@ build_lswitch_flows(struct hmap *datapaths, struct
> hmap *ports,
>              continue;
>          }
>
> -        if (!strcmp(op->nbsp->type, "localnet")) {
> +        /* Skip installing arp responder if the logical switch inport
> +         * is not associated with a local VIF. */
> +        if (strcmp(op->nbsp->type, "")) {
>              ds_clear(&match);
>              ds_put_format(&match, "inport == %s", op->json_key);
>              ovn_lflow_add(lflows, op->od, S_SWITCH_IN_ARP_ND_RSP, 100,

Yes, the above works, The above code skips the arp-responder for all
non-vif ports
(localnet, vtep, router, l2gateway). Is that ok ?

My usecase requires to skip the arp-responder for
vtep because, multiple hypervisors could respond to an arp from vtep.
diff mbox

Patch

diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
index 7797417..4f1cd89 100644
--- a/ovn/northd/ovn-northd.8.xml
+++ b/ovn/northd/ovn-northd.8.xml
@@ -421,8 +421,8 @@ 

     <ul>
       <li>
-        Priority-100 flows to skip ARP responder if inport is of type
-        <code>localnet</code>, and advances directly to the next table.
+        Priority-100 flows to skip ARP responder if inport is not
associated
+        with a local VIF, and advances directly to the next table.
       </li>

       <li>
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 8c7e80c..bcb9738 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2428,7 +2428,9 @@  build_lswitch_flows(struct hmap *datapaths, struct
hmap *ports,
             continue;
         }

-        if (!strcmp(op->nbsp->type, "localnet")) {
+        /* Skip installing arp responder if the logical switch inport
+         * is not associated with a local VIF. */
+        if (strcmp(op->nbsp->type, "")) {
             ds_clear(&match);
             ds_put_format(&match, "inport == %s", op->json_key);