mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 03:40:04 +00:00
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:
parent
20bbcd0a94
commit
7ebd3f3ee5
1 changed files with 2 additions and 1 deletions
|
@ -510,7 +510,8 @@ enum skb_drop_reason {
|
||||||
(name = SKB_DROP_REASON_##reason)
|
(name = SKB_DROP_REASON_##reason)
|
||||||
#define SKB_DR_OR(name, reason) \
|
#define SKB_DR_OR(name, reason) \
|
||||||
do { \
|
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); \
|
SKB_DR_SET(name, reason); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue