netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] net: use kfree_skb_reason() for ip/udp packet receive
@ 2022-01-24 13:15 menglong8.dong
  2022-01-24 13:15 ` [PATCH net-next 1/6] net: netfilter: use kfree_drop_reason() for NF_DROP menglong8.dong
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: menglong8.dong @ 2022-01-24 13:15 UTC (permalink / raw)
  To: kuba
  Cc: rostedt, mingo, davem, yoshfuji, dsahern, pablo, kadlec, fw,
	imagedong, edumazet, alobakin, paulb, pabeni, talalahmad,
	haokexin, keescook, memxor, linux-kernel, netdev,
	netfilter-devel, coreteam, cong.wang

From: Menglong Dong <imagedong@tencent.com>

In this series patches, kfree_skb() is replaced with kfree_skb_reason()
during ipv4 and udp4 packet receiving path, and following drop reasons
are introduced:

SKB_DROP_REASON_NETFILTER_DROP
SKB_DROP_REASON_OTHERHOST
SKB_DROP_REASON_IP_CSUM
SKB_DROP_REASON_IP_INHDR
SKB_DROP_REASON_IP_ROUTE_INPUT
SKB_DROP_REASON_IP_RPFILTER
SKB_DROP_REASON_EARLY_DEMUX
SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST
SKB_DROP_REASON_XFRM_POLICY
SKB_DROP_REASON_IP_NOPROTO
SKB_DROP_REASON_UDP_FILTER
SKB_DROP_REASON_SOCKET_RCVBUFF
SKB_DROP_REASON_PROTO_MEM

TCP is more complex, so I left it in the next series.

I just figure out how __print_symbolic() works. It doesn't base on the
array index, but searching for symbols by loop. So I'm a little afraid
it's performance.


Menglong Dong (6):
  net: netfilter: use kfree_drop_reason() for NF_DROP
  net: ipv4: use kfree_skb_reason() in ip_rcv_core()
  net: ipv4: use kfree_skb_reason() in ip_rcv_finish_core()
  net: ipv4: use kfree_skb_reason() in ip_protocol_deliver_rcu()
  net: udp: use kfree_skb_reason() in udp_queue_rcv_one_skb()
  net: udp: use kfree_skb_reason() in __udp_queue_rcv_skb()

 include/linux/skbuff.h     | 16 +++++++++++++++
 include/trace/events/skb.h | 14 +++++++++++++
 net/ipv4/ip_input.c        | 42 +++++++++++++++++++++++++++-----------
 net/ipv4/udp.c             | 22 ++++++++++++++------
 net/netfilter/core.c       |  3 ++-
 5 files changed, 78 insertions(+), 19 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-01-26 15:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 13:15 [PATCH net-next 0/6] net: use kfree_skb_reason() for ip/udp packet receive menglong8.dong
2022-01-24 13:15 ` [PATCH net-next 1/6] net: netfilter: use kfree_drop_reason() for NF_DROP menglong8.dong
2022-01-25 23:32   ` Jakub Kicinski
2022-01-26  0:51     ` Pablo Neira Ayuso
2022-01-24 13:15 ` [PATCH net-next 2/6] net: ipv4: use kfree_skb_reason() in ip_rcv_core() menglong8.dong
2022-01-26  2:10   ` David Ahern
2022-01-26  2:26     ` Menglong Dong
2022-01-24 13:15 ` [PATCH net-next 3/6] net: ipv4: use kfree_skb_reason() in ip_rcv_finish_core() menglong8.dong
2022-01-26  2:18   ` David Ahern
2022-01-26  2:36     ` Menglong Dong
2022-01-26  2:57       ` David Ahern
2022-01-26  3:13         ` Menglong Dong
2022-01-24 13:15 ` [PATCH net-next 4/6] net: ipv4: use kfree_skb_reason() in ip_protocol_deliver_rcu() menglong8.dong
2022-01-26  2:21   ` David Ahern
2022-01-26  2:39     ` Menglong Dong
2022-01-24 13:15 ` [PATCH net-next 5/6] net: udp: use kfree_skb_reason() in udp_queue_rcv_one_skb() menglong8.dong
2022-01-26  2:25   ` David Ahern
2022-01-26  2:43     ` Menglong Dong
2022-01-26  3:04       ` David Ahern
2022-01-26  3:25         ` Jakub Kicinski
2022-01-26 15:28           ` David Ahern
2022-01-24 13:15 ` [PATCH net-next 6/6] net: udp: use kfree_skb_reason() in __udp_queue_rcv_skb() menglong8.dong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).