aboutsummaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorGravatar Menglong Dong <imagedong@tencent.com> 2022-05-13 11:03:38 +0800
committerGravatar David S. Miller <davem@davemloft.net> 2022-05-16 10:47:43 +0100
commit7ebd3f3ee51a9e02994cd0a1be44fbd325d1e0dc (patch)
tree66e09466baeeecabfd255bbf6e5c69f138c735d3 /include/linux/skbuff.h
parentnet: skb: check the boundrary of drop reason in kfree_skb_reason() (diff)
downloadlinux-7ebd3f3ee51a9e02994cd0a1be44fbd325d1e0dc.tar.gz
linux-7ebd3f3ee51a9e02994cd0a1be44fbd325d1e0dc.tar.bz2
linux-7ebd3f3ee51a9e02994cd0a1be44fbd325d1e0dc.zip
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/linux/skbuff.h')
-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 9d82a8b6c8f1..5a2b29df6cab 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)