drivers/net: remove alias for virtual devices
Checks
Commit Message
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
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.
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.
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.
>
>
>
>
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
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.
@@ -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> "
@@ -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> "
@@ -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);
@@ -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> "
@@ -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> ");
@@ -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> "
@@ -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)");
@@ -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,
@@ -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> "
@@ -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> "
@@ -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> "