Message ID | 1571125801-45773-1-git-send-email-joyce.kong@arm.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6AB21D160; Tue, 15 Oct 2019 09:50:37 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 3BC8F1C2E8 for <dev@dpdk.org>; Tue, 15 Oct 2019 09:50:36 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 84D17337; Tue, 15 Oct 2019 00:50:35 -0700 (PDT) Received: from net-arm-thunderx2-01.test.ast.arm.com (net-arm-thunderx2-01.shanghai.arm.com [10.169.40.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1CDA13F718; Tue, 15 Oct 2019 00:53:16 -0700 (PDT) From: Joyce Kong <joyce.kong@arm.com> To: dev@dpdk.org Cc: nd@arm.com, thomas@monjalon.net, jerinj@marvell.com, ravi1.kumar@amd.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, rmody@marvell.com, shshaikh@marvell.com, honnappa.nagarahalli@arm.com, gavin.hu@arm.com Date: Tue, 15 Oct 2019 15:49:56 +0800 Message-Id: <1571125801-45773-1-git-send-email-joyce.kong@arm.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH v1 0/5] implement common rte bit operation APIs in PMDs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
implement common rte bit operation APIs in PMDs
|
|
Message
Joyce Kong
Oct. 15, 2019, 7:49 a.m. UTC
There are a lot functions of bit operations scattered in PMDs, consolidate them into a common API family and applied in different PMDs to reduce code duplication. Joyce Kong (5): lib/eal: implement the family of rte bit operation APIs net/axgbe: use common rte bit operation APIs instead net/bnx2x: use common rte bit operation APIs instead net/hinic: use common rte bit operation APIs instead net/qede: use common rte bit operation APIs instead drivers/net/axgbe/axgbe_common.h | 29 +---- drivers/net/axgbe/axgbe_ethdev.c | 14 +- drivers/net/axgbe/axgbe_mdio.c | 14 +- drivers/net/bnx2x/bnx2x.c | 202 +++++++++++++---------------- drivers/net/bnx2x/bnx2x.h | 5 +- drivers/net/bnx2x/ecore_sp.h | 8 +- drivers/net/hinic/base/hinic_compat.h | 35 +---- drivers/net/hinic/hinic_pmd_ethdev.c | 16 +-- drivers/net/qede/base/bcm_osal.c | 20 --- drivers/net/qede/base/bcm_osal.h | 10 +- lib/librte_eal/common/Makefile | 1 + lib/librte_eal/common/include/rte_bitops.h | 56 ++++++++ lib/librte_eal/common/meson.build | 1 + 13 files changed, 180 insertions(+), 231 deletions(-) create mode 100644 lib/librte_eal/common/include/rte_bitops.h
Comments
On Tue, 15 Oct 2019 15:49:56 +0800 Joyce Kong <joyce.kong@arm.com> wrote: > There are a lot functions of bit operations scattered in > PMDs, consolidate them into a common API family and applied > in different PMDs to reduce code duplication. > > Joyce Kong (5): > lib/eal: implement the family of rte bit operation APIs > net/axgbe: use common rte bit operation APIs instead > net/bnx2x: use common rte bit operation APIs instead > net/hinic: use common rte bit operation APIs instead > net/qede: use common rte bit operation APIs instead > > drivers/net/axgbe/axgbe_common.h | 29 +---- > drivers/net/axgbe/axgbe_ethdev.c | 14 +- > drivers/net/axgbe/axgbe_mdio.c | 14 +- > drivers/net/bnx2x/bnx2x.c | 202 +++++++++++++---------------- > drivers/net/bnx2x/bnx2x.h | 5 +- > drivers/net/bnx2x/ecore_sp.h | 8 +- > drivers/net/hinic/base/hinic_compat.h | 35 +---- > drivers/net/hinic/hinic_pmd_ethdev.c | 16 +-- > drivers/net/qede/base/bcm_osal.c | 20 --- > drivers/net/qede/base/bcm_osal.h | 10 +- > lib/librte_eal/common/Makefile | 1 + > lib/librte_eal/common/include/rte_bitops.h | 56 ++++++++ > lib/librte_eal/common/meson.build | 1 + > 13 files changed, 180 insertions(+), 231 deletions(-) > create mode 100644 lib/librte_eal/common/include/rte_bitops.h > This is a really good idea, and should have been done long ago. Could you add tests for these as well?
> -----Original Message----- > From: Stephen Hemminger <stephen@networkplumber.org> > Sent: Wednesday, October 16, 2019 12:51 AM > To: Joyce Kong (Arm Technology China) <Joyce.Kong@arm.com> > Cc: dev@dpdk.org; nd <nd@arm.com>; thomas@monjalon.net; > jerinj@marvell.com; ravi1.kumar@amd.com; xuanziyang2@huawei.com; > cloud.wangxiaoyun@huawei.com; zhouguoyang@huawei.com; > rmody@marvell.com; shshaikh@marvell.com; Honnappa Nagarahalli > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China) > <Gavin.Hu@arm.com> > Subject: Re: [dpdk-dev] [PATCH v1 0/5] implement common rte bit operation > APIs in PMDs > > On Tue, 15 Oct 2019 15:49:56 +0800 > Joyce Kong <joyce.kong@arm.com> wrote: > > > There are a lot functions of bit operations scattered in PMDs, > > consolidate them into a common API family and applied in different > > PMDs to reduce code duplication. > > > > Joyce Kong (5): > > lib/eal: implement the family of rte bit operation APIs > > net/axgbe: use common rte bit operation APIs instead > > net/bnx2x: use common rte bit operation APIs instead > > net/hinic: use common rte bit operation APIs instead > > net/qede: use common rte bit operation APIs instead > > > > drivers/net/axgbe/axgbe_common.h | 29 +---- > > drivers/net/axgbe/axgbe_ethdev.c | 14 +- > > drivers/net/axgbe/axgbe_mdio.c | 14 +- > > drivers/net/bnx2x/bnx2x.c | 202 +++++++++++++---------------- > > drivers/net/bnx2x/bnx2x.h | 5 +- > > drivers/net/bnx2x/ecore_sp.h | 8 +- > > drivers/net/hinic/base/hinic_compat.h | 35 +---- > > drivers/net/hinic/hinic_pmd_ethdev.c | 16 +-- > > drivers/net/qede/base/bcm_osal.c | 20 --- > > drivers/net/qede/base/bcm_osal.h | 10 +- > > lib/librte_eal/common/Makefile | 1 + > > lib/librte_eal/common/include/rte_bitops.h | 56 ++++++++ > > lib/librte_eal/common/meson.build | 1 + > > 13 files changed, 180 insertions(+), 231 deletions(-) create mode > > 100644 lib/librte_eal/common/include/rte_bitops.h > > > > > This is a really good idea, and should have been done long ago. > Could you add tests for these as well? Yes. Will add some tests for these APIs in next version.