[PATCH v1 4/8] net/zxdh: initialise multicast delete flag
Junlong Wang
wang.junlong1 at zte.com.cn
Sat Nov 7 04:04:44 CET 2026
zxdh_del_mac_table() decides whether a multicast address still has
subscribers with del_flag, but the flag has no initialiser and is
only ever assigned 1. The loop that walks the group entries breaks
out as soon as it finds one that still has members, leaving del_flag
unwritten; at -O1 and above, including the default -O2 build, the
compiler resolves the subsequent test to true, so the delete loop
always runs.
Whenever one port therefore leaves a shared multicast address, the
entries holding the PF's and every other VF's membership are deleted
too: the PF and sibling VFs silently lose their multicast reception,
with no attacker involved.
Restore the missing initialiser, so the entry is deleted only when
the last member leaves.
Fixes: b64747ef2951 ("net/zxdh: fix MAC configuration failure")
Cc: stable at dpdk.org
Signed-off-by: Junlong Wang <wang.junlong1 at zte.com.cn>
---
drivers/net/zxdh/zxdh_tables.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/zxdh/zxdh_tables.c b/drivers/net/zxdh/zxdh_tables.c
index 233d53a7e8..e5a5cc63da 100644
--- a/drivers/net/zxdh/zxdh_tables.c
+++ b/drivers/net/zxdh/zxdh_tables.c
@@ -349,7 +349,7 @@ zxdh_del_mac_table(struct zxdh_hw *hw, uint16_t vport, struct rte_ether_addr *ad
struct zxdh_mac_multicast_table multicast_table = {0};
union zxdh_virport_num vport_num = (union zxdh_virport_num)vport;
uint16_t vfid = zxdh_vport_to_vfid(vport_num);
- uint16_t del_flag, group_id = 0;
+ uint16_t del_flag = 0, group_id = 0;
int32_t ret = 0;
if (rte_is_unicast_ether_addr(addr)) {
--
2.27.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20261107/28f619c9/attachment.htm>
More information about the stable
mailing list