summaryrefslogtreecommitdiffstats
path: root/include/net/dropreason.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-10-29 17:45:16 +0200
committerJakub Kicinski <kuba@kernel.org>2022-11-01 04:14:26 +0100
commit0e84afe8ebfbb9eade3f4f6de4720887bf908e26 (patch)
treeeb5dc52d4d2f25a53ab9de06b33e9729d871849a /include/net/dropreason.h
parentnet: systemport: Add support for RDMA overflow statistic counter (diff)
downloadlinux-0e84afe8ebfbb9eade3f4f6de4720887bf908e26.tar.xz
linux-0e84afe8ebfbb9eade3f4f6de4720887bf908e26.zip
net: dropreason: add SKB_CONSUMED reason
This will allow to simply use in the future: kfree_skb_reason(skb, reason); Instead of repeating sequences like: if (dropped) kfree_skb_reason(skb, reason); else consume_skb(skb); For instance, following patch in the series is adding @reason to skb_release_data() and skb_release_all(), so that we can propagate a meaningful @reason whenever consume_skb()/kfree_skb() have to take care of a potential frag_list. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/dropreason.h')
-rw-r--r--include/net/dropreason.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/dropreason.h b/include/net/dropreason.h
index c1cbcdbaf149..0bd18c14dae0 100644
--- a/include/net/dropreason.h
+++ b/include/net/dropreason.h
@@ -80,6 +80,8 @@ enum skb_drop_reason {
* @SKB_NOT_DROPPED_YET: skb is not dropped yet (used for no-drop case)
*/
SKB_NOT_DROPPED_YET = 0,
+ /** @SKB_CONSUMED: packet has been consumed */
+ SKB_CONSUMED,
/** @SKB_DROP_REASON_NOT_SPECIFIED: drop reason is not specified */
SKB_DROP_REASON_NOT_SPECIFIED,
/** @SKB_DROP_REASON_NO_SOCKET: socket not found */