Message ID | 20240821123252.186305-1-dongml2@chinatelecom.cn |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [ovs-dev,net] net: ovs: fix ovs_drop_reasons error | expand |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 21 Aug 2024 20:32:52 +0800 you wrote: > 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: > > [...] Here is the summary with links: - [net] net: ovs: fix ovs_drop_reasons error https://git.kernel.org/netdev/net/c/57fb67783c40 You are awesome, thank you!
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 99d72543abd3..78d9961fcd44 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -2706,7 +2706,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 };