Skip to contentSkip to conversation

*** Intel iavf: Return in the case of ADD/DEL ETH address ***

PATCH New Vipin P R 3 participants 6 messages Jan 15, 2023 – Feb 13, 2023 Network drivers

lore
Share & tools
lore

Vipin P R

author
#0 lore raw

PATCH 1/1 *** Intel iavf: Return in the case of ADD/DEL ETH address ***

***
Intel iavf: Return in the case of ADD/DEL ETH address

In case of i40vf, VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are unsupported. i40evf_execute_vf_cmd is invoked with these operations as part of i40evf_set_mc_addr_list()

The cases are not handled in i40evf_execute_vf_cmd() thus hitting the default case. There is a retry logic of upto 200 times (2000 in iavf) with a delay of 10ms (1ms in iavf). This results in a needless delay of 2s in the init phase for each VNIC.

The patch aims to rectify that delay.
In fe2a571c70cc397f2ad4e280f8d084148fea5d62, i40e_ethdev_vf.c was deleted. Hence adding this in iavf_vchnl.c.
***

Vipin P R (1):
Intel iavf: Return in the case of ADD/DEL ETH address

 drivers/net/iavf/iavf_vchnl.c | 8 ++++++++
 1 file changed, 8 insertions(+)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/1 Intel iavf: Return in the case of ADD/DEL ETH address

In case of i40vf, VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are unsupported. i40evf_execute_vf_cmd is invoked with these operations as part of i40evf_set_mc_addr_list()

The cases are not handled in i40evf_execute_vf_cmd() thus hitting the default case. There is a retry logic of upto 200 times (2000 in iavf) with a delay of 10ms (1ms in iavf). This results in a needless delay of 2s in the init phase for each VNIC.

The patch aims to rectify that delay.
In fe2a571c70cc397f2ad4e280f8d084148fea5d62, i40e_ethdev_vf.c was deleted. Hence adding this in iavf_vchnl.c.

---
 drivers/net/iavf/iavf_vchnl.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/iavf/iavf_vchnl.c +8 -0
index f92daf9..e2f65f5 100644
@@ -367,6 +367,14 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
 		}
 		_clear_cmd(vf);
 		break;
