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 9C0EBA0032; Fri, 21 Oct 2022 08:40:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3997F42836; Fri, 21 Oct 2022 08:40:12 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 3F5F24282D for ; Fri, 21 Oct 2022 08:40:11 +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 6EE9569; Fri, 21 Oct 2022 09:40:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 6EE9569 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1666334410; bh=GzNNrSBpRsxEiMaBHhg1bmTD7moAotw8TVdPxHdPAt4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dScSfyorhsDbo2OEQ3CIyF0bexGnQdNS/OQORl+cSjPgW9DpyaCSW+CLA/QeFxe7S smr/lOT0YFNAbCtxZCoWAgl2xvP3YzN+FiKGqqFuepGRGPtYTQivv+8M8kPfvyuhqN jUG1UT5xl3hjiBRLqY9SIVvAjqjscwVD1OmURS0w= Message-ID: <4dc1d07d-086f-9c46-34b4-5f18e4dde6b6@oktetlabs.ru> Date: Fri, 21 Oct 2022 09:40:10 +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: Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Xiao Wang References: <20221020062951.645121-2-junfeng.guo@intel.com> <20221021051821.2164939-1-junfeng.guo@intel.com> <20221021051821.2164939-2-junfeng.guo@intel.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221021051821.2164939-2-junfeng.guo@intel.com> 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 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. 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. 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(). 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.