drivers/net: remove alias for virtual devices

Message ID 20220921133451.4164506-1-ferruh.yigit@amd.com (mailing list archive)
State Rejected, archived
Delegated to: Andrew Rybchenko
Headers
Series drivers/net: remove alias for virtual devices |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing fail Testing issues
ci/github-robot: build fail github build: failed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/intel-Testing fail Testing issues

Commit Message

Ferruh Yigit Sept. 21, 2022, 1:34 p.m. UTC
  Virtual devices are probed/matched based on name, and this name is user
facing value, since device name is provided by user as eal '--vdev'
parameter, like:
`dpdk-testpmd --vdev net_null0`.

The current name format is 'net_<pmd_name>', but previously it was
'eth_<pmd_name>', and an alias to legacy naming format was introduced
for backward compatibility.
Commit 9fa80cb26bd0 ("net: register aliases for renamed vdev drivers")

Since new device name format is around for 6 years, removing alias for
legacy naming.

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Alias for device name is used by other device abstraction layers too,
('crypto', 'baseband', 'raw'), since I am not aware of their maturity
level, leaving them out in this patch.
---
 drivers/net/af_packet/rte_eth_af_packet.c | 1 -
 drivers/net/bonding/rte_eth_bond_pmd.c    | 1 -
 drivers/net/mvpp2/mrvl_ethdev.c           | 1 -
 drivers/net/null/rte_eth_null.c           | 1 -
 drivers/net/octeontx/octeontx_ethdev.c    | 1 -
 drivers/net/pcap/pcap_ethdev.c            | 1 -
 drivers/net/ring/rte_eth_ring.c           | 1 -
 drivers/net/tap/rte_eth_tap.c             | 1 -
 drivers/net/vdev_netvsc/vdev_netvsc.c     | 1 -
 drivers/net/vhost/rte_eth_vhost.c         | 1 -
 drivers/net/virtio/virtio_user_ethdev.c   | 1 -
 11 files changed, 11 deletions(-)
  

Comments

Thomas Monjalon Sept. 21, 2022, 2:26 p.m. UTC | #1
I think this patch requires a techboard vote
as it is dropping some user-facing naming.


21/09/2022 15:34, Ferruh Yigit:
> Virtual devices are probed/matched based on name, and this name is user
> facing value, since device name is provided by user as eal '--vdev'
> parameter, like:
> `dpdk-testpmd --vdev net_null0`.
> 
> The current name format is 'net_<pmd_name>', but previously it was
> 'eth_<pmd_name>', and an alias to legacy naming format was introduced
> for backward compatibility.
> Commit 9fa80cb26bd0 ("net: register aliases for renamed vdev drivers")
> 
> Since new device name format is around for 6 years, removing alias for
> legacy naming.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
> ---
> Alias for device name is used by other device abstraction layers too,
> ('crypto', 'baseband', 'raw'), since I am not aware of their maturity
> level, leaving them out in this patch.
  
Ferruh Yigit Sept. 21, 2022, 2:43 p.m. UTC | #2
On 9/21/2022 3:26 PM, Thomas Monjalon wrote:

> 
> 21/09/2022 15:34, Ferruh Yigit:
>> Virtual devices are probed/matched based on name, and this name is user
>> facing value, since device name is provided by user as eal '--vdev'
>> parameter, like:
>> `dpdk-testpmd --vdev net_null0`.
>>
>> The current name format is 'net_<pmd_name>', but previously it was
>> 'eth_<pmd_name>', and an alias to legacy naming format was introduced
>> for backward compatibility.
>> Commit 9fa80cb26bd0 ("net: register aliases for renamed vdev drivers")
>>
>> Since new device name format is around for 6 years, removing alias for
>> legacy naming.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>> ---
>> Alias for device name is used by other device abstraction layers too,
>> ('crypto', 'baseband', 'raw'), since I am not aware of their maturity
>> level, leaving them out in this patch.
> 
> I think this patch requires a techboard vote
> as it is dropping some user-facing naming.
> 

