Netdev Archive on
help / color / mirror / Atom feed
* Re: [PATCH] net: skb: introduce kfree_skb_reason()
@ 2022-01-10  2:07 Benjamin Yim
  0 siblings, 0 replies; only message in thread
From: Benjamin Yim @ 2022-01-10  2:07 UTC (permalink / raw)
  To: imagedong; +Cc: Jakub Kicinski, netdev, LKML

On Thu,  6 Jan 2022 14:36:26 +0800 Menglong Dong wrote:

> Introduce the interface kfree_skb_reason(), which is able to pass
> the reason why the skb is dropped to 'kfree_skb' tracepoint.

> Add the 'reason' field to 'trace_kfree_skb', therefor user can get
> more detail information about abnormal skb with 'drop_monitor' or
> eBPF.

> All drop reasons are defined in the enum 'skb_drop_reason', and
> they will be print as string in 'kfree_skb' tracepoint in format
> of 'reason: XXX'.

> ( Maybe the reasons should be defined in a uapi header file, so that
> user space can use them? )

Since these drops are hardly hot path, why not simply use a string ?
An ENUM will not really help grep games.

tcp_drop(sk, skb, "csum error");

can refer to the previous discussion:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-10  2:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10  2:07 [PATCH] net: skb: introduce kfree_skb_reason() Benjamin Yim

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).