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 6F548A0032; Fri, 21 Oct 2022 14:38:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F12F42C08; Fri, 21 Oct 2022 14:38:08 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 9629642B9C for ; Fri, 21 Oct 2022 14:38:06 +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 (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 0B1297B; Fri, 21 Oct 2022 15:38:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 0B1297B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1666355886; bh=yFyXYhBExAoQYEPb8O3e+1nCzUf7iFle1RK80HqWv98=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=W7vnG/3HNINE6GHH0XcY53aHwXVFel8V3jJbttJWNs0DhLYkcfkL8ZSzMXCUC0H+e x5qYytZ56hIoX+YFFPIAGzOuLrj77wxAHeiKOHFQUYbNdk/hVkpo9cXifNZx3xzukb pPiikibe03boefIKsETalbQhZK0Phu5wD7JFWKKA= Message-ID: <1c22e4ec-f092-9350-4fc1-624ca43ee9a4@oktetlabs.ru> Date: Fri, 21 Oct 2022 15:38:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v9 01/14] common/idpf: introduce common library Content-Language: en-US To: "Xing, Beilei" , "Guo, Junfeng" , "Zhang, Qi Z" , "Wu, Jingjing" Cc: "dev@dpdk.org" , "Wang, Xiao W" References: <20221020062951.645121-2-junfeng.guo@intel.com> <20221021051821.2164939-1-junfeng.guo@intel.com> <20221021051821.2164939-2-junfeng.guo@intel.com> <4dc1d07d-086f-9c46-34b4-5f18e4dde6b6@oktetlabs.ru> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 10/21/22 15:35, Xing, Beilei wrote: > > >> -----Original Message----- >> From: Andrew Rybchenko >> Sent: Friday, October 21, 2022 2:40 PM >> To: Guo, Junfeng ; Zhang, Qi Z >> ; Wu, Jingjing ; Xing, Beilei >> >> Cc: dev@dpdk.org; Wang, Xiao W >> Subject: Re: [PATCH v9 01/14] common/idpf: introduce common library >> >> On 10/21/22 08:18, Junfeng Guo wrote: >>> Introduce common library for IDPF (Infrastructure Data Path Function) >>> PMD. >>> >>> Also add OS specific implementation about some MACRO definitions and >>> small functions which are specific for DPDK. >> >> Common drivers are required when different class drivers need to share >> some code. So, it must be expalined here why do you create common driver >> instead of usage of base/ driver in your net driver. > > Hi Andrew, > Thanks for all your comments. > The common driver will be also used in another PMD which should be upstream in 23.03, so we create it. > >> >> Note that common driver is a DPDK driver and it must follow DPDK coding >> style. If the code is actually shared with something else and do not follow >> DPDK coding style from the very beginning (since it is an existing code), it >> should be in base/ subdir in either common driver or net driver. > > The common driver is a BSD license release provided by Intel internal team, basically we won't change it. It's the same process as Intel other PMDs, such as base driver of iavf, etc. > Is it OK if it's in common/idpf/base/ folder? If so, yes, it should be there. Some common DPDK-specifics bits could be in common/idpf, but code shared with other teams should be in base/. > >> >> Also you should not use own trivial wrappers for DPDK API in DPDK-specific >> code. It just complicates reading. >> E.g. BIT() vs RTE_BIT32(). > > Make sense, will try my best to address all your comments in the next version. > Thanks again. > >> >> So, I need an answer on above questions before I continue review. >> >>> >>> Signed-off-by: Beilei Xing >>> Signed-off-by: Xiao Wang >>> Signed-off-by: Junfeng Guo >> >> [snip] >> >>> diff --git a/drivers/common/idpf/idpf_alloc.h >>> b/drivers/common/idpf/idpf_alloc.h >>> new file mode 100644 >>> index 0000000000..bc054851b3 >>> --- /dev/null >>> +++ b/drivers/common/idpf/idpf_alloc.h >>> @@ -0,0 +1,22 @@ >>> +/* SPDX-License-Identifier: BSD-3-Clause >>> + * Copyright(c) 2001-2022 Intel Corporation */ >>> + >>> +#ifndef _IDPF_ALLOC_H_ >>> +#define _IDPF_ALLOC_H_ >>> + >>> +/* Memory types */ >> >> If it is a DPDK-specific driver and it is an interface provided by common driver, >> it should use Doxygen-style comments to be a part of genereated API >> documentation. >