Skip to contentSkip to conversation

net/iavf: deprecate i40evf pmd

PATCH Superseded Robin Zhang 5 participants 15 messages Mar 2, 2021 – Apr 19, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: deprecate i40evf pmd

Avf PMD was introduced from DPDK 18.02 to promote Intel Adaptive Virtual Function with device ID is 0x1889 aligned with AVF public spec. At the meanwhile, i40evf PMD was co-existed to support other existing device IDs of i40e devices. So on i40e devices, iavf PMD can only run in the VM whose hypervisor has emulated the VF’s device to 0x1889. At that time, linux i40evf kernel driver covers device ID of i40e VF and 0x1889. Start from ice, all the VFs will be AVF, that is to say their device ID is 0x1889.

Currently in i40e VF driver, when one new feature is added, DPDK SW need to maintain two drivers even for one device. Validation team also need to keep the behavior of those two drivers are the same. Meanwhile, container deploy becomes more popular, and device ID cannot be changed as there is no device emulate. So the user in container can only use i40evf PMD on i40e devices, when upgrade to ice devices, driver should be switched to iavf. That will break iavf continuity on i40e devices. Also, one driver would force the developing the interface to be consistent for customers using both i40e, ice and later products.

So, i40evf PMD is no need to maintain, as iavf will be used instead of i40evf.

Impact:
If the customers are using i40evf PMD on Intel 700 series NICs, when they upgrade to latest DPDK SW, they do not need to modify device ID anymore.

---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 drivers/common/iavf/iavf_devids.h    | 3 +++
 drivers/net/i40e/i40e_ethdev_vf.c    | 4 ----
 drivers/net/iavf/iavf_ethdev.c       | 6 ++++++
 4 files changed, 15 insertions(+), 4 deletions(-)
doc/guides/rel_notes/deprecation.rst +6 -0
index 82c1a90a3..069ab04e9 100644
@@ -125,3 +125,9 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain,
+  will use iavf to instead of i40evf in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +3 -0
index 722c2e4f4..5047525fc 100644
@@ -13,5 +13,8 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +0 -4
index 2909b4d89..fe8a86466 100644
@@ -1164,10 +1164,6 @@ i40evf_del_vlan(struct rte_eth_dev *dev, uint16_t vlanid)
 }
 
 static const struct rte_pci_id pci_id_i40evf_map[] = {
-	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF) },
-	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) },
-	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
-	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) },
 	{ .vendor_id = 0, /* sentinel */ },
 };
 
drivers/net/iavf/iavf_ethdev.c +6 -0
index 4d3772202..3f656140e 100644
@@ -127,6 +127,12 @@ static int iavf_set_mc_addr_list(struct rte_eth_dev *dev,
 
 static const struct rte_pci_id pci_id_iavf_map[] = {
 	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF_HV) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF) },
+#ifdef X722_A0_SUPPORT
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
+#endif
 	{ .vendor_id = 0, /* sentinel */ },
 };
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 net/iavf: deprecate i40evf pmd

Avf PMD was introduced from DPDK 18.02 to promote Intel Adaptive Virtual Function with device ID is 0x1889 aligned with AVF public spec. At the meanwhile, i40evf PMD was co-existed to support other existing device IDs of i40e devices. So on i40e devices, iavf PMD can only run in the VM whose hypervisor has emulated the VF’s device to 0x1889. At that time, linux i40evf kernel driver covers device ID of i40e VF and 0x1889. Start from ice, all the VFs will be AVF, that is to say their device ID is 0x1889.

Currently in i40e VF driver, when one new feature is added, DPDK SW need to maintain two drivers even for one device. Validation team also need to keep the behavior of those two drivers are the same. Meanwhile, container deploy becomes more popular, and device ID cannot be changed as there is no device emulate. So the user in container can only use i40evf PMD on i40e devices, when upgrade to ice devices, driver should be switched to iavf. That will break iavf continuity on i40e devices. Also, one driver would force the developing the interface to be consistent for customers using both i40e, ice and later products.

So, i40evf PMD is no need to maintain, as iavf will be used instead of i40evf. Starting from DPDK 21.05, the default VF driver will be iavf.

Impact:
If the customers are using i40evf PMD on Intel 700 series NICs, when they upgrade to latest DPDK SW, they do not need to modify device ID anymore. Meanwhile, before i40evf is deleted officially, i40evf can still be used if users specify the devarg "driver=i40evf".

---
v2:
-change default VF driver to iavf, add devarg "driver=i40evf" so that
i40evf can still be used.

---
 doc/guides/rel_notes/deprecation.rst |  8 +++++
 drivers/common/iavf/iavf_devids.h    |  4 +++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       |  6 ++++
 4 files changed, 63 insertions(+)
doc/guides/rel_notes/deprecation.rst +8 -0
index 64629e0641..63b59bd2fd 100644
@@ -130,3 +130,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +4 -0
index 722c2e4f49..74d84a82e8 100644
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0

60 lines not on this page · raw message

drivers/net/iavf/iavf_ethdev.c +6 -0
index 869c4a1988..e20e07807f 100644
@@ -125,6 +125,12 @@ static int iavf_set_mc_addr_list(struct rte_eth_dev *dev,
 
 static const struct rte_pci_id pci_id_iavf_map[] = {
 	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF_HV) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF) },
+#ifdef X722_A0_SUPPORT
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
+#endif
 	{ .vendor_id = 0, /* sentinel */ },
 };
 
Signature · 1 line
2.25.1
#2 lore raw

PATCH v3 1/1 net/iavf: deprecate i40evf pmd

In reply to Robin Zhang

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  4 ++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 69 +++++++++++++++++++++++++++-
 5 files changed, 130 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst +6 -0
index 529ff4a955..fcea8151bf 100644
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
     assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF device id (0x1889) like
     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.
 
+    Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be IAVF. No new feature
+    will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and 21.11, by using the
+    ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet Controller, for example::
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction" feature which is supported by ice PMD is also
     available for IAVF PMD. The same devargs with the same parameters can be applied to IAVF PMD, for detail please reference
     the section ``Protocol extraction for per queue`` of ice.rst.
doc/guides/rel_notes/deprecation.rst +8 -0
index 64629e0641..63b59bd2fd 100644
@@ -130,3 +130,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +4 -0
index 722c2e4f49..74d84a82e8 100644
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0

60 lines not on this page · raw message

drivers/net/iavf/iavf_ethdev.c +67 -2

90 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

PATCH v4 1/1 net/iavf: deprecate i40evf pmd

In reply to Robin Zhang

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  4 ++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 69 +++++++++++++++++++++++++++-
 5 files changed, 130 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst +6 -0
index 529ff4a955..fcea8151bf 100644
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
     assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF device id (0x1889) like
     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.
 
+    Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be IAVF. No new feature
+    will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and 21.11, by using the
+    ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet Controller, for example::
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction" feature which is supported by ice PMD is also
     available for IAVF PMD. The same devargs with the same parameters can be applied to IAVF PMD, for detail please reference
     the section ``Protocol extraction for per queue`` of ice.rst.
doc/guides/rel_notes/deprecation.rst +8 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +4 -0
index 722c2e4f49..74d84a82e8 100644
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0

60 lines not on this page · raw message

drivers/net/iavf/iavf_ethdev.c +67 -2

90 lines not on this page · raw message

Signature · 1 line
2.25.1
#4 lore raw
Quoted 209 lines

-----Original Message-----
From: Zhang, RobinX <[email protected]>
Sent: Thursday, April 15, 2021 10:05
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [PATCH v4] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  4 ++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 69 +++++++++++++++++++++++++++-
 5 files changed, 130 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst +0 -0
index 529ff4a955..fcea8151bf 100644
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
     assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF

device id (0x1889) like

     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.

+ Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be
IAVF. No new feature
+ will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and
21.11, by using the
+ ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet
Controller, for example::

doc/guides/nics/intel_vf.rst +3 -0
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction" feature which is

supported by ice PMD is also
available for IAVF PMD. The same devargs with the same parameters can be applied to IAVF PMD, for
detail please reference
the section ``Protocol extraction for per queue`` of ice.rst.

doc/guides/rel_notes/deprecation.rst +8 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +4 -0
index 722c2e4f49..74d84a82e8 100644
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0
index 0c9bd8d2c6..509c8f4e37 100644
@@ -1656,9 +1656,53 @@ i40evf_dev_uninit(struct rte_eth_dev *eth_dev)
 	return 0;
 }
 
