net: skb: change the definition SKB_DR_SET()

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@tencent.com>
Reviewed-by: Hao Peng <flyingpeng@tencent.com>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Menglong Dong 2022-05-13 11:03:38 +08:00 committed by David S. Miller
parent 20bbcd0a94
commit 7ebd3f3ee5
1 changed files with 2 additions and 1 deletions

View File

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