Thread (20 messages) 20 messages, 3 authors, 2024-09-16

Re: [PATCH net-next v3 06/12] net: vxlan: make vxlan_snoop() return drop reasons

From: Ido Schimmel <idosch@nvidia.com>
Date: 2024-09-11 08:08:33
Also in: lkml

On Mon, Sep 09, 2024 at 03:16:46PM +0800, Menglong Dong wrote:
quoted hunk ↗ jump to hunk
@@ -1447,7 +1448,7 @@ static bool vxlan_snoop(struct net_device *dev,
 
 	/* Ignore packets from invalid src-address */
 	if (!is_valid_ether_addr(src_mac))
-		return true;
+		return SKB_DROP_REASON_VXLAN_INVALID_SMAC;
[...]
quoted hunk ↗ jump to hunk
diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
index 98259d2b3e92..1b9ec4a49c38 100644
--- a/include/net/dropreason-core.h
+++ b/include/net/dropreason-core.h
@@ -94,6 +94,8 @@
 	FN(TC_RECLASSIFY_LOOP)		\
 	FN(VXLAN_INVALID_HDR)		\
 	FN(VXLAN_VNI_NOT_FOUND)		\
+	FN(VXLAN_INVALID_SMAC)		\
Since this is now part of the core reasons, why not name it
"INVALID_SMAC" so that it could be reused outside of the VXLAN driver?
For example, the bridge driver has the exact same check in its receive
path (see br_handle_frame()).
+	FN(VXLAN_ENTRY_EXISTS)		\
 	FN(IP_TUNNEL_ECN)		\
 	FNe(MAX)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help