ack, can you please take this to techboard agenda.
  
Bruce Richardson Sept. 21, 2022, 2:49 p.m. UTC | #3
On Wed, Sep 21, 2022 at 04:26:11PM +0200, Thomas Monjalon wrote:
> I think this patch requires a techboard vote
> as it is dropping some user-facing naming.
> 
+1
I personally am a little uncertain about dropping this support. It could be
widely used, still, and removing it doesn't save us a huge amount.

What would be better might be to:
* automatically add the eth-to-net aliases at a higher level so it is all
  in one place, rather than having it in each driver.
* once centralised, we can add a warning on use of the eth_ aliases to
  inform users that they should use "net" instead.
> 
> 21/09/2022 15:34, Ferruh Yigit:
> > Virtual devices are probed/matched based on name, and this name is user
> > facing value, since device name is provided by user as eal '--vdev'
> > parameter, like:
> > `dpdk-testpmd --vdev net_null0`.
> > 
> > The current name format is 'net_<pmd_name>', but previously it was
> > 'eth_<pmd_name>', and an alias to legacy naming format was introduced
> > for backward compatibility.
> > Commit 9fa80cb26bd0 ("net: register aliases for renamed vdev drivers")
> > 
> > Since new device name format is around for 6 years, removing alias for
> > legacy naming.
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > ---
> > Alias for device name is used by other device abstraction layers too,
> > ('crypto', 'baseband', 'raw'), since I am not aware of their maturity
> > level, leaving them out in this patch.
> 
> 
> 
>
  
Bruce Richardson Oct. 19, 2022, 1:13 p.m. UTC | #4
On Wed, Sep 21, 2022 at 04:26:11PM +0200, Thomas Monjalon wrote:
> I think this patch requires a techboard vote
> as it is dropping some user-facing naming.
> 
I think a better solution is to centralize the use of aliases. I've just
posted a patch to this thread to add the aliasing for net drivers to the
vdev bus driver. While it does imply a certain amount of abstraction
"leakage", it does make the use of aliases consistent and saves it being
spread across multiple driver files.

Thoughts?

/Bruce
  
Andrew Rybchenko Nov. 6, 2022, 10:43 a.m. UTC | #5
On 10/19/22 16:13, Bruce Richardson wrote:
> On Wed, Sep 21, 2022 at 04:26:11PM +0200, Thomas Monjalon wrote:
>> I think this patch requires a techboard vote
>> as it is dropping some user-facing naming.
>>
> I think a better solution is to centralize the use of aliases. I've just
> posted a patch to this thread to add the aliasing for net drivers to the
> vdev bus driver. While it does imply a certain amount of abstraction
> "leakage", it does make the use of aliases consistent and saves it being
> spread across multiple driver files.
> 
> Thoughts?
> 
> /Bruce

Removal is declined by techboard. So, I'm marking the patch as
Rejected.

However, moving allies to common code, as suggested by Bruce,
should be considered.
  

