Thread (23 messages) 23 messages, 3 authors, 2024-08-21

Re: [PATCH net-next 07/10] net: vxlan: use vxlan_kfree_skb() in vxlan_xmit()

From: Ido Schimmel <idosch@nvidia.com>
Date: 2024-08-20 12:29:06
Also in: lkml

On Thu, Aug 15, 2024 at 08:42:59PM +0800, Menglong Dong wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 9a61f04bb95d..22e2bf532ac3 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2729,7 +2729,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 			if (info && info->mode & IP_TUNNEL_INFO_TX)
 				vxlan_xmit_one(skb, dev, vni, NULL, false);
 			else
-				kfree_skb(skb);
+				vxlan_kfree_skb(skb, VXLAN_DROP_TXINFO);
This one probably belongs in include/net/dropreason-core.h as there are
other devices that support tunnel info with similar checks.
quoted hunk ↗ jump to hunk
 			return NETDEV_TX_OK;
 		}
 	}
@@ -2792,7 +2792,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 			dev_core_stats_tx_dropped_inc(dev);
 			vxlan_vnifilter_count(vxlan, vni, NULL,
 					      VXLAN_VNI_STATS_TX_DROPS, 0);
-			kfree_skb(skb);
+			vxlan_kfree_skb(skb, VXLAN_DROP_REMOTE);
 			return NETDEV_TX_OK;
 		}
 	}
@@ -2815,7 +2815,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 		if (fdst)
 			vxlan_xmit_one(skb, dev, vni, fdst, did_rsc);
 		else
-			kfree_skb(skb);
+			vxlan_kfree_skb(skb, VXLAN_DROP_REMOTE);
Maybe VXLAN_DROP_NO_REMOTE? Please add it to vxlan_mdb_xmit() as well
 	}
 
 	return NETDEV_TX_OK;
-- 
2.39.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help