From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CC5C46BAE for ; Fri, 18 Jul 2025 21:36:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 143A040E41; Fri, 18 Jul 2025 21:36:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9674840E42 for ; Fri, 18 Jul 2025 21:36:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=71YpVVRWKNr07EK83btDA8y9/k3u3qHyeb7RpVeiBuw=; b=Y8xPNyBgSY02sTkeO9Bb/70psRpK1orkUnq/sQ/06o+gkCA5sw5WqSw0BS6xLpYYRhM8z6 0yWOdcQk+oeH6pIzkCvL8Aii8UJG4Wlm3JrOSiz6KqQQDkqXVLwlMFKljcYn7LgnaDpzxl +afI3aKncL/JuKlP7m9V2awqQd612fo= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-302-LmAOTw9LNtOXTK6vcWGtgA-1; Fri, 18 Jul 2025 15:36:49 -0400 X-MC-Unique: LmAOTw9LNtOXTK6vcWGtgA-1 X-Mimecast-MFC-AGG-ID: LmAOTw9LNtOXTK6vcWGtgA_1752867409 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E6F661800872; Fri, 18 Jul 2025 19:36:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 914B5180049D; Fri, 18 Jul 2025 19:36:47 +0000 (UTC) From: Kevin Traynor To: Amiya Ranjan Mohakud Cc: Ciara Loftus , dpdk stable Subject: patch 'net/iavf: fix VLAN strip setting after enabling filter' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:30:46 +0100 Message-ID: <20250718193247.1008129-112-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ogMPhmvVSUZwy-PKnATUSZOmcJdr9v0lZoymyjbCltw_1752867409 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 24.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/856e6a751b36cde62a2f1c766027985597046529 Thanks. Kevin --- >From 856e6a751b36cde62a2f1c766027985597046529 Mon Sep 17 00:00:00 2001 From: Amiya Ranjan Mohakud Date: Mon, 23 Jun 2025 23:41:36 +0530 Subject: [PATCH] net/iavf: fix VLAN strip setting after enabling filter [ upstream commit 3bfad066f9b4764981c9ad90a750fa6f1afcf15a ] For i40e kernel drivers which support either vlan(v1) or vlan(v2) VIRTCHNL OP, it will set strip on when setting filter on. But DPDK side will not change strip flag. To be consistent with DPDL side, explicitly disable strip again. Bugzilla ID: 1725 Fixes: e25c7ed114b2 ("net/iavf: fix VLAN offload strip flag") Signed-off-by: Amiya Ranjan Mohakud Reviewed-by: Ciara Loftus --- .mailmap | 1 + drivers/net/iavf/iavf_ethdev.c | 68 +++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/.mailmap b/.mailmap index 5c01a6eaa1..c2b4d45128 100644 --- a/.mailmap +++ b/.mailmap @@ -89,4 +89,5 @@ Amit Bernstein Amit Gupta Amit Prakash Shukla +Amiya Ranjan Mohakud Amr Mokhtar Amruta Zende diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 2ea84cef6d..3dfccb9969 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1378,38 +1378,19 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index) static int -iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) +iavf_disable_vlan_strip_ex(struct rte_eth_dev *dev, int on) { - struct iavf_adapter *adapter = - IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); - struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - struct rte_eth_conf *dev_conf = &dev->data->dev_conf; - int err; - - if (adapter->closed) - return -EIO; - - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) { - err = iavf_add_del_vlan_v2(adapter, vlan_id, on); - if (err) - return -EIO; - return 0; - } - - if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN)) - return -ENOTSUP; - - err = iavf_add_del_vlan(adapter, vlan_id, on); - if (err) - return -EIO; - - /* For i40e kernel driver which only supports vlan(v1) VIRTCHNL OP, + /* For i40e kernel drivers which supports both vlan(v1 & v2) VIRTCHNL OP, * it will set strip on when setting filter on but dpdk side will not - * change strip flag. To be consistent with dpdk side, disable strip - * again. + * change strip flag. To be consistent with dpdk side, explicitly disable + * strip again. * - * For i40e kernel driver which supports vlan v2, dpdk will invoke vlan v2 - * related function, so it won't go through here. */ + struct iavf_adapter *adapter = + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct rte_eth_conf *dev_conf = &dev->data->dev_conf; + int err; + if (adapter->hw.mac.type == IAVF_MAC_XL710 || + adapter->hw.mac.type == IAVF_MAC_VF || adapter->hw.mac.type == IAVF_MAC_X722_VF) { if (on && !(dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)) { @@ -1422,4 +1403,33 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) } +static int +iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) +{ + struct iavf_adapter *adapter = + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); + int err; + + if (adapter->closed) + return -EIO; + + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) { + err = iavf_add_del_vlan_v2(adapter, vlan_id, on); + if (err) + return -EIO; + + return iavf_disable_vlan_strip_ex(dev, on); + } + + if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN)) + return -ENOTSUP; + + err = iavf_add_del_vlan(adapter, vlan_id, on); + if (err) + return -EIO; + + return iavf_disable_vlan_strip_ex(dev, on); +} + static void iavf_iterate_vlan_filters_v2(struct rte_eth_dev *dev, bool enable) -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:14.904024680 +0100 +++ 0112-net-iavf-fix-VLAN-strip-setting-after-enabling-filte.patch 2025-07-18 20:29:11.052907705 +0100 @@ -1 +1 @@ -From 3bfad066f9b4764981c9ad90a750fa6f1afcf15a Mon Sep 17 00:00:00 2001 +From 856e6a751b36cde62a2f1c766027985597046529 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3bfad066f9b4764981c9ad90a750fa6f1afcf15a ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18,2 +19,2 @@ - .mailmap | 1 + - drivers/net/intel/iavf/iavf_ethdev.c | 68 ++++++++++++++++------------ + .mailmap | 1 + + drivers/net/iavf/iavf_ethdev.c | 68 +++++++++++++++++++--------------- @@ -23 +24 @@ -index c6d72058bb..1b238970fb 100644 +index 5c01a6eaa1..c2b4d45128 100644 @@ -32,5 +33,5 @@ -diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c -index 02649c19b2..c33fdd9069 100644 ---- a/drivers/net/intel/iavf/iavf_ethdev.c -+++ b/drivers/net/intel/iavf/iavf_ethdev.c -@@ -1379,38 +1379,19 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index) +diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c +index 2ea84cef6d..3dfccb9969 100644 +--- a/drivers/net/iavf/iavf_ethdev.c ++++ b/drivers/net/iavf/iavf_ethdev.c +@@ -1378,38 +1378,19 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index) @@ -85 +86 @@ -@@ -1423,4 +1404,33 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) +@@ -1422,4 +1403,33 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)