All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net: gre: add skb drop reasons to gre packet receive
@ 2022-03-14 13:33 menglong8.dong
  2022-03-14 13:33 ` [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to gre_rcv() menglong8.dong
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: menglong8.dong @ 2022-03-14 13:33 UTC (permalink / raw)
  To: dsahern, kuba
  Cc: rostedt, mingo, xeb, davem, yoshfuji, imagedong, edumazet, kafai,
	talalahmad, keescook, alobakin, flyingpeng, mengensun,
	dongli.zhang, linux-kernel, netdev

From: Menglong Dong <imagedong@tencent.com>

In the commit c504e5c2f964 ("net: skb: introduce kfree_skb_reason()"),
we added the support of reporting the reasons of skb drops to kfree_skb
tracepoint. And in this series patches, reasons for skb drops are added
to gre packet receiving path.

gre_rcv() in gre_demux.c is handled in the 1th patch.

In order to report skb drop reasons, we make erspan_rcv() return
PACKET_NEXT when no tunnel device found in the 2th patch. This may don't
correspond to 'PACKET_NEXT', but don't matter.

And gre_rcv() in ip_gre.c is handled in the 3th patch.

Following drop reasons are added(what they mean can be see in the
document for them):

SKB_DROP_REASON_GRE_VERSION
SKB_DROP_REASON_GRE_NOHANDLER
SKB_DROP_REASON_GRE_CSUM
SKB_DROP_REASON_GRE_NOTUNNEL

Maybe SKB_DROP_REASON_GRE_NOHANDLER can be replaced with
SKB_DROP_REASON_GRE_VERSION? As no gre_protocol found means that gre
version not supported.

PS: This set is parallel with the set "net: icmp: add skb drop reasons
to icmp", please don't mind :)

Menglong Dong (3):
  net: gre_demux: add skb drop reasons to gre_rcv()
  net: ipgre: make erspan_rcv() return PACKET_NEXT
  net: ipgre: add skb drop reasons to gre_rcv()

 include/linux/skbuff.h     |  6 ++++++
 include/trace/events/skb.h |  4 ++++
 net/ipv4/gre_demux.c       | 12 +++++++++---
 net/ipv4/ip_gre.c          | 30 +++++++++++++++++++-----------
 4 files changed, 38 insertions(+), 14 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-03-16 21:05 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 13:33 [PATCH net-next 0/3] net: gre: add skb drop reasons to gre packet receive menglong8.dong
2022-03-14 13:33 ` [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to gre_rcv() menglong8.dong
2022-03-16  3:08   ` Jakub Kicinski
2022-03-16  3:49     ` David Ahern
2022-03-16  4:53       ` Menglong Dong
2022-03-16 14:45         ` David Ahern
2022-03-16  4:55       ` Jakub Kicinski
2022-03-16 10:12         ` David Laight
2022-03-16 18:55           ` Jakub Kicinski
2022-03-16 14:56         ` David Ahern
2022-03-16 18:57           ` Jakub Kicinski
2022-03-16 21:05             ` David Ahern
2022-03-16  4:41     ` Menglong Dong
2022-03-16  4:50       ` Jakub Kicinski
2022-03-14 13:33 ` [PATCH net-next 2/3] net: ipgre: make erspan_rcv() return PACKET_NEXT menglong8.dong
2022-03-14 13:33 ` [PATCH net-next 3/3] net: ipgre: add skb drop reasons to gre_rcv() menglong8.dong
2022-03-16  3:17   ` Jakub Kicinski
2022-03-16  6:21     ` Menglong Dong
2022-03-16 18:50       ` Jakub Kicinski
2022-03-16 18:51       ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.