[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240815122245.975440-1-dongml2@chinatelecom.cn>
Date: Thu, 15 Aug 2024 20:22:45 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: kuba@...nel.org
Cc: pshelar@....org,
davem@...emloft.net,
edumazet@...gle.com,
pabeni@...hat.com,
amorenoz@...hat.com,
netdev@...r.kernel.org,
dev@...nvswitch.org,
linux-kernel@...r.kernel.org,
Menglong Dong <dongml2@...natelecom.cn>
Subject: [PATCH net-next] net: ovs: fix ovs_drop_reasons error
I'm sure if I understand it correctly, but it seems that 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".
Fix this by initializing ovs_drop_reasons with index.
Fixes: 9d802da40b7c ("net: openvswitch: add last-action drop reason")
Signed-off-by: Menglong Dong <dongml2@...natelecom.cn>
---
net/openvswitch/datapath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 99d72543abd3..249210958f0b 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
};
--
2.39.2
Powered by blists - more mailing lists