[Devel] [PATCH RHEL9 COMMIT] skb: make drop reason booleanable

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jan 16 20:56:49 MSK 2023


The commit is pushed to "branch-rh9-5.14.0-162.6.1.vz9.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-162.6.1.vz9.18.2
------>
commit 25217012a2ffa16a3d53eed7905bcfc21bc85f05
Author: Jakub Kicinski <kuba at kernel.org>
Date:   Tue Jan 3 17:39:27 2023 +0200

    skb: make drop reason booleanable
    
    We have a number of cases where function returns drop/no drop
    decision as a boolean. Now that we want to report the reason
    code as well we have to pass extra output arguments.
    
    We can make the reason code evaluate correctly as bool.
    
    I believe we're good to reorder the reasons as they are
    reported to user space as strings.
    
    Signed-off-by: Jakub Kicinski <kuba at kernel.org>
    Reviewed-by: David Ahern <dsahern at kernel.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>
    Acked-by: Nikolay Borisov <nborisov at suse.com>
    Signed-off-by: Nikolay Borisov <nikolay.borisov at virtuozzo.com>
    
    ======
    Patchset description:
    ms/net: Annotate skb free sites with reason
    
    This series backports most of the patches that add a reason to skb free sites.
    
    https://jira.sw.ru/browse/PSBM-143302
    
    Feature: net: improve verbosity of dropped packets reporting
---
 include/linux/skbuff.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 057c7b7606c0..997e1f71aa55 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -312,6 +312,7 @@ struct sk_buff;
  * used to translate the reason to string.
  */
 enum skb_drop_reason {
+	SKB_NOT_DROPPED_YET = 0,
 	SKB_DROP_REASON_NOT_SPECIFIED,
 	SKB_DROP_REASON_NO_SOCKET,
 	SKB_DROP_REASON_PKT_TOO_SMALL,


More information about the Devel mailing list