Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD5833C8715 for ; Fri, 27 Mar 2026 07:23:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774596230; cv=none; b=mB40tkNi67g7hZPW80L/h/Wx/k1lf6e4XxzgexBsVHbvchEWbL8BqiRhX13OA338Epx5NRIaMstHWRBTPAetOCgUz0h2+Wczr0K+944/tMG25ExUHZEtZYFMQMnSwa6yE/4XoTJhGSmbX2btazii87CRvPXdGbjK0vLC7IXYxb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774596230; c=relaxed/simple; bh=ingbZmd2Pb3SYiTnzq1cCDdJm7Fy7ywH4K9TDIc577s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ab91YP0xUlZFkanB3WmZ1n0IdwEG2ddinxmwus8KM6aCN81/dbzQVLyCLDKNlHTZiAflezD3IB9czVGuQtYZ0sue/mK95+8eWMlH96BlnOjCbhZXPsbcXaqhXQpYWg09Ov72v4Vv6KpGvuikEv6lRJfew4eLkhGOOrdOVv4K51M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NiRXS62H; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NiRXS62H" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774596225; x=1806132225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ingbZmd2Pb3SYiTnzq1cCDdJm7Fy7ywH4K9TDIc577s=; b=NiRXS62Hdpe13Ik030z8deSJuCWzSs2bTrRZoWfOm18ry022cGxAVG5u RhPlHYS9OQbq0wVMg10g0dctKQxyScJI/96vL/ONC+SBluc1BQEIuWu/A N/jK0hmxbyP0fWMIzhMhrGrgBe2zjXKjp4tALkCA1z6MbeHNMkz+/WOyn Rq0hx1oKZUCeTMjb0uLMoutmVeeudavCUxceis5FJCahj5DCt7vrx37zY 0nargqb2kr5Oy3xH/dAXs5Yp/Jsee/PLkxWTMSyNfQ5OxwiF7ZS8AMDrV 79EVA2S4LhQYIFMKH50ikbEEnUxX4Xdmf3BFr2zu5gcu4z8LVZ6UCC48p g==; X-CSE-ConnectionGUID: MbCS3UgtSvGn5/n/MMjazQ== X-CSE-MsgGUID: pZHHBifcQ+mNCPFU2U7nOQ== X-IronPort-AV: E=McAfee;i="6800,10657,11741"; a="75733973" X-IronPort-AV: E=Sophos;i="6.23,143,1770624000"; d="scan'208";a="75733973" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2026 00:23:41 -0700 X-CSE-ConnectionGUID: oW78nACyQZCHMhKDGVyJxQ== X-CSE-MsgGUID: MuZ9vhdqSlaFa4OmXDk+sQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,143,1770624000"; d="scan'208";a="255739100" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa002.jf.intel.com with ESMTP; 27 Mar 2026 00:23:40 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org, Marcin Szycik Subject: [PATCH net] ice: fix setting promisc mode while adding VID filter Date: Fri, 27 Mar 2026 08:23:28 +0100 Message-ID: <20260327072332.130320-5-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260327072332.130320-1-aleksandr.loktionov@intel.com> References: <20260327072332.130320-1-aleksandr.loktionov@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Marcin Szycik There are at least two paths through which VSI promiscuous mode can be independently configured via ice_fltr_set_vsi_promisc(): - ice_vlan_rx_add_vid() (netdev op) - ice_service_task() -> ... -> ice_set_promisc() Both paths may try to program promiscuous mode concurrently. One such scenario is: 1. Add ice netdev to bond 2. Add the bond netdev to bridge 3. ice netdev enters allmulticast mode (IFF_ALLMULTI) 4. Service task programs promisc mode filter 5. Bridge -> bond calls ice_vlan_rx_add_vid() Crucially, ice_vlan_rx_add_vid() fails if ice_fltr_set_vsi_promisc() returns any error, including -EEXIST. This causes VLAN filtering setup to fail on the bond interface. ice_set_promisc() already handles -EEXIST correctly. Fix by adding the same -EEXIST check to ice_vlan_rx_add_vid(): if the promisc filter is already programmed, continue without returning error. Fixes: 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling") Cc: stable@vger.kernel.org Signed-off-by: Marcin Szycik Signed-off-by: Aleksandr Loktionov --- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 8896805..cf116bb 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3755,7 +3755,7 @@ int ice_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid) ret = ice_fltr_set_vsi_promisc(&vsi->back->hw, vsi->idx, ICE_MCAST_VLAN_PROMISC_BITS, vid); - if (ret) + if (ret && ret != -EEXIST) goto finish; } -- 2.52.0