diff mbox series

[ovs-dev] compat: Fix for soft lockup issue with vxlan misconfiguration

Message ID CAOv37=BW_zpU2mMb_OScCCT9gfyr6gtZWV621VA3kVEPWnYBmQ@mail.gmail.com
State Superseded
Headers show
Series [ovs-dev] compat: Fix for soft lockup issue with vxlan misconfiguration | expand

Commit Message

Neelakantam Gaddam May 11, 2018, 11:56 a.m. UTC
This patch fixes the kernel soft lockup issue with vxlan configuration where
the tunneled packet is sent on the same bridge where vxlan port is attached
to.
It detects the loop in vxlan xmit function and drops if loop is detected.


                        dev->stats.collisions++;
@@ -1174,7 +1175,8 @@ static void vxlan_xmit_one(struct sk_buff *skb,
struct net_device *dev,
                        goto tx_error;
                }

-               if (ndst->dev == dev) {
+               if ((ndst->dev == dev) ||
+                   (OVS_CB(skb)->input_vport->dev == ndst->dev)) {
                        netdev_dbg(dev, "circular route to %pI6\n",
                                   &dst->sin6.sin6_addr);
                        dst_release(ndst);

Comments

Neelakantam Gaddam May 16, 2018, 7:09 a.m. UTC | #1
Any comments on this patch ?

On Fri, 11 May 2018 at 5:26 PM, Neelakantam Gaddam <neelugaddam@gmail.com>
wrote:

>
> This patch fixes the kernel soft lockup issue with vxlan configuration
> where
> the tunneled packet is sent on the same bridge where vxlan port is
> attached to.
> It detects the loop in vxlan xmit function and drops if loop is detected.
>
>
> --- a/datapath/linux/compat/vxlan.c
> +++ b/datapath/linux/compat/vxlan.c
> @@ -1115,7 +1115,8 @@ static void vxlan_xmit_one(struct sk_buff *skb,
> struct net_device *dev,
>                         goto tx_error;
>                 }
>
> -               if (rt->dst.dev == dev) {
> +               if ((rt->dst.dev == dev) ||
> +                   (OVS_CB(skb)->input_vport->dev == rt->dst.dev)) {
>                         netdev_dbg(dev, "circular route to %pI4\n",
>                                    &dst->sin.sin_addr.s_addr);
>                         dev->stats.collisions++;
> @@ -1174,7 +1175,8 @@ static void vxlan_xmit_one(struct sk_buff *skb,
> struct net_device *dev,
>                         goto tx_error;
>                 }
>
> -               if (ndst->dev == dev) {
> +               if ((ndst->dev == dev) ||
> +                   (OVS_CB(skb)->input_vport->dev == ndst->dev)) {
>                         netdev_dbg(dev, "circular route to %pI6\n",
>                                    &dst->sin6.sin6_addr);
>                         dst_release(ndst);
>
>
>
>
> --
> Thanks & Regards
> Neelakantam Gaddam
>
Gregory Rose May 18, 2018, 4:46 p.m. UTC | #2
On 5/16/2018 12:09 AM, Neelakantam Gaddam wrote:
> Any comments on this patch ?
>
> On Fri, 11 May 2018 at 5:26 PM, Neelakantam Gaddam 
> <neelugaddam@gmail.com <mailto:neelugaddam@gmail.com>> wrote:
>
>
>     This patch fixes the kernel soft lockup issue with vxlan
>     configuration where
>     the tunneled packet is sent on the same bridge where vxlan port is
>     attached to.
>     It detects the loop in vxlan xmit function and drops if loop is
>     detected.
>
>
>     --- a/datapath/linux/compat/vxlan.c
>     +++ b/datapath/linux/compat/vxlan.c
>     @@ -1115,7 +1115,8 @@ static void vxlan_xmit_one(struct sk_buff
>     *skb, struct net_device *dev,
>                             goto tx_error;
>                     }
>
>     -               if (rt->dst.dev == dev) {
>     +               if ((rt->dst.dev == dev) ||
>     +  (OVS_CB(skb)->input_vport->dev == rt->dst.dev)) {
>                             netdev_dbg(dev, "circular route to %pI4\n",
>      &dst->sin.sin_addr.s_addr);
>                             dev->stats.collisions++;
>     @@ -1174,7 +1175,8 @@ static void vxlan_xmit_one(struct sk_buff
>     *skb, struct net_device *dev,
>                             goto tx_error;
>                     }
>
>     -               if (ndst->dev == dev) {
>     +               if ((ndst->dev == dev) ||
>     +  (OVS_CB(skb)->input_vport->dev == ndst->dev)) {
>                             netdev_dbg(dev, "circular route to %pI6\n",
>      &dst->sin6.sin6_addr);
>                             dst_release(ndst);
>
>
>
>
>     -- 
>     Thanks & Regards
>     Neelakantam Gaddam
>

Hello Neelakantam,

The code patch itself looks fine but the patch is not in a form that is 
acceptable.  Please read up on the following and then resubmit the patch.

http://docs.openvswitch.org/en/latest/internals/contributing/submitting-patches/

I did apply the code and run some vxlan checks which passed.  If you can 
send us a proper patch then we can see about gitting it applied.

Thanks,

- Greg
diff mbox series

Patch

--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -1115,7 +1115,8 @@  static void vxlan_xmit_one(struct sk_buff *skb,
struct net_device *dev,
                        goto tx_error;
                }

-               if (rt->dst.dev == dev) {
+               if ((rt->dst.dev == dev) ||
+                   (OVS_CB(skb)->input_vport->dev == rt->dst.dev)) {
                        netdev_dbg(dev, "circular route to %pI4\n",
                                   &dst->sin.sin_addr.s_addr);