From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D53FC2C08 for ; Tue, 27 Jun 2017 17:11:23 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2017 08:11:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,401,1493708400"; d="scan'208";a="101948228" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by orsmga004.jf.intel.com with ESMTP; 27 Jun 2017 08:11:03 -0700 To: Thomas Monjalon , "De Lara Guarch, Pablo" Cc: dev@dpdk.org, "Doherty, Declan" References: <1495639634-74846-1-git-send-email-pablo.de.lara.guarch@intel.com> <2058861.mNNx7DgSpj@xps> <1703981.y8KKVdfaY4@xps> From: Ferruh Yigit Message-ID: <8d33a2ad-b80c-1337-0db3-88aa5e6fcb07@intel.com> Date: Tue, 27 Jun 2017 16:11:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1703981.y8KKVdfaY4@xps> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 06/12] cryptodev: move vdev functions to a separate file 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: , X-List-Received-Date: Tue, 27 Jun 2017 15:11:25 -0000 On 6/27/2017 3:28 PM, Thomas Monjalon wrote: > 27/06/2017 11:51, De Lara Guarch, Pablo: >> From: Thomas Monjalon [mailto:thomas@monjalon.net] >>> 23/06/2017 14:52, Declan Doherty: >>>> On 21/06/2017 7:28 AM, Pablo de Lara wrote: >>>>> Move all functions handling virtual devices to a separate header >>>>> file "rte_cryptodev_vdev.h", in order to leave only generic >>>>> functions for any device in the rest of the files. >>>>> >>>>> Signed-off-by: Pablo de Lara >>>> >>>> Acked-by: Declan Doherty >>> >>> This patch is moving some code from a .c to a .h. >>> The consequence is that driver are now compiling new functions from the .h >>> and require librte_kvargs to link with. >>> It is a build error in shared lib mode. >>> >>> Please keep the code in a .c file if possible. >> >> Sorry about this. I just fixed it in the subtree, so pull it whenever you are ready. >> Also, since ethdev have separated pci and vdev functions in separate .h files, >> I preferred to be consistent and do the same. > > There is no reason to implement these functions in .h files. > I prefer to keep them in a .c file and just export the proto in .h. This is same in the eth_dev too. These are helper functions, and implementing them in .h file has the benefit of function goes into PMD library, and there is no dependency from PMDs to librte_ether for these functions (there are dependencies for other functions ..). It looks acceptable for me for helper functions to be implemented in header file. But if we decide to move them into .c file, .map file should be updated to export them, and I suppose ethdev also should be updated to be compatible. Thanks, ferruh