From: menglong8.dong@gmail.com
To: rostedt@goodmis.org, idosch@idosch.org
Cc: mingo@redhat.com, nhorman@tuxdriver.com, davem@davemloft.net,
kuba@kernel.org, imagedong@tencent.com, dsahern@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH net-next 1/2] net: skb: introduce SKB_DR_MAX_LEN
Date: Tue, 8 Feb 2022 15:28:35 +0800 [thread overview]
Message-ID: <20220208072836.3540192-2-imagedong@tencent.com> (raw)
In-Reply-To: <20220208072836.3540192-1-imagedong@tencent.com>
From: Menglong Dong <imagedong@tencent.com>
Introduce 'SKB_DR_MAX_LEN' to define the max length of drop reasons.
32 should be enough, as the current longest reason is
'UNICAST_IN_L2_MULTICAST'.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
---
include/trace/events/skb.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index cfcfd26399f7..920adcd564bc 100644
--- a/include/trace/events/skb.h
+++ b/include/trace/events/skb.h
@@ -9,6 +9,11 @@
#include <linux/netdevice.h>
#include <linux/tracepoint.h>
+/* max string length of drop reason. We use 'SKB_DR_' as the prefix to
+ * make it distinct from 'enum skb_drop_reason'
+ */
+#define SKB_DR_MAX_LEN 32
+
#define TRACE_SKB_DROP_REASON \
EM(SKB_DROP_REASON_NOT_SPECIFIED, NOT_SPECIFIED) \
EM(SKB_DROP_REASON_NO_SOCKET, NO_SOCKET) \
--
2.34.1
next prev parent reply other threads:[~2022-02-08 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 7:28 [PATCH net-next 0/2] net: drop_monitor: support drop reason menglong8.dong
2022-02-08 7:28 ` menglong8.dong [this message]
2022-02-08 7:28 ` [PATCH v7 net-next 2/2] " menglong8.dong
2022-02-08 14:58 ` Ido Schimmel
2022-02-09 2:49 ` Menglong Dong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220208072836.3540192-2-imagedong@tencent.com \
--to=menglong8.dong@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=idosch@idosch.org \
--cc=imagedong@tencent.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).