Patch

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 1396f32c3dcc..46baf108aa9b 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -1128,7 +1128,6 @@  static struct rte_vdev_driver pmd_af_packet_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_af_packet, pmd_af_packet_drv);
-RTE_PMD_REGISTER_ALIAS(net_af_packet, eth_af_packet);
 RTE_PMD_REGISTER_PARAM_STRING(net_af_packet,
 	"iface=<string> "
 	"qpairs=<int> "
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3191158ca785..ad54e11f80f4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3912,7 +3912,6 @@  struct rte_vdev_driver pmd_bond_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_bonding, pmd_bond_drv);
-RTE_PMD_REGISTER_ALIAS(net_bonding, eth_bond);
 
 RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
 	"slave=<ifc> "
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 735efb6cfc06..590e5e89220a 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -3314,5 +3314,4 @@  static struct rte_vdev_driver pmd_mrvl_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
-RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
 RTE_LOG_REGISTER_DEFAULT(mrvl_logtype, NOTICE);
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index bb89c1abc4a2..2536d4b8f278 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -746,7 +746,6 @@  static struct rte_vdev_driver pmd_null_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_null, pmd_null_drv);
-RTE_PMD_REGISTER_ALIAS(net_null, eth_null);
 RTE_PMD_REGISTER_PARAM_STRING(net_null,
 	"size=<int> "
 	"copy=<int> "
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 290e562126a4..743ac408cba7 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1885,5 +1885,4 @@  static struct rte_vdev_driver octeontx_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(OCTEONTX_PMD, octeontx_pmd_drv);
-RTE_PMD_REGISTER_ALIAS(OCTEONTX_PMD, eth_octeontx);
 RTE_PMD_REGISTER_PARAM_STRING(OCTEONTX_PMD, "nr_port=<int> ");
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index ec29fd6bc53c..8cc49e14ca8d 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -1643,7 +1643,6 @@  static struct rte_vdev_driver pmd_pcap_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_pcap, pmd_pcap_drv);
-RTE_PMD_REGISTER_ALIAS(net_pcap, eth_pcap);
 RTE_PMD_REGISTER_PARAM_STRING(net_pcap,
 	ETH_PCAP_RX_PCAP_ARG "=<string> "
 	ETH_PCAP_TX_PCAP_ARG "=<string> "
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index cfb81da5fe16..8ccca9db1935 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -772,6 +772,5 @@  static struct rte_vdev_driver pmd_ring_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_ring, pmd_ring_drv);
-RTE_PMD_REGISTER_ALIAS(net_ring, eth_ring);
 RTE_PMD_REGISTER_PARAM_STRING(net_ring,
 	ETH_RING_NUMA_NODE_ACTION_ARG "=name:node:action(ATTACH|CREATE)");
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 9e1032fe7269..b05ff227d381 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2638,7 +2638,6 @@  static struct rte_vdev_driver pmd_tap_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_tap, pmd_tap_drv);
 RTE_PMD_REGISTER_VDEV(net_tun, pmd_tun_drv);
-RTE_PMD_REGISTER_ALIAS(net_tap, eth_tap);
 RTE_PMD_REGISTER_PARAM_STRING(net_tun,
 			      ETH_TAP_IFACE_ARG "=<string> ");
 RTE_PMD_REGISTER_PARAM_STRING(net_tap,
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 25871951685c..89ac58e153c0 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -764,7 +764,6 @@  static struct rte_vdev_driver vdev_netvsc_vdev = {
 };
 
 RTE_PMD_REGISTER_VDEV(VDEV_NETVSC_DRIVER, vdev_netvsc_vdev);
-RTE_PMD_REGISTER_ALIAS(VDEV_NETVSC_DRIVER, eth_vdev_netvsc);
 RTE_PMD_REGISTER_PARAM_STRING(net_vdev_netvsc,
 			      VDEV_NETVSC_ARG_IFACE "=<string> "
 			      VDEV_NETVSC_ARG_MAC "=<string> "
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 7e512d94bf99..8eb937f91785 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1777,7 +1777,6 @@  static struct rte_vdev_driver pmd_vhost_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_vhost, pmd_vhost_drv);
-RTE_PMD_REGISTER_ALIAS(net_vhost, eth_vhost);
 RTE_PMD_REGISTER_PARAM_STRING(net_vhost,
 	"iface=<ifc> "
 	"queues=<int> "
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index a7d7063c2a88..8f93ed01e45a 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -775,7 +775,6 @@  static struct rte_vdev_driver virtio_user_driver = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_virtio_user, virtio_user_driver);
-RTE_PMD_REGISTER_ALIAS(net_virtio_user, virtio_user);
 RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user,
 	"path=<path> "
 	"mac=<mac addr> "