Skip to contentSkip to conversation

net/iavf: remove error logs for vlan offloading

PATCH Superseded David Marchand 3 participants 9 messages Feb 6, 2024 – Feb 29, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: remove error logs for vlan offloading

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")
---
 drivers/net/iavf/iavf_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/iavf/iavf_ethdev.c +2 -4
index 1fb876e827..fc92cdf146 100644
@@ -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) {
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 26 lines · David Marchand

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.

Quoted 4 lines
Fixes 1c301e8c3cff ("net/iavf: support new VLAN capabilities")

One small suggestion inline below.

Quoted 9 lines
---
 drivers/net/iavf/iavf_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/iavf/iavf_ethdev.c +0 -0
index 1fb876e827..fc92cdf146 100644

drivers/net/iavf/iavf_ethdev.c iavf_dev_init_vlan(struct rte_eth_dev *dev) · line 634

Quoted 5 lines
drivers/net/iavf/iavf_ethdev.c +1 -1
@@ -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"

Quoted 17 lines
drivers/net/iavf/iavf_ethdev.c +1 -3
 		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) {
Signature · 1 line
2.43.0
#2 lore raw
Quoted 10 lines · Bruce Richardson

drivers/net/iavf/iavf_ethdev.c iavf_dev_init_vlan(struct rte_eth_dev *dev) · line 634

Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +1 -1
@@ -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.

Quoted 2 lines

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

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

Signature · 1 line
David Marchand
#3 lore raw

PATCH v2 1/1 net/iavf: remove error logs for vlan offloading

In reply to David Marchand

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

---
Changes since v1:
- updated log message,

---
 drivers/net/iavf/iavf_ethdev.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/iavf/iavf_ethdev.c +3 -4
index 1fb876e827..3532e379a1 100644
@@ -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) {
Signature · 1 line
2.43.0
#4 lore raw

Hi David,

Thanks for the patch.

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?

Regards,
Amiya

Quoted 70 lines · David Marchand

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

---
Changes since v1:
- updated log message,

---
 drivers/net/iavf/iavf_ethdev.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/iavf/iavf_ethdev.c +3 -5
index 1fb876e827..3532e379a1 100644
@@ -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

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

Hi Kaiwenx,

There are no specific parameters except "-m 1024 -l 1,2". Just that the guest has 2 SR IOV X710 interfaces.

Just for an additional update -

ESX version: 8.0 U1
i40e PF driver version: 1.11.3.5
Firmware version:7.10 0x800075da 19.5.12

I tried updating the firmware version to 9.00 0x8000cadc 21.5.9 based on the compatibility matrix
https://www.vmware.com/resources/compatibility/detail.php?deviceCategory=io&productid=37976
But It still did not help.

I'm not sure if we need to upgrade the driver version as well. Please let me know if you have any breakthroughs. Thanks in advance.

Regards,
Amiya

Quoted 72 lines · KaiwenX

Hi Amiya

Can you provide me with the DPDK startup parameters?

Thanks

*From:* Amiya Ranjan Mohakud <[email protected]> *Sent:* Tuesday, January 23, 2024 4:54 PM
*To:* Deng, KaiwenX <[email protected]>; [email protected] *Cc:* Amiya Ranjan Mohakud <[email protected]>; Amiya Ranjan Mohakud <[email protected]>
*Subject:* Regarding
https://mails.dpdk.org/archives/dev/2023-June/270558.html dpdk patch

Hi Kaiwenx

I came across the below DPDK iavf error message during the initialization of X710 NICs in ESX. It seems the functionality works fine, but with below error messages.

DPDK Version: 22.11.2

2023-12-08T09:58:00.901 |9322| MSG      [NET] dpdk_port_configure:1717

Configure port eth3/1. lsc_intr=1, rxq/txq=1/1, (rss_enabled=1) rss_hf=0x0000000000000c30 tx_ol=0x00000000000006 rx_ol=0x00000000080007

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

On search, I came across your above patch. I am not able to make out properly from the description. Could you please help elaborate the root cause/fix for my understanding and kindly confirm if this patch would fix the above issue. Thanks in advance.

Regards,

Amiya

This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

#5 lore raw
Quoted 11 lines · Amiya Ranjan Mohakud

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.

Signature · 1 line
David Marchand
#6 lore raw
Quoted 11 lines · David Marchand
Quoted 8 lines · Amiya Ranjan Mohakud

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
Quoted 6 lines
Quoted 3 lines

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.

Signature · 1 line
David Marchand
#7 lore raw

Thanks @David Marchand <[email protected]> for the quick response.

Regards,
Amiya

Quoted 41 lines · David Marchand
Quoted 4 lines · David Marchand
Quoted 1 line · Amiya Ranjan Mohakud

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.

Quoted 2 lines
Quoted 2 lines
2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107

iavf_execute_vf_cmd(): Return failure -4 for cmd 27

Quoted 1 line
Quoted 1 line
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

Quoted 1 line
Quoted 1 line
2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107

iavf_dev_init_vlan(): Failed to update vlan offload

Quoted 1 line
Quoted 1 line
2023-12-08T09:58:00.906 |9322| MSG      [NET] dpdk_log_write:107

iavf_dev_configure(): configure VLAN failed: -5

Quoted 1 line
Quoted 1 line
2023-12-08T09:58:01.156 |9322| MSG      [NET] dpdk_log_write:107

iavf_execute_vf_cmd(): Return failure -5 for cmd 14

Quoted 2 lines
Quoted 2 lines

I was currently following up with KaiwenX on this. Attached the mail

thread for reference.

Quoted 2 lines
Quoted 2 lines

Could you please let me know if this patch would fix the issue or any

more additional fixes are needed?

Quoted 3 lines

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

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#8 lore raw
In reply to David Marchand
Quoted 26 lines · David Marchand

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.

Quoted 6 lines
Fixes 1c301e8c3cff ("net/iavf: support new VLAN capabilities")

---

Applied to dpdk-next-net-intel

Thanks,
/Bruce