aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYogesh Bhosale <Yogesh.Bhosale@intel.com>2026-02-01 17:27:36 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-02-01 17:27:36 +0000
commit98bdf63f6e94be42a1787de73608de15bcb3419a (patch)
tree415b2cee7015645cdd2d1eeb770d1dceda6fdc15
parentcea2683bb691d6cbcfb7e342c497d018bba712c2 (diff)
ice(4): Handle allmulti flag in ice_if_promisc_set function
In the ice_if_promisc_set function, the driver currently disables the IFF_ALLMULTI flag, thereby preventing the activation of multicast mode. To address this issue, implement appropriate handling to ensure the flag is managed correctly. Signed-off-by: Yogesh Bhosale <yogesh.bhosale@intel.com> Tested by: Gowthamkumar K S <gowtham.kumar.ks@intel.com> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54186
-rw-r--r--sys/dev/ice/if_ice_iflib.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c
index 1469d2916465..6ea539d52e02 100644
--- a/sys/dev/ice/if_ice_iflib.c
+++ b/sys/dev/ice/if_ice_iflib.c
@@ -1907,15 +1907,13 @@ ice_if_promisc_set(if_ctx_t ctx, int flags)
ice_set_default_promisc_mask(promisc_mask);
- if (multi_enable)
- return (EOPNOTSUPP);
-
if (promisc_enable) {
status = ice_set_vsi_promisc(hw, sc->pf_vsi.idx,
promisc_mask, 0);
if (status && status != ICE_ERR_ALREADY_EXISTS) {
device_printf(dev,
- "Failed to enable promiscuous mode for PF VSI, err %s aq_err %s\n",
+ "Failed to enable promiscuous mode for "
+ "PF VSI, err %s aq_err %s\n",
ice_status_str(status),
ice_aq_str(hw->adminq.sq_last_status));
return (EIO);
@@ -1925,11 +1923,28 @@ ice_if_promisc_set(if_ctx_t ctx, int flags)
promisc_mask, 0);
if (status) {
device_printf(dev,
- "Failed to disable promiscuous mode for PF VSI, err %s aq_err %s\n",
+ "Failed to disable promiscuous mode for"
+ " PF VSI, err %s aq_err %s\n",
ice_status_str(status),
ice_aq_str(hw->adminq.sq_last_status));
return (EIO);
}
+
+ if (multi_enable) {
+ ice_clear_bit(ICE_PROMISC_UCAST_TX, promisc_mask);
+ ice_clear_bit(ICE_PROMISC_UCAST_RX, promisc_mask);
+ status = ice_set_vsi_promisc(hw, sc->pf_vsi.idx,
+ promisc_mask, 0);
+ if (status && status != ICE_ERR_ALREADY_EXISTS) {
+ device_printf(dev,
+ "Failed to enable allmulti mode "
+ "for PF VSI, err %s aq_err %s\n",
+ ice_status_str(status),
+ ice_aq_str(
+ hw->adminq.sq_last_status));
+ return (EIO);
+ }
+ }
}
return (0);