From: Qi Zhang Date: Wed, 8 Mar 2017 06:18:50 +0000 (-0500) Subject: net/fm10k/base: reset multicast mode when deleting lport X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=22025588e48394ccf557bd3cd1645a95a15a155d;p=dpdk.git net/fm10k/base: reset multicast mode when deleting lport Deleting lport when multicast mod is configured to FM10K_XCAST_MODE_ALLMULTI or FM10K_XCAST_MODE_PROMISC will result in generating orphaned multicast-group entries in the switch manager. Before deleting the lport, reset multicast mode to FM10K_XCAST_MODE_NONE to flush out these multicast-group entries. Signed-off-by: Qi Zhang --- diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c index 105babf4a0..97301198ae 100644 --- a/drivers/net/fm10k/base/fm10k_pf.c +++ b/drivers/net/fm10k/base/fm10k_pf.c @@ -536,6 +536,10 @@ STATIC s32 fm10k_update_lport_state_pf(struct fm10k_hw *hw, u16 glort, if (!fm10k_glort_valid_pf(hw, glort)) return FM10K_ERR_PARAM; + /* reset multicast mode if deleting lport */ + if (!enable) + fm10k_update_xcast_mode_pf(hw, glort, FM10K_XCAST_MODE_NONE); + /* construct the lport message from the 2 pieces of data we have */ lport_msg = ((u32)count << 16) | glort;