+static int
+i40evf_check_driver_handler(__rte_unused const char *key,
+			    const char *value, __rte_unused void *opaque)
+{
+	if (strcmp(value, "i40evf"))
+		return -1;
+
+	return 0;
+}
+
+static int
+i40evf_driver_selected(struct rte_devargs *devargs)
+{
+	struct rte_kvargs *kvlist;
+	const char *key = "driver";
+	int ret = 0;
+
+	if (devargs == NULL)
+		return 0;
+
+	kvlist = rte_kvargs_parse(devargs->args, NULL);
+	if (kvlist == NULL)
+		return 0;
+
+	if (!rte_kvargs_count(kvlist, key))
+		goto exit;
+
+	/* i40evf driver selected when there's a key-value pair:
+	 * driver=i40evf
+	 */
+	if (rte_kvargs_process(kvlist, key,
+			       i40evf_check_driver_handler, NULL) < 0)
+		goto exit;
+
+	ret = 1;
+
+exit:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 static int eth_i40evf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct rte_pci_device *pci_dev)
 {
+	if (!i40evf_driver_selected(pci_dev->device.devargs))
+		return 1;
+
 	return rte_eth_dev_pci_generic_probe(pci_dev,
 		sizeof(struct i40e_adapter), i40evf_dev_init);
 }
@@ -1681,6 +1725,7 @@ static struct rte_pci_driver rte_i40evf_pmd = {
 RTE_PMD_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_i40e_vf, pci_id_i40evf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_i40e_vf, "* igb_uio | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_i40e_vf, "driver=i40evf");
 
 static int
 i40evf_dev_configure(struct rte_eth_dev *dev)
drivers/net/iavf/iavf_ethdev.c +29 -0
index 51cad48069..00179a736c 100644
@@ -125,6 +125,12 @@ static int iavf_set_mc_addr_list(struct rte_eth_dev *dev,
 
 static const struct rte_pci_id pci_id_iavf_map[] = {
 	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF_HV) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF) },
+#ifdef X722_A0_SUPPORT
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
+#endif
 	{ .vendor_id = 0, /* sentinel */ },
 };
 
@@ -2323,10 +2329,69 @@ iavf_dcf_cap_selected(struct rte_devargs *devargs)
 	return ret;
 }
 
+static int
+iavf_is_i40evf_device_id(uint16_t id)
+{
+	if (id == IAVF_DEV_ID_VF ||
+	    id == IAVF_DEV_ID_VF_HV ||
+	    id == IAVF_DEV_ID_X722_VF)
+		return 1;
+
+#ifdef X722_A0_SUPPORT
+	if (id == I40E_DEV_ID_X722_A0_VF)
+		return 1;
+#endif
+
+	return 0;
+}
+
+static int
+iavf_drv_i40evf_check_handler(__rte_unused const char *key,
+			      const char *value, __rte_unused void *opaque)
+{
+	if (strcmp(value, "i40evf"))
+		return -1;
+

drivers/net/iavf/iavf_ethdev.c iavf_dcf_cap_selected(struct rte_devargs *devargs) · line 2364

Quoted 10 lines
drivers/net/iavf/iavf_ethdev.c +10 -0
+	return 0;
+}
+
+static int
+iavf_drv_i40evf_selected(struct rte_devargs *devargs)
+{
+	struct rte_kvargs *kvlist;
+	const char *key = "driver";
+	int ret = 0;
+

Put the i40evf PCI device check here, then code will be simple, and the design will be clear, I think. ;-)

	if (id != IAVF_DEV_ID_VF &&
	    id != IAVF_DEV_ID_VF_HV &&
#ifdef X722_A0_SUPPORT
	    id != I40E_DEV_ID_X722_A0_VF &&
#endif
	    id != IAVF_DEV_ID_X722_VF)
			return 0;
Quoted 21 lines
drivers/net/iavf/iavf_ethdev.c +21 -0
+	if (devargs == NULL)
+		return 0;
+
+	kvlist = rte_kvargs_parse(devargs->args, NULL);
+	if (kvlist == NULL)
+		return 0;
+
+	if (!rte_kvargs_count(kvlist, key))
+		goto exit;
+
+	/* i40evf driver selected when there's a key-value pair:
+	 * driver=i40evf
+	 */
+	if (rte_kvargs_process(kvlist, key,
+			       iavf_drv_i40evf_check_handler, NULL) < 0)
+		goto exit;
+
+	ret = 1;
+
+exit:
+	rte_kvargs_free(kvlist);

