[PATCH] net/ice: fix disabling outer VLAN insertion

Anurag Mandal anurag.mandal at intel.com
Wed Sep 30 04:48:39 CEST 2026


ice_vsi_dis_outer_insertion() treats a 0 return from ice_update_vsi()
as a failure, but a return value 0 means success, so the error and
success paths are swapped.
Removing a port VLAN in double VLAN mode logs an incorrect error,
returns invalid argument, and leaves a stale
ICE_AQ_VSI_OUTER_VLAN_PORT_BASED_INSERT bit in the cached
VSI context that later VSI updates replay into hardware.

Inverted the check to avoid this bug.

Fixes: de5da9d16430 ("net/ice: support double VLAN")
Cc: stable at dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
---
 drivers/net/intel/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 163304ba1e..2c5ffe07f3 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -6447,7 +6447,7 @@ static int ice_vsi_dis_outer_insertion(struct ice_vsi *vsi, struct ice_vsi_vlan_
 		 ICE_AQ_VSI_OUTER_VLAN_TX_MODE_M);
 
 	status = ice_update_vsi(hw, vsi->idx, &ctxt, NULL);
-	if (!status) {
+	if (status) {
 		PMD_DRV_LOG(ERR,
 			    "update VSI for disabling outer VLAN insertion failed, err %d",
 			    status);
-- 
2.34.1



More information about the dev mailing list