[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220208072836.3540192-2-imagedong@tencent.com>
Date: Tue, 8 Feb 2022 15:28:35 +0800
From: menglong8.dong@...il.com
To: rostedt@...dmis.org, idosch@...sch.org
Cc: mingo@...hat.com, nhorman@...driver.com, davem@...emloft.net,
kuba@...nel.org, imagedong@...cent.com, dsahern@...nel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH net-next 1/2] net: skb: introduce SKB_DR_MAX_LEN
From: Menglong Dong <imagedong@...cent.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@...cent.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
Powered by blists - more mailing lists