[dpdk-dev] [RFC 00/14] link status API improvement and bugfixes

Andrew Rybchenko arybchenko at solarflare.com
Sun Jul 16 15:55:33 CEST 2017


On 07/14/2017 09:30 PM, Stephen Hemminger wrote:
> While writing new driver, I noticed a lot of unnecessary duplication of
> code in drivers for handling the eth_dev link status information. While
> consolidating this, it also became obvious that several drivers have
> bugs in this are because they don't return the correct value.
> Also, some drivers were not fully initializing all the space (including
> padding).
>
> This is compile test only at this point, I don't have any of the hardware
> available (except virtio) to test.
>
> Stephen Hemminger (14):
>    ethdev: add link status read/write functions
>    virtio: use eth_link_read/write (and bug fix)
>    bnxt: use rte_link_update
>    vmxnet3: use rte_eth_link_update
>    dpaa2: use rte_eth_link_update
>    nfp: use rte_eth_link_update
>    e1000: use rte_eth_link_update
>    ixgbe: use rte_eth_link_update
>    sfc: use new rte_eth_link helpers
>    i40e: use rte_eth_link_update (and bug fix)
>    liquidio: use _rte_eth_link_update
>    thunderx: use _rte_eth_link_update
>    szedata: use _rte_eth_link_update
>    enic: use _rte_eth_link_update
>
>   drivers/net/bnxt/bnxt_ethdev.c          | 21 +-------
>   drivers/net/dpaa2/dpaa2_ethdev.c        | 66 +++---------------------
>   drivers/net/e1000/em_ethdev.c           | 70 ++------------------------
>   drivers/net/e1000/igb_ethdev.c          | 71 ++------------------------
>   drivers/net/enic/enic_ethdev.c          |  5 +-
>   drivers/net/enic/enic_main.c            | 16 +++---
>   drivers/net/i40e/i40e_ethdev.c          | 44 +++-------------
>   drivers/net/i40e/i40e_ethdev_vf.c       | 19 +------
>   drivers/net/ixgbe/ixgbe_ethdev.c        | 89 +++++----------------------------
>   drivers/net/liquidio/lio_ethdev.c       | 76 +++++++---------------------
>   drivers/net/nfp/nfp_net.c               | 74 +++------------------------
>   drivers/net/sfc/sfc_ethdev.c            | 27 +++-------
>   drivers/net/sfc/sfc_ev.c                | 23 ++-------
>   drivers/net/szedata2/rte_eth_szedata2.c | 18 +++----
>   drivers/net/thunderx/nicvf_ethdev.c     | 17 +------
>   drivers/net/virtio/virtio_ethdev.c      | 54 +++-----------------
>   drivers/net/vmxnet3/vmxnet3_ethdev.c    | 66 ++----------------------
>   lib/librte_ether/rte_ethdev.c           | 36 +++++++++++++
>   lib/librte_ether/rte_ethdev.h           | 28 +++++++++++
>   19 files changed, 171 insertions(+), 649 deletions(-)
>

I've provided my comments to individual patches.

In general it is very good that it removes so much duplicated and
nontrivial code with atomtics. It raises many questions and I think
finally it will allow to clarify link status API for PMD maintainers and
users.

Andrew.


More information about the dev mailing list