DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anurag Mandal <anurag.mandal@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com,
	Anurag Mandal <anurag.mandal@intel.com>,
	stable@dpdk.org
Subject: [PATCH] net/ice: fix disabling outer VLAN insertion
Date: Wed, 30 Sep 2026 02:48:39 +0000	[thread overview]
Message-ID: <20260930024839.337910-1-anurag.mandal@intel.com> (raw)

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@dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal@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


             reply	other threads:[~2026-09-30  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  2:48 Anurag Mandal [this message]
2026-10-06 14:33 ` [PATCH] net/ice: fix disabling outer VLAN insertion Burakov, Anatoly
2026-10-06 15:55   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260930024839.337910-1-anurag.mandal@intel.com \
    --to=anurag.mandal@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox