patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: remove error logs for vlan offloading
@ 2024-02-06  9:56 David Marchand
  2024-02-06 10:03 ` Bruce Richardson
  2024-02-06 10:34 ` [PATCH v2] " David Marchand
  0 siblings, 2 replies; 7+ messages in thread
From: David Marchand @ 2024-02-06  9:56 UTC (permalink / raw)
  To: dev
  Cc: bruce.richardson, stable, Jingjing Wu, Haiyue Wang, Qi Zhang,
	Qiming Yang

This was reported by RH QE.

When a vlan is enforced on a VF via an administrative configuration on
the PF side, the net/iavf driver logs two error messages.
Those error messages have no consequence on the rest of the port
initialisation and packet processing works fine.

[root@toto ~] # ip l set enp94s0 vf 0 vlan 2
[root@toto ~] # dpdk-testpmd -a 0000:5e:02.0 -- -i
...
Configuring Port 0 (socket 0)
iavf_dev_init_vlan(): Failed to update vlan offload
iavf_dev_configure(): configure VLAN failed: -95
iavf_set_rx_function(): request RXDID[1] in Queue[0] is legacy, set
	rx_pkt_burst as legacy for all queues

The first change is to remove the error log in iavf_dev_init_vlan().
This log is unneeded since all error path are covered by a dedicated log
message already.

Then, in iavf_dev_init_vlan(), requesting all possible VLAN offloading
must not trigger an ERROR level log message. This is simply confusing,
as the application may not have requested such vlan offloading.
The reason why the driver requests all offloading is unclear so keep it
as is. Instead, rephrase the log message and lower its level to INFO.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/iavf/iavf_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 1fb876e827..fc92cdf146 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -631,7 +631,7 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
 					RTE_ETH_VLAN_FILTER_MASK |
 					RTE_ETH_VLAN_EXTEND_MASK);
 	if (err) {
-		PMD_DRV_LOG(ERR, "Failed to update vlan offload");
+		PMD_DRV_LOG(INFO, "There is no support or the PF refused VLAN offloading");
 		return err;
 	}
 
@@ -707,9 +707,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
 		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
 	}
 
-	ret = iavf_dev_init_vlan(dev);
-	if (ret)
-		PMD_DRV_LOG(ERR, "configure VLAN failed: %d", ret);
+	iavf_dev_init_vlan(dev);
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
 		if (iavf_init_rss(ad) != 0) {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/iavf: remove error logs for vlan offloading
  2024-02-06  9:56 [PATCH] net/iavf: remove error logs for vlan offloading David Marchand
@ 2024-02-06 10:03 ` Bruce Richardson
  2024-02-06 10:20   ` David Marchand
  2024-02-06 10:34 ` [PATCH v2] " David Marchand
  1 sibling, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2024-02-06 10:03 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, stable, Jingjing Wu, Haiyue Wang, Qi Zhang, Qiming Yang

On Tue, Feb 06, 2024 at 10:56:07AM +0100, David Marchand wrote:
> This was reported by RH QE.
> 
> When a vlan is enforced on a VF via an administrative configuration on
> the PF side, the net/iavf driver logs two error messages.
> Those error messages have no consequence on the rest of the port
> initialisation and packet processing works fine.
> 
> [root@toto ~] # ip l set enp94s0 vf 0 vlan 2
> [root@toto ~] # dpdk-testpmd -a 0000:5e:02.0 -- -i
> ...
> Configuring Port 0 (socket 0)
> iavf_dev_init_vlan(): Failed to update vlan offload
> iavf_dev_configure(): configure VLAN failed: -95
> iavf_set_rx_function(): request RXDID[1] in Queue[0] is legacy, set
> 	rx_pkt_burst as legacy for all queues
> 
> The first change is to remove the error log in iavf_dev_init_vlan().
> This log is unneeded since all error path are covered by a dedicated log
> message already.
> 
> Then, in iavf_dev_init_vlan(), requesting all possible VLAN offloading
> must not trigger an ERROR level log message. This is simply confusing,
> as the application may not have requested such vlan offloading.
> The reason why the driver requests all offloading is unclear so keep it
> as is. Instead, rephrase the log message and lower its level to INFO.
> 
> Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

One small suggestion inline below.
> ---
>  drivers/net/iavf/iavf_ethdev.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index 1fb876e827..fc92cdf146 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -631,7 +631,7 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
>  					RTE_ETH_VLAN_FILTER_MASK |
>  					RTE_ETH_VLAN_EXTEND_MASK);
>  	if (err) {
> -		PMD_DRV_LOG(ERR, "Failed to update vlan offload");
> +		PMD_DRV_LOG(INFO, "There is no support or the PF refused VLAN offloading");

Minor nit, the phrase "no support" seems ambiguous on first reading, since
it's not completely clear that the no support refers to vlan offloading.

How about:
  "VLAN offloading is not supported, or offloading was refused by the PF"

>  		return err;
>  	}
>  
> @@ -707,9 +707,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
>  		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
>  	}
>  
> -	ret = iavf_dev_init_vlan(dev);
> -	if (ret)
> -		PMD_DRV_LOG(ERR, "configure VLAN failed: %d", ret);
> +	iavf_dev_init_vlan(dev);
>  
>  	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
>  		if (iavf_init_rss(ad) != 0) {
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] net/iavf: remove error logs for vlan offloading
  2024-02-06 10:03 ` Bruce Richardson
@ 2024-02-06 10:20   ` David Marchand
  0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2024-02-06 10:20 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, stable, Jingjing Wu, Haiyue Wang, Qi Zhang, Qiming Yang

On Tue, Feb 6, 2024 at 11:04 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > @@ -631,7 +631,7 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
> >                                       RTE_ETH_VLAN_FILTER_MASK |
> >                                       RTE_ETH_VLAN_EXTEND_MASK);
> >       if (err) {
> > -             PMD_DRV_LOG(ERR, "Failed to update vlan offload");
> > +             PMD_DRV_LOG(INFO, "There is no support or the PF refused VLAN offloading");
>
> Minor nit, the phrase "no support" seems ambiguous on first reading, since
> it's not completely clear that the no support refers to vlan offloading.
>
> How about:
>   "VLAN offloading is not supported, or offloading was refused by the PF"

It reads better, I'll send a v2.
Thanks Bruce.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] net/iavf: remove error logs for vlan offloading
  2024-02-06  9:56 [PATCH] net/iavf: remove error logs for vlan offloading David Marchand
  2024-02-06 10:03 ` Bruce Richardson
@ 2024-02-06 10:34 ` David Marchand
       [not found]   ` <CAJgakAfnFE79PtTFx1RRKpUkTDbcP_O22VfL5Gw5tZqW9Dcs5A@mail.gmail.com>
  2024-02-29 11:54   ` Bruce Richardson
  1 sibling, 2 replies; 7+ messages in thread
From: David Marchand @ 2024-02-06 10:34 UTC (permalink / raw)
  To: dev
  Cc: bruce.richardson, stable, Jingjing Wu, Qiming Yang, Qi Zhang,
	Haiyue Wang

This was reported by RH QE.

When a vlan is enforced on a VF via an administrative configuration on
the PF side, the net/iavf driver logs two error messages.
Those error messages have no consequence on the rest of the port
initialisation and packet processing works fine.

[root@toto ~] # ip l set enp94s0 vf 0 vlan 2
[root@toto ~] # dpdk-testpmd -a 0000:5e:02.0 -- -i
...
Configuring Port 0 (socket 0)
iavf_dev_init_vlan(): Failed to update vlan offload
iavf_dev_configure(): configure VLAN failed: -95
iavf_set_rx_function(): request RXDID[1] in Queue[0] is legacy, set
	rx_pkt_burst as legacy for all queues

The first change is to remove the error log in iavf_dev_init_vlan().
This log is unneeded since all error path are covered by a dedicated log
message already.

Then, in iavf_dev_init_vlan(), requesting all possible VLAN offloading
must not trigger an ERROR level log message. This is simply confusing,
as the application may not have requested such vlan offloading.
The reason why the driver requests all offloading is unclear so keep it
as is. Instead, rephrase the log message and lower its level to INFO.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
Changes since v1:
- updated log message,

---
 drivers/net/iavf/iavf_ethdev.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 1fb876e827..3532e379a1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -631,7 +631,8 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
 					RTE_ETH_VLAN_FILTER_MASK |
 					RTE_ETH_VLAN_EXTEND_MASK);
 	if (err) {
-		PMD_DRV_LOG(ERR, "Failed to update vlan offload");
+		PMD_DRV_LOG(INFO,
+			"VLAN offloading is not supported, or offloading was refused by the PF");
 		return err;
 	}
 
@@ -707,9 +708,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
 		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
 	}
 
-	ret = iavf_dev_init_vlan(dev);
-	if (ret)
-		PMD_DRV_LOG(ERR, "configure VLAN failed: %d", ret);
+	iavf_dev_init_vlan(dev);
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
 		if (iavf_init_rss(ad) != 0) {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] net/iavf: remove error logs for vlan offloading
       [not found]   ` <CAJgakAfnFE79PtTFx1RRKpUkTDbcP_O22VfL5Gw5tZqW9Dcs5A@mail.gmail.com>
@ 2024-02-06 12:46     ` David Marchand
  2024-02-06 12:47       ` David Marchand
  0 siblings, 1 reply; 7+ messages in thread
From: David Marchand @ 2024-02-06 12:46 UTC (permalink / raw)
  To: Amiya Ranjan Mohakud
  Cc: dev, bruce.richardson, stable, Jingjing Wu, Qiming Yang,
	Qi Zhang, Haiyue Wang

On Tue, Feb 6, 2024 at 1:44 PM Amiya Ranjan Mohakud
<amiya-ranjan.mohakud@broadcom.com> wrote:
> I also see a similar error with iavf using dpdk-22.11.1. But in my case, I see  2 more additional error logs showing up during iavf_dev_configure(). It's with ESX-8.0U1 with an inbox driver. Firmware upgrade did not resolve the issue though.
>
> 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_execute_vf_cmd(): Return failure -4 for cmd 27
> 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_enable_vlan_strip(): Failed to execute command of OP_ENABLE_VLAN_STRIPPING
> 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_dev_init_vlan(): Failed to update vlan offload
> 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_dev_configure(): configure VLAN failed: -5
> 2023-12-08T09:58:01.156 |9322| MSG      [NET] dpdk_log_write:107 iavf_execute_vf_cmd(): Return failure -5 for cmd 14
>
> I was currently following up with KaiwenX on this. Attached the mail thread for reference.
>
> Could you please let me know if this patch would fix the issue or any more additional fixes are needed?

Those logs above are about actually requesting vlan offloading.
While in my case, I was not requesting anything.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] net/iavf: remove error logs for vlan offloading
  2024-02-06 12:46     ` David Marchand
@ 2024-02-06 12:47       ` David Marchand
  0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2024-02-06 12:47 UTC (permalink / raw)
  To: Amiya Ranjan Mohakud
  Cc: dev, bruce.richardson, stable, Jingjing Wu, Qiming Yang,
	Qi Zhang, Haiyue Wang

On Tue, Feb 6, 2024 at 1:46 PM David Marchand <david.marchand@redhat.com> wrote:
>
> On Tue, Feb 6, 2024 at 1:44 PM Amiya Ranjan Mohakud
> <amiya-ranjan.mohakud@broadcom.com> wrote:
> > I also see a similar error with iavf using dpdk-22.11.1. But in my case, I see  2 more additional error logs showing up during iavf_dev_configure(). It's with ESX-8.0U1 with an inbox driver. Firmware upgrade did not resolve the issue though.
> >
> > 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_execute_vf_cmd(): Return failure -4 for cmd 27
> > 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_enable_vlan_strip(): Failed to execute command of OP_ENABLE_VLAN_STRIPPING
> > 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_dev_init_vlan(): Failed to update vlan offload
> > 2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107 iavf_dev_configure(): configure VLAN failed: -5
> > 2023-12-08T09:58:01.156 |9322| MSG      [NET] dpdk_log_write:107 iavf_execute_vf_cmd(): Return failure -5 for cmd 14
> >
> > I was currently following up with KaiwenX on this. Attached the mail thread for reference.
> >
> > Could you please let me know if this patch would fix the issue or any more additional fixes are needed?
>
> Those logs above are about actually requesting vlan offloading.
> While in my case, I was not requesting anything.

Ah sorry, I read too quickly and missed the iavf_dev_init_vlan().
Well, it may be related, though I can't produce the mailbox errors in
my case, which seems specific to the ESX PF driver.
And for this, I have no clue what is wrong.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] net/iavf: remove error logs for vlan offloading
  2024-02-06 10:34 ` [PATCH v2] " David Marchand
       [not found]   ` <CAJgakAfnFE79PtTFx1RRKpUkTDbcP_O22VfL5Gw5tZqW9Dcs5A@mail.gmail.com>
@ 2024-02-29 11:54   ` Bruce Richardson
  1 sibling, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2024-02-29 11:54 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, stable, Jingjing Wu, Qiming Yang, Qi Zhang, Haiyue Wang

On Tue, Feb 06, 2024 at 11:34:20AM +0100, David Marchand wrote:
> This was reported by RH QE.
> 
> When a vlan is enforced on a VF via an administrative configuration on
> the PF side, the net/iavf driver logs two error messages.
> Those error messages have no consequence on the rest of the port
> initialisation and packet processing works fine.
> 
> [root@toto ~] # ip l set enp94s0 vf 0 vlan 2
> [root@toto ~] # dpdk-testpmd -a 0000:5e:02.0 -- -i
> ...
> Configuring Port 0 (socket 0)
> iavf_dev_init_vlan(): Failed to update vlan offload
> iavf_dev_configure(): configure VLAN failed: -95
> iavf_set_rx_function(): request RXDID[1] in Queue[0] is legacy, set
> 	rx_pkt_burst as legacy for all queues
> 
> The first change is to remove the error log in iavf_dev_init_vlan().
> This log is unneeded since all error path are covered by a dedicated log
> message already.
> 
> Then, in iavf_dev_init_vlan(), requesting all possible VLAN offloading
> must not trigger an ERROR level log message. This is simply confusing,
> as the application may not have requested such vlan offloading.
> The reason why the driver requests all offloading is unclear so keep it
> as is. Instead, rephrase the log message and lower its level to INFO.
> 
> Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Applied to dpdk-next-net-intel

Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-29 11:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06  9:56 [PATCH] net/iavf: remove error logs for vlan offloading David Marchand
2024-02-06 10:03 ` Bruce Richardson
2024-02-06 10:20   ` David Marchand
2024-02-06 10:34 ` [PATCH v2] " David Marchand
     [not found]   ` <CAJgakAfnFE79PtTFx1RRKpUkTDbcP_O22VfL5Gw5tZqW9Dcs5A@mail.gmail.com>
2024-02-06 12:46     ` David Marchand
2024-02-06 12:47       ` David Marchand
2024-02-29 11:54   ` Bruce Richardson

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).