[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220513030339.336580-4-imagedong@tencent.com>
Date: Fri, 13 May 2022 11:03:38 +0800
From: menglong8.dong@...il.com
To: kuba@...nel.org
Cc: nhorman@...driver.com, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
imagedong@...cent.com, kafai@...com, talalahmad@...gle.com,
keescook@...omium.org, asml.silence@...il.com, willemb@...gle.com,
vasily.averin@...ux.dev, ilias.apalodimas@...aro.org,
luiz.von.dentz@...el.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, Jiang Biao <benbjiang@...cent.com>,
Hao Peng <flyingpeng@...cent.com>
Subject: [PATCH net-next v3 3/4] net: skb: change the definition SKB_DR_SET()
From: Menglong Dong <imagedong@...cent.com>
The SKB_DR_OR() is used to set the drop reason to a value when it is
not set or specified yet. SKB_NOT_DROPPED_YET should also be considered
as not set.
Reviewed-by: Jiang Biao <benbjiang@...cent.com>
Reviewed-by: Hao Peng <flyingpeng@...cent.com>
Signed-off-by: Menglong Dong <imagedong@...cent.com>
---
include/linux/skbuff.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index b91d225fdc13..4db3f4a33580 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -510,7 +510,8 @@ enum skb_drop_reason {
(name = SKB_DROP_REASON_##reason)
#define SKB_DR_OR(name, reason) \
do { \
- if (name == SKB_DROP_REASON_NOT_SPECIFIED) \
+ if (name == SKB_DROP_REASON_NOT_SPECIFIED || \
+ name == SKB_NOT_DROPPED_YET) \
SKB_DR_SET(name, reason); \
} while (0)
--
2.36.1
Powered by blists - more mailing lists