From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 3AEC8A2EFC
	for <public@inbox.dpdk.org>; Tue, 15 Oct 2019 18:52:10 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id DC0B61EDDA;
	Tue, 15 Oct 2019 18:52:09 +0200 (CEST)
Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com
 [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 9D7AF1ED98
 for <dev@dpdk.org>; Tue, 15 Oct 2019 18:52:08 +0200 (CEST)
Received: by mail-pf1-f195.google.com with SMTP id q7so12837297pfh.8
 for <dev@dpdk.org>; Tue, 15 Oct 2019 09:52:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=V+sm0GuxrT3UmBhIOjpPu/ES1vSrtwORqjpHFIMj1a8=;
 b=XSRlW3hnAwJpzaJCnopDoiYRE2OA5orKisOYAakJe1iuxkEtaWsqhaDAmaiQfaWlYU
 68MBebunUl0HhsOZiByAJBMB/Wti05RUQT87lhw23IyJ9KheJAFhPLxAaUmhV7rzmmfZ
 g/bhWeWg4wTe2yFz9iXT4SO2UGlbUXCPWJFFeB9Yd8LEWyjTyuSAoX7imAh0UHHSRKaH
 aE43zVIWwfCloKNxQRK0LS/7e4CsReX7MscsWZH+U7WlDKn/fYoZzcg/Glo2ziE8zkXH
 fCSx9cG4yBz4MbC9tr9cIj1wmcRPCN8NJMTu/ejq8N9I8kah3KLu45YEa+M7WnTpWIG7
 4hOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=V+sm0GuxrT3UmBhIOjpPu/ES1vSrtwORqjpHFIMj1a8=;
 b=M+PgplvRsxZeCxVslHdFfGL9SvHXhNVNXpEsWIYZFCJa/vzs7iKzHYuF374b6kjK5f
 FiteRTwDE5BTtsdFBDEdtoShDcsBC3ow1UswCQKR13q5PAWN+SFbL2RHKykS1FplIe00
 mFyMI9tMWQd6VwxXwjsoZ/WIP5YEHgfv7j5kdRSh0eTRrdEIyahJ7SovWS+FVRJuAvy4
 p/w8QR3QNlkNhcixfc236Eeoc97yqCPk7WNu3Hj2FBYhhC8Mxai1u/e9PBhQEkXB1YFR
 G/Amntcp5fzLhfinzUQ8g+YwjrWoDtDL95QHLLhpX0a6HxjtmBgcmr85GnVVHAbHsJQU
 mekQ==
X-Gm-Message-State: APjAAAVLX9Q0yKmOs4jCZY2PUS5Y6dkf57xx3pcA7E0yGQy3jq/2QILk
 tBc/Ab7dk+4xecAUYmpXUhZLWw==
X-Google-Smtp-Source: APXvYqxExkQi5HQG9Fkrj15cME6wbUDiVj+t2W3m4WZn0wvZFPVr0Gr5wVNsM9ZoxPD195XYZEaexw==
X-Received: by 2002:aa7:86d6:: with SMTP id h22mr40071277pfo.72.1571158327862; 
 Tue, 15 Oct 2019 09:52:07 -0700 (PDT)
Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])
 by smtp.gmail.com with ESMTPSA id b9sm19778244pfo.105.2019.10.15.09.52.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 15 Oct 2019 09:52:07 -0700 (PDT)
Date: Tue, 15 Oct 2019 09:51:13 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Joyce Kong <joyce.kong@arm.com>
Cc: dev@dpdk.org, 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
Message-ID: <20191015095113.7b25eb80@hermes.lan>
In-Reply-To: <1571125801-45773-1-git-send-email-joyce.kong@arm.com>
References: <1571125801-45773-1-git-send-email-joyce.kong@arm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [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>

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?