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
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to