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