* [PATCH v1] net/iavf: fix VLAN strip disabling for v2 capability
@ 2025-07-03 8:42 Amiya Ranjan Mohakud
2025-07-03 10:20 ` [PATCH v2] " Amiya Ranjan Mohakud
2025-07-03 10:51 ` [PATCH v1] " Loftus, Ciara
0 siblings, 2 replies; 4+ messages in thread
From: Amiya Ranjan Mohakud @ 2025-07-03 8:42 UTC (permalink / raw)
To: dev; +Cc: amiyaranjan.mohakud, stable
Ensure the correct virtchnl op is called for disabling vlan stripping by checking
if the device supports either v1 or v2 vlan capability and choosing the op
accordingly.
Bugzilla ID:1735
Fixes: 3bfad066f9b4 ("net/iavf: fix VLAN strip setting after enabling filter")
Cc: stable@dpdk.org
Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index c33fdd9069..335a8126c4 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -1388,6 +1388,7 @@ 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;
@@ -1395,7 +1396,10 @@ iavf_disable_vlan_strip_ex(struct rte_eth_dev *dev, int on)
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)) {
- err = iavf_disable_vlan_strip(adapter);
+ if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2)
+ err = iavf_config_vlan_strip_v2(adapter, false);
+ else
+ err = iavf_disable_vlan_strip(adapter);
if (err)
return -EIO;
}
--
2.39.5 (Apple Git-154)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] net/iavf: fix VLAN strip disabling for v2 capability
2025-07-03 8:42 [PATCH v1] net/iavf: fix VLAN strip disabling for v2 capability Amiya Ranjan Mohakud
@ 2025-07-03 10:20 ` Amiya Ranjan Mohakud
2025-07-03 11:46 ` Bruce Richardson
2025-07-03 10:51 ` [PATCH v1] " Loftus, Ciara
1 sibling, 1 reply; 4+ messages in thread
From: Amiya Ranjan Mohakud @ 2025-07-03 10:20 UTC (permalink / raw)
To: dev; +Cc: amiyaranjan.mohakud, stable
Ensure the correct virtchnl op is called for disabling vlan stripping by
checking if the device supports either v1 or v2 vlan capability and
choosing the op accordingly.
Bugzilla ID:1735
Cc: stable@dpdk.org
Fixes: 3bfad066f9b4 ("net/iavf: fix VLAN strip setting after enabling filter")
Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index c33fdd9069..335a8126c4 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -1388,6 +1388,7 @@ 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;
@@ -1395,7 +1396,10 @@ iavf_disable_vlan_strip_ex(struct rte_eth_dev *dev, int on)
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)) {
- err = iavf_disable_vlan_strip(adapter);
+ if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2)
+ err = iavf_config_vlan_strip_v2(adapter, false);
+ else
+ err = iavf_disable_vlan_strip(adapter);
if (err)
return -EIO;
}
--
2.39.5 (Apple Git-154)
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1] net/iavf: fix VLAN strip disabling for v2 capability
2025-07-03 8:42 [PATCH v1] net/iavf: fix VLAN strip disabling for v2 capability Amiya Ranjan Mohakud
2025-07-03 10:20 ` [PATCH v2] " Amiya Ranjan Mohakud
@ 2025-07-03 10:51 ` Loftus, Ciara
1 sibling, 0 replies; 4+ messages in thread
From: Loftus, Ciara @ 2025-07-03 10:51 UTC (permalink / raw)
To: Amiya Ranjan Mohakud, dev; +Cc: stable
>
> Ensure the correct virtchnl op is called for disabling vlan stripping by checking
> if the device supports either v1 or v2 vlan capability and choosing the op
> accordingly.
>
> Bugzilla ID:1735
> Fixes: 3bfad066f9b4 ("net/iavf: fix VLAN strip setting after enabling filter")
> Cc: stable@dpdk.org
>
> Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
Thanks. The CI is flagging an issue with the commit message format but maybe that can be fixed when it is applied.
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> drivers/net/intel/iavf/iavf_ethdev.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/intel/iavf/iavf_ethdev.c
> b/drivers/net/intel/iavf/iavf_ethdev.c
> index c33fdd9069..335a8126c4 100644
> --- a/drivers/net/intel/iavf/iavf_ethdev.c
> +++ b/drivers/net/intel/iavf/iavf_ethdev.c
> @@ -1388,6 +1388,7 @@ 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;
>
> @@ -1395,7 +1396,10 @@ iavf_disable_vlan_strip_ex(struct rte_eth_dev
> *dev, int on)
> 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)) {
> - err = iavf_disable_vlan_strip(adapter);
> + if (vf->vf_res->vf_cap_flags &
> VIRTCHNL_VF_OFFLOAD_VLAN_V2)
> + err = iavf_config_vlan_strip_v2(adapter, false);
> + else
> + err = iavf_disable_vlan_strip(adapter);
> if (err)
> return -EIO;
> }
> --
> 2.39.5 (Apple Git-154)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/iavf: fix VLAN strip disabling for v2 capability
2025-07-03 10:20 ` [PATCH v2] " Amiya Ranjan Mohakud
@ 2025-07-03 11:46 ` Bruce Richardson
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2025-07-03 11:46 UTC (permalink / raw)
To: Amiya Ranjan Mohakud; +Cc: dev, stable
On Thu, Jul 03, 2025 at 03:50:46PM +0530, Amiya Ranjan Mohakud wrote:
> Ensure the correct virtchnl op is called for disabling vlan stripping by
> checking if the device supports either v1 or v2 vlan capability and
> choosing the op accordingly.
>
> Bugzilla ID:1735
> Cc: stable@dpdk.org
> Fixes: 3bfad066f9b4 ("net/iavf: fix VLAN strip setting after enabling filter")
>
> Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
> ---
> drivers/net/intel/iavf/iavf_ethdev.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Keeping Ciara's ack from v1, since only commit log wrapping has changed.
Applied to dpdk-next-net-intel
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-03 11:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-03 8:42 [PATCH v1] net/iavf: fix VLAN strip disabling for v2 capability Amiya Ranjan Mohakud
2025-07-03 10:20 ` [PATCH v2] " Amiya Ranjan Mohakud
2025-07-03 11:46 ` Bruce Richardson
2025-07-03 10:51 ` [PATCH v1] " Loftus, Ciara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).