drivers/net/iavf/iavf_ethdev.c iavf_dcf_cap_selected(struct rte_devargs *devargs) · line 2394

Quoted 10 lines
drivers/net/iavf/iavf_ethdev.c +6 -1
+	return ret;
+}
+
 static int eth_iavf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			     struct rte_pci_device *pci_dev)
 {
-	if (iavf_dcf_cap_selected(pci_dev->device.devargs))
+	if (iavf_dcf_cap_selected(pci_dev->device.devargs) ||
+	    (iavf_is_i40evf_device_id(pci_dev->id.device_id) &&
+	     iavf_drv_i40evf_selected(pci_dev->device.devargs)))

We can merge 'iavf_is_i40evf_device_id' into 'iavf_drv_i40evf_selected', then the check code will be simple.

Quoted 14 lines
drivers/net/iavf/iavf_ethdev.c +1 -2
 		return 1;
 
 	return rte_eth_dev_pci_generic_probe(pci_dev,
@@ -2349,7 +2414,7 @@ static struct rte_pci_driver rte_iavf_pmd = {
 RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
-RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf");
+RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf driver=i40evf");
 RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
 RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
--

2.25.1

#5 lore raw
In reply to Robin Zhang
Quoted 102 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Thursday, April 15, 2021 10:05 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  4 ++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 69 +++++++++++++++++++++++++++-
 5 files changed, 130 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst index renamed from doc/guides/nics/intel_vf.rst +0 -0

529ff4a955..fcea8151bf 100644

doc/guides/nics/intel_vf.rst +0 -0
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following

documents:
assignment in hypervisor. Take qemu for example, the device assignment
should carry the IAVF device id (0x1889) like

     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.

+ Starting from DPDK 21.05, the default VF driver for Intel® 700 Series
Ethernet Controller will be IAVF. No new feature
+ will be added into i40evf except bug fix until it's removed in DPDK 21.11.
Between DPDK 21.05 and 21.11, by using the
+ ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on
Intel® 700 Series Ethernet Controller, for example::

doc/guides/nics/intel_vf.rst +3 -0
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction"

feature which is supported by ice PMD is also
available for IAVF PMD. The same devargs with the same parameters can
be applied to IAVF PMD, for detail please reference
the section ``Protocol extraction for per queue`` of ice.rst.

doc/guides/rel_notes/deprecation.rst +0 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide

platform-specific
content. On Linux and FreeBSD, supported prior to DPDK 20.11, original structure will be kept until DPDK 21.11.

doc/guides/rel_notes/deprecation.rst +4 -0
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them
+are
+  duplicated. And now more and more advanced features are developed on

iavf.

doc/guides/rel_notes/deprecation.rst +2 -0
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to

maintain.

doc/guides/rel_notes/deprecation.rst +5 -0
+  Starting from 21.05, the default VF driver of i40e will be iavf, but
+i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf
+will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +0 -0
index 722c2e4f49..74d84a82e8 100644

drivers/common/iavf/iavf_devids.h line 18

Quoted 6 lines
drivers/common/iavf/iavf_devids.h +3 -0
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif

Do we really need this #ifdef?

Can we remove all of them in AVF driver?

#6 lore raw

PATCH v5 1/1 net/iavf: deprecate i40evf pmd

In reply to Robin Zhang

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v5:
- refine code of check device id

v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  4 ++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 61 +++++++++++++++++++++++++++-
 5 files changed, 122 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst +6 -0
index 529ff4a955..fcea8151bf 100644
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
     assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF device id (0x1889) like
     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.
 
+    Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be IAVF. No new feature
+    will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and 21.11, by using the
+    ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet Controller, for example::
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction" feature which is supported by ice PMD is also
     available for IAVF PMD. The same devargs with the same parameters can be applied to IAVF PMD, for detail please reference
     the section ``Protocol extraction for per queue`` of ice.rst.
doc/guides/rel_notes/deprecation.rst +8 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +4 -0
index 722c2e4f49..74d84a82e8 100644
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0

60 lines not on this page · raw message

drivers/net/iavf/iavf_ethdev.c +59 -2

82 lines not on this page · raw message

Signature · 1 line
2.25.1
#7 lore raw
Quoted 105 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Thursday, April 15, 2021 6:35 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH v5] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v5:
- refine code of check device id

v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  4 ++
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 61 +++++++++++++++++++++++++++-
 5 files changed, 122 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst index renamed from doc/guides/nics/intel_vf.rst +0 -0

529ff4a955..fcea8151bf 100644

doc/guides/nics/intel_vf.rst +0 -0
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following

documents:
assignment in hypervisor. Take qemu for example, the device assignment
should carry the IAVF device id (0x1889) like

     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.

+ Starting from DPDK 21.05, the default VF driver for Intel® 700 Series
Ethernet Controller will be IAVF. No new feature
+ will be added into i40evf except bug fix until it's removed in DPDK 21.11.
Between DPDK 21.05 and 21.11, by using the
+ ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on
Intel® 700 Series Ethernet Controller, for example::

doc/guides/nics/intel_vf.rst +3 -0
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction"

feature which is supported by ice PMD is also
available for IAVF PMD. The same devargs with the same parameters can
be applied to IAVF PMD, for detail please reference
the section ``Protocol extraction for per queue`` of ice.rst.

doc/guides/rel_notes/deprecation.rst +0 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide

platform-specific
content. On Linux and FreeBSD, supported prior to DPDK 20.11, original structure will be kept until DPDK 21.11.

doc/guides/rel_notes/deprecation.rst +4 -0
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them
+are
+  duplicated. And now more and more advanced features are developed on

iavf.

doc/guides/rel_notes/deprecation.rst +2 -0
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to

maintain.

doc/guides/rel_notes/deprecation.rst +5 -0
+  Starting from 21.05, the default VF driver of i40e will be iavf, but
+i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf
+will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +0 -0
index 722c2e4f49..74d84a82e8 100644

drivers/common/iavf/iavf_devids.h line 19

Quoted 7 lines
drivers/common/iavf/iavf_devids.h +4 -0
@@ -13,5 +13,9 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#ifdef X722_A0_SUPPORT
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+#endif
+

Can we remove #ifdef

Quoted 73 lines
drivers/common/iavf/iavf_devids.h +0 -0
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +43 -0
index 0c9bd8d2c6..509c8f4e37 100644
@@ -1656,9 +1656,53 @@ i40evf_dev_uninit(struct rte_eth_dev *eth_dev)
 	return 0;
 }
 
+static int
+i40evf_check_driver_handler(__rte_unused const char *key,
+			    const char *value, __rte_unused void *opaque) {
+	if (strcmp(value, "i40evf"))
+		return -1;
+
+	return 0;
+}
+
+static int
+i40evf_driver_selected(struct rte_devargs *devargs) {
+	struct rte_kvargs *kvlist;
+	const char *key = "driver";
+	int ret = 0;
+
+	if (devargs == NULL)
+		return 0;
+
+	kvlist = rte_kvargs_parse(devargs->args, NULL);
+	if (kvlist == NULL)
+		return 0;
+
+	if (!rte_kvargs_count(kvlist, key))
+		goto exit;
+
+	/* i40evf driver selected when there's a key-value pair:
+	 * driver=i40evf
+	 */
+	if (rte_kvargs_process(kvlist, key,
+			       i40evf_check_driver_handler, NULL) < 0)
+		goto exit;
+
+	ret = 1;
+
+exit:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 static int eth_i40evf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct rte_pci_device *pci_dev)
 {
+	if (!i40evf_driver_selected(pci_dev->device.devargs))
+		return 1;
+
 	return rte_eth_dev_pci_generic_probe(pci_dev,
 		sizeof(struct i40e_adapter), i40evf_dev_init);  } @@ -1681,6
+1725,7 @@ static struct rte_pci_driver rte_i40evf_pmd =
 {  RTE_PMD_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd);

RTE_PMD_REGISTER_PCI_TABLE(net_i40e_vf, pci_id_i40evf_map); RTE_PMD_REGISTER_KMOD_DEP(net_i40e_vf, "* igb_uio | vfio-pci"); +RTE_PMD_REGISTER_PARAM_STRING(net_i40e_vf, "driver=i40evf");

static int
i40evf_dev_configure(struct rte_eth_dev *dev) diff --git
a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 51cad48069..77788a2a51 100644

drivers/net/iavf/iavf_ethdev.c +0 -0
@@ -125,6 +125,12 @@ static int iavf_set_mc_addr_list(struct rte_eth_dev
 *dev,
 

drivers/net/iavf/iavf_ethdev.c static int iavf_set_mc_addr_list(struct rte_eth_dev · line 136

Quoted 10 lines
drivers/net/iavf/iavf_ethdev.c +6 -0
 static const struct rte_pci_id pci_id_iavf_map[] = {
 	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID,
 IAVF_DEV_ID_ADAPTIVE_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF_HV) },
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF) },
 #ifdef
