aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMenglong Dong <imagedong@tencent.com>2022-05-13 11:03:38 +0800
committerDavid S. Miller <davem@davemloft.net>2022-05-16 10:47:43 +0100
commit7ebd3f3ee51a9e02994cd0a1be44fbd325d1e0dc (patch)
tree66e09466baeeecabfd255bbf6e5c69f138c735d3 /include
parent20bbcd0a94c6686c2692e6f7081163c233d7ce40 (diff)
downloadnf-7ebd3f3ee51a9e02994cd0a1be44fbd325d1e0dc.tar.gz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 9d82a8b6c8f16c..5a2b29df6cab92 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)