[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240815124302.982711-1-dongml2@chinatelecom.cn>
Date: Thu, 15 Aug 2024 20:42:52 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: kuba@...nel.org
Cc: davem@...emloft.net,
edumazet@...gle.com,
pabeni@...hat.com,
dsahern@...nel.org,
dongml2@...natelecom.cn,
idosch@...dia.com,
amcohen@...dia.com,
gnault@...hat.com,
bpoirier@...dia.com,
b.galvani@...il.com,
razor@...ckwall.org,
petrm@...dia.com,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: [PATCH net-next 00/10] net: vxlan: add skb drop reasons support
In this series, we add skb drop reasons to the vxlan module. After the
commit 071c0fc6fb91 ("net: extend drop reasons for multiple subsystems"),
we can add the skb drop reasons as a subsystem.
So, we now add a new skb drop reason subsystem for vxlan. I'm not sure
if it is better to add them directly to enum skb_drop_reason, as there
are only 6 new drop reasons that we introduce for vxlan:
VXLAN_DROP_FLAGS
VXLAN_DROP_VNI
VXLAN_DROP_MAC
VXLAN_DROP_TXINFO
VXLAN_DROP_REMOTE
VXLAN_DROP_REMOTE_IP
And we add the "SKB_DROP_REASON_IP_TUNNEL_ECN" to enum skb_drop_reason,
as it not only belongs to vxlan subsystem.
In order to reset the reason to NOT_SPECIFIED if it is
SKB_NOT_DROPPED_YET, we introduce the SKB_DR_RESET() in the 2nd patch.
This is to make sure that the skb is indeed dropped.
Menglong Dong (10):
net: vxlan: add vxlan to the drop reason subsystem
net: skb: add SKB_DR_RESET
net: skb: introduce pskb_network_may_pull_reason()
net: ip: introduce pskb_inet_may_pull_reason()
net: vxlan: make vxlan_remcsum() return skb drop reasons
net: vxlan: add skb drop reasons to vxlan_rcv()
net: vxlan: use vxlan_kfree_skb() in vxlan_xmit()
net: vxlan: add drop reasons support to vxlan_xmit_one()
net: vxlan: use kfree_skb_reason in vxlan_encap_bypass
net: vxlan: use vxlan_kfree_skb in encap_bypass_if_local
drivers/net/vxlan/drop.h | 36 ++++++++++++
drivers/net/vxlan/vxlan_core.c | 91 +++++++++++++++++++++++--------
drivers/net/vxlan/vxlan_private.h | 1 +
include/linux/skbuff.h | 8 ++-
include/net/dropreason-core.h | 7 +++
include/net/dropreason.h | 6 ++
include/net/ip_tunnels.h | 10 +++-
7 files changed, 133 insertions(+), 26 deletions(-)
create mode 100644 drivers/net/vxlan/drop.h
--
2.39.2
Powered by blists - more mailing lists