[0/9] redundant rte_vdev_driver declarations
mbox series

Message ID 20190711200309.6134-1-stephen@networkplumber.org
Headers show
Series
  • redundant rte_vdev_driver declarations
Related show

Message

Stephen Hemminger July 11, 2019, 8:03 p.m. UTC
Many drivers declare the local rte_vdev_driver structure
multiple times.  This is unnecessary.

Surprised it is so common, I guess everyone copies the same code.

Stephen Hemminger (9):
  net/tap: remove redundant declarations
  net/af_packet: remove redundant rte_vdev_driver declaration
  net/vhost: remove redundant rte_vdev_driver declaration
  net/null: remove redundant rte_vdev_driver declaration
  net/pcap: remove redundant rte_vdev_driver declaration
  net/ring: remove redundant rte_vdev_drive declaration
  net/virtio_user: remove redundant rte_vdev_driver declaration
  raw/skeleton_rawdev: remove redundant rte_vdev_driver declaration
  raw/dpaa2_cmif: remove redundant rte_vdev_driver declaration

 drivers/net/af_packet/rte_eth_af_packet.c     | 2 --
 drivers/net/null/rte_eth_null.c               | 2 --
 drivers/net/pcap/rte_eth_pcap.c               | 2 --
 drivers/net/ring/rte_eth_ring.c               | 2 --
 drivers/net/tap/rte_eth_tap.c                 | 2 --
 drivers/net/vhost/rte_eth_vhost.c             | 2 --
 drivers/net/virtio/virtio_user_ethdev.c       | 2 --
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c         | 3 ---
 drivers/raw/skeleton_rawdev/skeleton_rawdev.c | 3 ---
 9 files changed, 20 deletions(-)

Comments

Ferruh Yigit July 15, 2019, 4:18 p.m. UTC | #1
On 7/11/2019 9:03 PM, Stephen Hemminger wrote:
> Many drivers declare the local rte_vdev_driver structure
> multiple times.  This is unnecessary.
> 
> Surprised it is so common, I guess everyone copies the same code.
> 
> Stephen Hemminger (9):
>   net/tap: remove redundant declarations
>   net/af_packet: remove redundant rte_vdev_driver declaration
>   net/vhost: remove redundant rte_vdev_driver declaration
>   net/null: remove redundant rte_vdev_driver declaration
>   net/pcap: remove redundant rte_vdev_driver declaration
>   net/ring: remove redundant rte_vdev_drive declaration
>   net/virtio_user: remove redundant rte_vdev_driver declaration
>   raw/skeleton_rawdev: remove redundant rte_vdev_driver declaration
>   raw/dpaa2_cmif: remove redundant rte_vdev_driver declaration

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/master, thanks.
Ferruh Yigit July 15, 2019, 5:09 p.m. UTC | #2
On 7/15/2019 5:18 PM, Ferruh Yigit wrote:
> On 7/11/2019 9:03 PM, Stephen Hemminger wrote:
>> Many drivers declare the local rte_vdev_driver structure
>> multiple times.  This is unnecessary.
>>
>> Surprised it is so common, I guess everyone copies the same code.

It seems it is common because a patchset explicitly added them [1] to set driver
name consistently, but later when another patch removed the related code [2] the
forward declarations seems forgotten to be removed.

I have updated commits to include the fixes lines so that they can be backported
(so that they don't cause additional conflicts for more serious patches in the
future.)

[1]: Fixes: 73db5badb042 ("net: align ethdev and eal driver names")
[2]: Fixes: 050fe6e9ff97 ("drivers/net: use ethdev allocation helper for vdev")


>>
>> Stephen Hemminger (9):
>>   net/tap: remove redundant declarations
>>   net/af_packet: remove redundant rte_vdev_driver declaration
>>   net/vhost: remove redundant rte_vdev_driver declaration
>>   net/null: remove redundant rte_vdev_driver declaration
>>   net/pcap: remove redundant rte_vdev_driver declaration
>>   net/ring: remove redundant rte_vdev_drive declaration
>>   net/virtio_user: remove redundant rte_vdev_driver declaration
>>   raw/skeleton_rawdev: remove redundant rte_vdev_driver declaration
>>   raw/dpaa2_cmif: remove redundant rte_vdev_driver declaration
> 
> For series,
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Series applied to dpdk-next-net/master, thanks.
>