From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [RFC 00/14] link status API improvement and bugfixes Date: Sun, 16 Jul 2017 16:55:33 +0300 Message-ID: <2387f800-5084-e0e1-5cc7-4cfeaa679d8a@solarflare.com> References: <20170714183027.16021-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit To: Stephen Hemminger , Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id AB9491E34 for ; Sun, 16 Jul 2017 15:55:51 +0200 (CEST) In-Reply-To: <20170714183027.16021-1-stephen@networkplumber.org> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.