From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94564A0C45; Wed, 20 Oct 2021 09:48:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8487940683; Wed, 20 Oct 2021 09:48:58 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id C86E340142 for ; Wed, 20 Oct 2021 09:48:57 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 639707F530; Wed, 20 Oct 2021 10:48:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 639707F530 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1634716137; bh=kX9Zv5tKDRIlzFEc94yLHkNpvu9pLchv8s3UqEsmViQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=UwmQdBQME4o27oNxQ7uMtsjcSqv1FCKrnZi6xbXQvZ54DUx8J/QJS3C0WTY9mAUZu J2j64DcapvQ6cqfGHNzGg7e2bbUs4l6tV3yQyKFfq0iJ6f9jBkXzCuHwRtOKFP3kbf wsieZzSMH5tJDqqtp6CoLBxrEdoQSzzY7pyEHgho= To: "Xueming(Steven) Li" , "yuying.zhang@intel.com" , "dev@dpdk.org" Cc: "konstantin.ananyev@intel.com" , "mdr@ashroe.eu" , "jerinjacobk@gmail.com" , NBU-Contact-Thomas Monjalon , Slava Ovsiienko , "ajit.khaparde@broadcom.com" , "ferruh.yigit@intel.com" , Lior Margalit References: <20210727034204.20649-1-xuemingl@nvidia.com> <20211019152809.2278464-1-xuemingl@nvidia.com> <20211019152809.2278464-3-xuemingl@nvidia.com> <2dde9f24-fe30-45d9-7230-7d59991cc038@oktetlabs.ru> <5aa817c081bfba68175acb286f917a9c4c683518.camel@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <0ed2575d-fe5b-8b0c-2b69-037e4463304a@oktetlabs.ru> Date: Wed, 20 Oct 2021 10:48:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <5aa817c081bfba68175acb286f917a9c4c683518.camel@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v10 2/7] ethdev: new API to resolve device capability name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On 10/20/21 10:47 AM, Xueming(Steven) Li wrote: > On Tue, 2021-10-19 at 20:57 +0300, Andrew Rybchenko wrote: >> On 10/19/21 6:28 PM, Xueming Li wrote: >>> This patch adds API to return name of device capability. >>> >>> Signed-off-by: Xueming Li >> >> [snip] >> >>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >>> index bc55f899f72..97217529449 100644 >>> --- a/lib/ethdev/rte_ethdev.c >>> +++ b/lib/ethdev/rte_ethdev.c >>> @@ -165,6 +165,20 @@ static const struct { >>> >>> #undef RTE_TX_OFFLOAD_BIT2STR >>> >>> +#define RTE_ETH_DEV_CAPA_BIT2STR(_name) \ >>> + { RTE_ETH_DEV_CAPA_##_name, #_name } >> >> In fact, such macros make more harm than add value. >> It complicates grep by capability name. So, it is better >> to drop the macro and just duplicate few symbols below. > > Will update in next version. Eclipse resolves macros and search into > expanded macros. > > BTW, do you plan to review other patches today? If so I will hold new > version a little bit to avoid explode maillist. Sorry, I have no time to review testpmd patches today. ethdev part LGTM.