diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-06-07 12:51:44 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-06-07 12:51:44 +0200 |
commit | ba36c5b7ac9399a8dc521c44ece72db43d192f9b (patch) | |
tree | 806babf177853eaf38b44233fc221a5b31c4ea1b /net/core/drop_monitor.c | |
parent | 12de1ebd2ae3999b5454b5d6efd0c7365ce61c41 (diff) | |
parent | b160f7270e6df0f4ccadcf6750696b380eb3b811 (diff) | |
download | linux-ba36c5b7ac9399a8dc521c44ece72db43d192f9b.tar.gz linux-ba36c5b7ac9399a8dc521c44ece72db43d192f9b.tar.bz2 linux-ba36c5b7ac9399a8dc521c44ece72db43d192f9b.zip |
Merge branch 'reorganize-the-code-of-the-enum-skb_drop_reason'
Menglong Dong says:
====================
reorganize the code of the enum skb_drop_reason
The code of skb_drop_reason is a little wild, let's reorganize them.
Three things and three patches:
1) Move the enum 'skb_drop_reason' and related function to the standalone
header 'dropreason.h', as Jakub Kicinski suggested, as the skb drop
reasons are getting more and more.
2) use auto-generation to generate the source file that convert enum
skb_drop_reason to string.
3) make the comment of skb drop reasons kernel-doc style.
Changes since v3:
3/3: remove some useless comment (Jakub Kicinski)
Changes since v2:
2/3: - add new line in the end of .gitignore
- fix awk warning by make '\;' to ';', as ';' is not need to be
escaped
- export 'drop_reasons' in skbuff.c
Changes since v1:
1/3: move dropreason.h from include/linux/ to include/net/ (Jakub Kicinski)
2/3: generate source file instead of header file for drop reasons string
array (Jakub Kicinski)
3/3: use inline comment (Jakub Kicinski)
====================
Link: https://lore.kernel.org/r/20220606022436.331005-1-imagedong@tencent.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/core/drop_monitor.c')
-rw-r--r-- | net/core/drop_monitor.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 41cac0e4834e..4ad1decce724 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -48,19 +48,6 @@ static int trace_state = TRACE_OFF; static bool monitor_hw; -#undef EM -#undef EMe - -#define EM(a, b) [a] = #b, -#define EMe(a, b) [a] = #b - -/* drop_reasons is used to translate 'enum skb_drop_reason' to string, - * which is reported to user space. - */ -static const char * const drop_reasons[] = { - TRACE_SKB_DROP_REASON -}; - /* net_dm_mutex * * An overall lock guarding every operation coming from userspace. |