+X722_A0_SUPPORT
+	{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
+#endif

Can we remove #ifdef ?

Quoted 18 lines
drivers/net/iavf/iavf_ethdev.c +10 -0
 	{ .vendor_id = 0, /* sentinel */ },
 };
@@ -2323,10 +2329,61 @@ iavf_dcf_cap_selected(struct rte_devargs
 *devargs)
 	return ret;
 }
 
+static int
+iavf_drv_i40evf_check_handler(__rte_unused const char *key,
+			      const char *value, __rte_unused void *opaque) {
+	if (strcmp(value, "i40evf"))
+		return -1;
+
+	return 0;
+}
+
+static int

drivers/net/iavf/iavf_ethdev.c iavf_dcf_cap_selected(struct rte_devargs · line 2352

Quoted 10 lines
drivers/net/iavf/iavf_ethdev.c +10 -0
+iavf_drv_i40evf_selected(struct rte_devargs *devargs, uint16_t
+device_id) {
+	struct rte_kvargs *kvlist;
+	const char *key = "driver";
+	int ret = 0;
+
+	if (device_id != IAVF_DEV_ID_VF &&
+	    device_id != IAVF_DEV_ID_VF_HV &&
+#ifdef X722_A0_SUPPORT
+	    device_id != I40E_DEV_ID_X722_A0_VF && #endif

Can we remove #ifdef ?

Quoted 47 lines
drivers/net/iavf/iavf_ethdev.c +31 -2
+	    device_id != IAVF_DEV_ID_X722_VF)
+		return 0;
+
+	if (devargs == NULL)
+		return 0;
+
+	kvlist = rte_kvargs_parse(devargs->args, NULL);
+	if (kvlist == NULL)
+		return 0;
+
+	if (!rte_kvargs_count(kvlist, key))
+		goto exit;
+
+	/* i40evf driver selected when there's a key-value pair:
+	 * driver=i40evf
+	 */
+	if (rte_kvargs_process(kvlist, key,
+			       iavf_drv_i40evf_check_handler, NULL) < 0)
+		goto exit;
+
+	ret = 1;
+
+exit:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 static int eth_iavf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			     struct rte_pci_device *pci_dev)  {
-	if (iavf_dcf_cap_selected(pci_dev->device.devargs))
+	if (iavf_dcf_cap_selected(pci_dev->device.devargs) ||
+	    iavf_drv_i40evf_selected(pci_dev->device.devargs,
+				     pci_dev->id.device_id))
 		return 1;
 
 	return rte_eth_dev_pci_generic_probe(pci_dev,
@@ -2349,7 +2406,7 @@ static struct rte_pci_driver rte_iavf_pmd =
 {  RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
-RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf");
+RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf driver=i40evf");
 RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);

RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE); #ifdef RTE_ETHDEV_DEBUG_RX
--
2.25.1

#8 lore raw

PATCH v6 1/1 net/iavf: deprecate i40evf pmd

In reply to Robin Zhang

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v6:
- remove unnecessary ifdef in iavf.

v5:
- refine code of check device id.

v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  2 +
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 57 +++++++++++++++++++++++++++-
 5 files changed, 116 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst +6 -0
index 529ff4a955..fcea8151bf 100644
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
     assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF device id (0x1889) like
     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.
 
+    Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be IAVF. No new feature
+    will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and 21.11, by using the
+    ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet Controller, for example::
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction" feature which is supported by ice PMD is also
     available for IAVF PMD. The same devargs with the same parameters can be applied to IAVF PMD, for detail please reference
     the section ``Protocol extraction for per queue`` of ice.rst.
doc/guides/rel_notes/deprecation.rst +8 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +2 -0
index 722c2e4f49..b0d48b0582 100644
@@ -13,5 +13,7 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#define I40E_DEV_ID_X722_A0_VF          0x374D
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0

60 lines not on this page · raw message

drivers/net/iavf/iavf_ethdev.c +55 -2

78 lines not on this page · raw message

Signature · 1 line
2.25.1
Acked-by on v6 1/1 Applied
#9 lore raw
Quoted 23 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Friday, April 16, 2021 9:58 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH v6] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Quoted 7 lines

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

Applied to dpdk-next-net-intel.

Thanks
Qi

Acked-by
#10 lore raw
Quoted 26 lines · Qi Z
Quoted 26 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Robin Zhang
Sent: Friday, April 16, 2021 9:58 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [dpdk-dev] [PATCH v6] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Quoted 7 lines
Quoted 4 lines

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

Hi Qi, Robin,

Lgtm, hence:

But we need 3 acks for a deprecation notice to merge it.

#11 lore raw
In reply to Robin Zhang
Quoted 107 lines

-----Original Message-----
From: Zhang, RobinX <[email protected]>
Sent: Friday, April 16, 2021 9:58 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>
Subject: [PATCH v6] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v6:
- remove unnecessary ifdef in iavf.

v5:
- refine code of check device id.

v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  2 +
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 57 +++++++++++++++++++++++++++-
 5 files changed, 116 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst index renamed from doc/guides/nics/intel_vf.rst +0 -0

529ff4a955..fcea8151bf 100644

doc/guides/nics/intel_vf.rst +0 -0
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following

documents:
assignment in hypervisor. Take qemu for example, the device assignment
should carry the IAVF device id (0x1889) like

     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.

+ Starting from DPDK 21.05, the default VF driver for Intel® 700 Series
Ethernet Controller will be IAVF. No new feature
+ will be added into i40evf except bug fix until it's removed in DPDK 21.11.
Between DPDK 21.05 and 21.11, by using the
+ ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel®
700 Series Ethernet Controller, for example::

doc/guides/nics/intel_vf.rst +3 -0
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction"

feature which is supported by ice PMD is also
available for IAVF PMD. The same devargs with the same parameters can be
applied to IAVF PMD, for detail please reference
the section ``Protocol extraction for per queue`` of ice.rst.

doc/guides/rel_notes/deprecation.rst +4 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them
+are
+  duplicated. And now more and more advanced features are developed on

iavf.

doc/guides/rel_notes/deprecation.rst +2 -0
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to

maintain.

doc/guides/rel_notes/deprecation.rst +5 -0
+  Starting from 21.05, the default VF driver of i40e will be iavf, but
+i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf
+will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +0 -0
index 722c2e4f49..b0d48b0582 100644

drivers/common/iavf/iavf_devids.h line 16

Quoted 4 lines
drivers/common/iavf/iavf_devids.h +1 -0
@@ -13,5 +13,7 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#define I40E_DEV_ID_X722_A0_VF          0x374D

Why not IAVF_DEV_ID_X722_A0_VF here?

#12 lore raw

PATCH v7 1/1 net/iavf: deprecate i40evf pmd

In reply to Robin Zhang

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

---
v7:
- correct the device id macro name of X722_A0_VF.

v6:
- remove unnecessary ifdef in iavf.

v5:
- refine code of check device id.

v4:
- rebase code.

v3:
- skip probe if devargs contain "driver=i40evf" in iavf.
- update intel_vf.rst for the new devargs.

v2:
- change default VF driver to iavf, add devarg "driver=i40evf" so that i40evf can still be used.

---
 doc/guides/nics/intel_vf.rst         |  6 +++
 doc/guides/rel_notes/deprecation.rst |  8 ++++
 drivers/common/iavf/iavf_devids.h    |  2 +
 drivers/net/i40e/i40e_ethdev_vf.c    | 45 ++++++++++++++++++++++
 drivers/net/iavf/iavf_ethdev.c       | 57 +++++++++++++++++++++++++++-
 5 files changed, 116 insertions(+), 2 deletions(-)
doc/guides/nics/intel_vf.rst +6 -0
index 529ff4a955..fcea8151bf 100644
@@ -88,6 +88,12 @@ For more detail on SR-IOV, please refer to the following documents:
     assignment in hypervisor. Take qemu for example, the device assignment should carry the IAVF device id (0x1889) like
     ``-device vfio-pci,x-pci-device-id=0x1889,host=03:0a.0``.
 
+    Starting from DPDK 21.05, the default VF driver for Intel® 700 Series Ethernet Controller will be IAVF. No new feature
+    will be added into i40evf except bug fix until it's removed in DPDK 21.11. Between DPDK 21.05 and 21.11, by using the
+    ``devargs`` option ``driver=i40evf``, i40evf PMD still can be used on Intel® 700 Series Ethernet Controller, for example::
+
+    -a 81:02.0,driver=i40evf
+
     When IAVF is backed by an Intel® E810 device, the "Protocol Extraction" feature which is supported by ice PMD is also
     available for IAVF PMD. The same devargs with the same parameters can be applied to IAVF PMD, for detail please reference
     the section ``Protocol extraction for per queue`` of ice.rst.
doc/guides/rel_notes/deprecation.rst +8 -0
index 2afc84c396..05ef276b21 100644
@@ -139,3 +139,11 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* i40e: As there are both i40evf and iavf pmd, the functions of them are
+  duplicated. And now more and more advanced features are developed on iavf.
+  To keep consistent with kernel driver's name
+  (https://patchwork.ozlabs.org/patch/970154/), i40evf is no need to maintain.
+  Starting from 21.05, the default VF driver of i40e will be iavf, but i40evf
+  can still be used if users specify the devarg "driver=i40evf". I40evf will
+  be deleted in DPDK 21.11.
drivers/common/iavf/iavf_devids.h +2 -0
index 722c2e4f49..0f98375a09 100644
@@ -13,5 +13,7 @@
 #define IAVF_DEV_ID_VF_HV		0x1571
 #define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
 #define IAVF_DEV_ID_X722_VF		0x37CD
+#define IAVF_DEV_ID_X722_A0_VF          0x374D
+
 
 #endif /* _IAVF_DEVIDS_H_ */
drivers/net/i40e/i40e_ethdev_vf.c +45 -0

60 lines not on this page · raw message

drivers/net/iavf/iavf_ethdev.c +55 -2

78 lines not on this page · raw message

Signature · 1 line
2.25.1
Acked-by on v7 1/1
#13 lore raw
Quoted 27 lines

-----Original Message-----
From: Zhang, RobinX <[email protected]>
Sent: Monday, April 19, 2021 11:06 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>; Zhang, Qi Z <[email protected]>; Yigit, Ferruh <[email protected]>
Subject: [PATCH v7] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK 21.11

Quoted 6 lines

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

Applied
#14 lore raw
Quoted 43 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Monday, April 19, 2021 4:32 PM
To: Zhang, RobinX <[email protected]>; [email protected]
Cc: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, Qi Z <[email protected]>; Yigit, Ferruh <[email protected]>
Subject: RE: [PATCH v7] net/iavf: deprecate i40evf pmd

Quoted 28 lines

-----Original Message-----
From: Zhang, RobinX <[email protected]>
Sent: Monday, April 19, 2021 11:06 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; [email protected]; [email protected]; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Zhang, RobinX <[email protected]>; Zhang, Qi Z <[email protected]>; Yigit, Ferruh <[email protected]>
Subject: [PATCH v7] net/iavf: deprecate i40evf pmd

The i40evf PMD will be deprecated, iavf will be the only VF driver for Intel 700 serial (i40e) NIC family. To reach this, there will be 2 steps:

Step 1: iavf will be the default VF driver, while i40evf still can be selected by
devarg: "driver=i40evf".
This is covered by this patch, which include:
1) add all 700 serial NIC VF device ID into iavf PMD
2) skip probe if devargs contain "driver=i40evf" in iavf
3) continue probe if devargs contain "driver=i40evf" in i40evf

Step 2: i40evf and related devarg are removed, this will happen at DPDK
21.11

Quoted 8 lines
Quoted 6 lines

Between step 1 and step 2, no new feature will be added into i40evf except bug fix.

Applied to dpdk-next-net-intel.

Thanks
Qi