Patch "net: ovs: fix ovs_drop_reasons error" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: ovs: fix ovs_drop_reasons error

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-ovs-fix-ovs_drop_reasons-error.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8c57527a0de2213e0bab076b43fab7dd888f1386
Author: Menglong Dong <menglong8.dong@xxxxxxxxx>
Date:   Wed Aug 21 20:32:52 2024 +0800

    net: ovs: fix ovs_drop_reasons error
    
    [ Upstream commit 57fb67783c4011581882f32e656d738da1f82042 ]
    
    There is something wrong with ovs_drop_reasons. ovs_drop_reasons[0] is
    "OVS_DROP_LAST_ACTION", but OVS_DROP_LAST_ACTION == __OVS_DROP_REASON + 1,
    which means that ovs_drop_reasons[1] should be "OVS_DROP_LAST_ACTION".
    
    And as Adrian tested, without the patch, adding flow to drop packets
    results in:
    
    drop at: do_execute_actions+0x197/0xb20 [openvsw (0xffffffffc0db6f97)
    origin: software
    input port ifindex: 8
    timestamp: Tue Aug 20 10:19:17 2024 859853461 nsec
    protocol: 0x800
    length: 98
    original length: 98
    drop reason: OVS_DROP_ACTION_ERROR
    
    With the patch, the same results in:
    
    drop at: do_execute_actions+0x197/0xb20 [openvsw (0xffffffffc0db6f97)
    origin: software
    input port ifindex: 8
    timestamp: Tue Aug 20 10:16:13 2024 475856608 nsec
    protocol: 0x800
    length: 98
    original length: 98
    drop reason: OVS_DROP_LAST_ACTION
    
    Fix this by initializing ovs_drop_reasons with index.
    
    Fixes: 9d802da40b7c ("net: openvswitch: add last-action drop reason")
    Signed-off-by: Menglong Dong <dongml2@xxxxxxxxxxxxxxx>
    Tested-by: Adrian Moreno <amorenoz@xxxxxxxxxx>
    Reviewed-by: Adrian Moreno <amorenoz@xxxxxxxxxx>
    Link: https://patch.msgid.link/20240821123252.186305-1-dongml2@xxxxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 11c69415c6052..b7232142c13f8 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -2707,7 +2707,7 @@ static struct pernet_operations ovs_net_ops = {
 };
 
 static const char * const ovs_drop_reasons[] = {
-#define S(x)	(#x),
+#define S(x) [(x) & ~SKB_DROP_REASON_SUBSYS_MASK] = (#x),
 	OVS_DROP_REASONS(S)
 #undef S
 };




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux