From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from pure.maildistiller.com (unknown [10.110.50.29]) by dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTP id 03E2680057; Sun, 16 Jul 2017 13:55:51 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us3.ppe-hosted.com (unknown [10.110.49.251]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 72F9C60049; Sun, 16 Jul 2017 13:55:50 +0000 (UTC) Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 500356004F; Sun, 16 Jul 2017 13:55:50 +0000 (UTC) Received: from [192.168.239.128] (85.187.13.33) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Sun, 16 Jul 2017 06:55:36 -0700 To: Stephen Hemminger , References: <20170714183027.16021-1-stephen@networkplumber.org> From: Andrew Rybchenko Message-ID: <2387f800-5084-e0e1-5cc7-4cfeaa679d8a@solarflare.com> Date: Sun, 16 Jul 2017 16:55:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170714183027.16021-1-stephen@networkplumber.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.33] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ocex03.SolarFlarecom.com (10.20.40.36) X-MDID: 1500213350-qqhYcgeagmQh Subject: Re: [dpdk-dev] [RFC 00/14] link status API improvement and bugfixes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 13:55:52 -0000 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.