Messages in this thread Patch in this message | | | From | menglong8.dong@gmail ... | Subject | [PATCH net-next v2 3/4] net: skb: change the definition SKB_DR_SET() | Date | Thu, 12 May 2022 20:33:12 +0800 |
| |
From: Menglong Dong <imagedong@tencent.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.
Signed-off-by: Menglong Dong <imagedong@tencent.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
| |