From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8709A00BE; Wed, 30 Oct 2019 11:17:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 16C871BFCB; Wed, 30 Oct 2019 11:17:31 +0100 (CET) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by dpdk.org (Postfix) with ESMTP id 8BC3F1BFC8 for ; Wed, 30 Oct 2019 11:17:29 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id B79F46078; Wed, 30 Oct 2019 06:17:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 30 Oct 2019 06:17:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=oc5fhaGC6KowiJplC8TQplkMAnVxbCXvYW4gAdjorXc=; b=cYMe+s3izK0u rP43uBHKsmJKVX+JXEz/7SsUV6ZGCWJCyIdX8FZvFo2jH/kCxI4vvKzLtch+tDNe 2pYb1dchyb3HUrehoK8mBr7CI1cZDej6gqwoGzlzEZ5uwMWsHYaKkdW/AaFl9Djb Dov6NJjuh+Tkx4jShUnARsmlOmNtv08= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=oc5fhaGC6KowiJplC8TQplkMAnVxbCXvYW4gAdjor Xc=; b=xaUg3sFjkRr8KKLGEsqOBIkqly52LzDJ4+QEhN1hpAw5RB6fbWOPpe34u a7yTw2TUp9Fp+sL3VpNmqag3Ea1E79Ru/W9v0RzAJ5bsN6x0QRaWZsUQRIDtvMp3 7KlFlI6QVzO9YsGFKmKkiClIKepnfH5Np9ZZhMCq8eNTrNpYY8NiL/RpYpf134XW xYlaaZL2ttlqZpsChwBZ18fD4BAY3zQN2NYIoBb20dJ5gAvu22znOKh9+d1F2g4L MZCUvQpxos7olRt3vLhHtilZL7Gl490/xDkGTasdRQYxIw1dE2w3o+mqOorButBM 0P+A4ExWs3YOEDrAg3J/O2RHD6Vyg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtfedgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpeguphgukhdrohhrghenucfkphepjeejrddufeegrddvtdefrddukeegnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtne cuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 88D258005C; Wed, 30 Oct 2019 06:17:24 -0400 (EDT) From: Thomas Monjalon To: "Gavin Hu (Arm Technology China)" Cc: "Joyce Kong (Arm Technology China)" , "dev@dpdk.org" , nd , "jerinj@marvell.com" , "stephen@networkplumber.org" , "mb@smartsharesystems.com" , Honnappa Nagarahalli , "ravi1.kumar@amd.com" , "rmody@marvell.com" , "shshaikh@marvell.com" , "xuanziyang2@huawei.com" , "cloud.wangxiaoyun@huawei.com" , "zhouguoyang@huawei.com" , "adrien.mazarguil@6wind.com" Date: Wed, 30 Oct 2019 11:17:22 +0100 Message-ID: <6240621.KGSq2R8Ea0@xps> In-Reply-To: References: <1571125801-45773-1-git-send-email-joyce.kong@arm.com> <2670371.SxHcXEKB0j@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 0/6] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 30/10/2019 10:55, Gavin Hu (Arm Technology China): > Hi Thomas, > > From: Thomas Monjalon > > 23/10/2019 04:54, Joyce Kong: > > > 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. > > > > Please, could you look at what Adrien did in the Mellanox PMD? > > > > http://code.dpdk.org/dpdk/latest/source/drivers/net/mlx5/mlx5_utils.h#L28 > The code has less duplication, but it requires a less natural declaration of variables > http://code.dpdk.org/dpdk/latest/source/drivers/net/mlx5/mlx5.h#L607 > Should we take this way? I don't know which way is best. I suggested to read this code for 2 reasons: 1. we can be inspired 2. it may be replaced by the new common API as you did for other drivers