+
+    case VIRTCHNL_OP_ADD_ETH_ADDR:
+    case VIRTCHNL_OP_DEL_ETH_ADDR:
+        PMD_DRV_LOG(WARNING, "OP_{ADD/DEL}_ETH_ADDR unsupported");
+        err = 0;
+        _clear_cmd(vf);
+        break;
+
 	default:
 		/* For other virtchnl ops in running time,
 		 * wait for the cmd done flag.
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

Quoted 10 lines · On Fri, 13 Jan 2023 13:19:23 +0000 Vipin P R <[email protected]> wrote:

In case of i40vf, VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are unsupported. i40evf_execute_vf_cmd is invoked with these operations as part of i40evf_set_mc_addr_list()

The cases are not handled in i40evf_execute_vf_cmd() thus hitting the default case. There is a retry logic of upto 200 times (2000 in iavf) with a delay of 10ms (1ms in iavf). This results in a needless delay of 2s in the init phase for each VNIC.

The patch aims to rectify that delay.
In fe2a571c70cc397f2ad4e280f8d084148fea5d62, i40e_ethdev_vf.c was deleted. Hence adding this in iavf_vchnl.c.

Quoted 6 lines
---
 drivers/net/iavf/iavf_vchnl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Please run checkpatch, the DPDK style is to indent with tabs not spaces.

#3 lore raw

RE: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

In reply to Vipin P R
Quoted 14 lines

-----Original Message-----
From: Vipin P R <[email protected]>
Sent: Friday, January 13, 2023 9:19 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Vipin P R <[email protected]>; [email protected]
Subject: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

In case of i40vf, VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are unsupported. i40evf_execute_vf_cmd is invoked with these operations as part of i40evf_set_mc_addr_list()

Quoted 6 lines

The cases are not handled in i40evf_execute_vf_cmd() thus hitting the default case.
There is a retry logic of upto 200 times (2000 in iavf) with a delay of 10ms (1ms in iavf).
This results in a needless delay of 2s in the init phase for each VNIC.

Sorry I didn't get this, why this is related with i40evf? I40evf PMD has been replaced by iavf PMD. The iavf PMD works with both i40e and ice, does this will break ice's usage?

Quoted 34 lines

The patch aims to rectify that delay.
In fe2a571c70cc397f2ad4e280f8d084148fea5d62, i40e_ethdev_vf.c was deleted. Hence adding this in iavf_vchnl.c.

---
 drivers/net/iavf/iavf_vchnl.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/iavf/iavf_vchnl.c index renamed from drivers/net/iavf/iavf_vchnl.c +0 -0

f92daf9..e2f65f5 100644

drivers/net/iavf/iavf_vchnl.c +8 -0
@@ -367,6 +367,14 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter,
 struct iavf_cmd_info *args,
 		}
 		_clear_cmd(vf);
 		break;
+
+    case VIRTCHNL_OP_ADD_ETH_ADDR:
+    case VIRTCHNL_OP_DEL_ETH_ADDR:
+        PMD_DRV_LOG(WARNING, "OP_{ADD/DEL}_ETH_ADDR
 unsupported");
+        err = 0;
+        _clear_cmd(vf);
+        break;
+
 	default:
drivers/net/iavf/iavf_vchnl.c +0 -1
 		/* For other virtchnl ops in running time,
 		 * wait for the cmd done flag.
--

2.7.4

author
#4 lore raw

Re: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

________________________________
From: Zhang, Qi Z <[email protected]>
Sent: 17 January 2023 07:24
To: Vipin P R <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: RE: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

!! External Email

Quoted 12 lines

-----Original Message-----
From: Vipin P R <[email protected]>
Sent: Friday, January 13, 2023 9:19 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Vipin P R <[email protected]>; [email protected]
Subject: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

In case of i40vf, VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are unsupported. i40evf_execute_vf_cmd is invoked with these operations as part of i40evf_set_mc_addr_list()

Quoted 6 lines

The cases are not handled in i40evf_execute_vf_cmd() thus hitting the default case.
There is a retry logic of upto 200 times (2000 in iavf) with a delay of 10ms (1ms in iavf).
This results in a needless delay of 2s in the init phase for each VNIC.

Sorry I didn't get this, why this is related with i40evf? I40evf PMD has been replaced by iavf PMD. The iavf PMD works with both i40e and ice, does this will break ice's usage?

Hi, this is problem was discovered while using i40vf (which was deprecated and replaced by iavf). Upon inspecting the code, this problem would also be hit in iavf, if the VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are not supported.

Quoted 30 lines

The patch aims to rectify that delay.
In fe2a571c70cc397f2ad4e280f8d084148fea5d62, i40e_ethdev_vf.c was deleted. Hence adding this in iavf_vchnl.c.

---
 drivers/net/iavf/iavf_vchnl.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/iavf/iavf_vchnl.c index renamed from drivers/net/iavf/iavf_vchnl.c +0 -0

f92daf9..e2f65f5 100644

drivers/net/iavf/iavf_vchnl.c +8 -0
@@ -367,6 +367,14 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter,
 struct iavf_cmd_info *args,
              }
              _clear_cmd(vf);
              break;
+
+    case VIRTCHNL_OP_ADD_ETH_ADDR:
+    case VIRTCHNL_OP_DEL_ETH_ADDR:
+        PMD_DRV_LOG(WARNING, "OP_{ADD/DEL}_ETH_ADDR
 unsupported");
+        err = 0;
+        _clear_cmd(vf);
+        break;
+
      default:
Quoted 4 lines

/* For other virtchnl ops in running time,
* wait for the cmd done flag.
--
2.7.4

!! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.

#5 lore raw

RE: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

Please always apply text format in mailing list.

Sorry I have to reject this patch, as a device agnostic driver, iavf can't just simply assume kernel PF driver don't support VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR. A better solution is to introduce some VF/PF negotiation during init or learning from runtime.(if get an unsupported error from PF after the first call)

From: Vipin P R <[email protected]>
Sent: Tuesday, February 7, 2023 6:43 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

________________________________________
From: Zhang, Qi Z <mailto:[email protected]>
Sent: 17 January 2023 07:24
To: Vipin P R <mailto:[email protected]>; Wu, Jingjing <mailto:[email protected]>; Xing, Beilei <mailto:[email protected]>
Cc: mailto:[email protected] <mailto:[email protected]>; mailto:[email protected] <mailto:[email protected]>
Subject: RE: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

!! External Email

Quoted 12 lines

-----Original Message-----
From: Vipin P R <mailto:[email protected]>
Sent: Friday, January 13, 2023 9:19 PM
To: Wu, Jingjing <mailto:[email protected]>; Xing, Beilei <mailto:[email protected]>
Cc: mailto:[email protected]; Vipin P R <mailto:[email protected]>; mailto:[email protected]
Subject: [PATCH] Intel iavf: Return in the case of ADD/DEL ETH address

In case of i40vf, VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are unsupported. i40evf_execute_vf_cmd is invoked with these operations as part of i40evf_set_mc_addr_list()

Quoted 6 lines

The cases are not handled in i40evf_execute_vf_cmd() thus hitting the default case.
There is a retry logic of upto 200 times (2000 in iavf) with a delay of 10ms (1ms in iavf).
This results in a needless delay of 2s in the init phase for each VNIC.

Sorry I didn't get this, why this is related with i40evf? I40evf PMD has been replaced by iavf PMD. The iavf PMD works with both i40e and ice, does this will break ice's usage?

Hi, this is problem was discovered while using i40vf (which was deprecated and replaced by iavf). Upon inspecting the code, this problem would also be hit in iavf, if the VIRTCHNL_OP_DEL_ETH_ADDR and VIRTCHNL_OP_ADD_ETH_ADDR are not supported.

Quoted 29 lines

The patch aims to rectify that delay.
In fe2a571c70cc397f2ad4e280f8d084148fea5d62, i40e_ethdev_vf.c was deleted. Hence adding this in iavf_vchnl.c.

---
  drivers/net/iavf/iavf_vchnl.c | 8 ++++++++

  1 file changed, 8 insertions(+)
drivers/net/iavf/iavf_vchnl.c index renamed from drivers/net/iavf/iavf_vchnl.c +0 -0

f92daf9..e2f65f5 100644

drivers/net/iavf/iavf_vchnl.c +8 -0
@@ -367,6 +367,14 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter,
 struct iavf_cmd_info *args,
                }
                _clear_cmd(vf);
                break;
+
+    case VIRTCHNL_OP_ADD_ETH_ADDR:
+    case VIRTCHNL_OP_DEL_ETH_ADDR:
+        PMD_DRV_LOG(WARNING, "OP_{ADD/DEL}_ETH_ADDR
 unsupported");
+        err = 0;
+        _clear_cmd(vf);
+        break;
+
Quoted 5 lines

       default:
               /* For other virtchnl ops in running time,
                * wait for the cmd done flag.
--
2.7.4

!! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.