diff mbox

[ovs-dev] OVN: Fix ARP request flow in router ingress table

Message ID 1467640428-60389-1-git-send-email-csvejend@us.ibm.com
State Superseded
Headers show

Commit Message

Chandra S Vejendla July 4, 2016, 1:53 p.m. UTC
TPA in arp requests generated for unknown MAC-to-IP bindings is currently set
to DST_IP of the original packet. These arps will not be resolved when the
DST_IP is rechable via the default gateway. This patch fixes the issue by
setting the TPA to reg0. In routing stage reg0 is set to IP of the default
gateway when the packet has to go through the default gateway, otherwise reg0
is set to the DST_IP of the original packet.

Signed-off-by: Chandra Sekhar Vejendla <csvejend@us.ibm.com>
---
 ovn/northd/ovn-northd.8.xml | 1 +
 ovn/northd/ovn-northd.c     | 1 +
 2 files changed, 2 insertions(+)

Comments

Gurucharan Shetty July 5, 2016, 9:55 p.m. UTC | #1
On 4 July 2016 at 06:53, Chandra S Vejendla <csvejend@us.ibm.com> wrote:

> TPA in arp requests generated for unknown MAC-to-IP bindings is currently
> set
> to DST_IP of the original packet. These arps will not be resolved when the
> DST_IP is rechable via the default gateway. This patch fixes the issue by
> setting the TPA to reg0. In routing stage reg0 is set to IP of the default
> gateway when the packet has to go through the default gateway, otherwise
> reg0
> is set to the DST_IP of the original packet.
>
> Signed-off-by: Chandra Sekhar Vejendla <csvejend@us.ibm.com>
>

This looks correct to me.

> ---
>  ovn/northd/ovn-northd.8.xml | 1 +
>  ovn/northd/ovn-northd.c     | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
> index 6bc83ea..0a49b11 100644
> --- a/ovn/northd/ovn-northd.8.xml
> +++ b/ovn/northd/ovn-northd.8.xml
> @@ -1011,6 +1011,7 @@ icmp4 {
>  arp {
>      eth.dst = ff:ff:ff:ff:ff:ff;
>      arp.spa = reg1;
> +    arp.tpa = reg0;
>      arp.op = 1;  /* ARP request. */
>      output;
>  };
>

The documentation explains where 'reg0' comes from. I think it makes sense
to also say where 'reg0' is populated.




> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index f4b4435..afcd7fd 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -2693,6 +2693,7 @@ build_lrouter_flows(struct hmap *datapaths, struct
> hmap *ports,
>                        "arp { "
>                        "eth.dst = ff:ff:ff:ff:ff:ff; "
>                        "arp.spa = reg1; "
> +                      "arp.tpa = reg0; "
>                        "arp.op = 1; " /* ARP request */
>                        "output; "
>                        "};");
> --
> 2.6.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
Gurucharan Shetty July 5, 2016, 9:56 p.m. UTC | #2
>
>
>>
> The documentation explains where 'reg0' comes from. I think it makes sense
> to also say where 'reg0' is populated.
>
> Sorry, I meant "The documentation explains where 'reg1' comes from."


>
>
>
>> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
>> index f4b4435..afcd7fd 100644
>> --- a/ovn/northd/ovn-northd.c
>> +++ b/ovn/northd/ovn-northd.c
>> @@ -2693,6 +2693,7 @@ build_lrouter_flows(struct hmap *datapaths, struct
>> hmap *ports,
>>                        "arp { "
>>                        "eth.dst = ff:ff:ff:ff:ff:ff; "
>>                        "arp.spa = reg1; "
>> +                      "arp.tpa = reg0; "
>>                        "arp.op = 1; " /* ARP request */
>>                        "output; "
>>                        "};");
>> --
>> 2.6.1
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev
>>
>
>
diff mbox

Patch

diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
index 6bc83ea..0a49b11 100644
--- a/ovn/northd/ovn-northd.8.xml
+++ b/ovn/northd/ovn-northd.8.xml
@@ -1011,6 +1011,7 @@  icmp4 {
 arp {
     eth.dst = ff:ff:ff:ff:ff:ff;
     arp.spa = reg1;
+    arp.tpa = reg0;
     arp.op = 1;  /* ARP request. */
     output;
 };
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index f4b4435..afcd7fd 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2693,6 +2693,7 @@  build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
                       "arp { "
                       "eth.dst = ff:ff:ff:ff:ff:ff; "
                       "arp.spa = reg1; "
+                      "arp.tpa = reg0; "
                       "arp.op = 1; " /* ARP request */
                       "output; "
                       "};");