From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <thomas@monjalon.net> Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id C40D044BE for <dev@dpdk.org>; Mon, 1 Oct 2018 12:05:06 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1336320A9B; Mon, 1 Oct 2018 06:05:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 01 Oct 2018 06:05:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=8uUJWR2V/XuZ4mJImPmv6iVwW7 2wLkUdPIh1eYEYNNk=; b=SB1Ucn5RYogeDuQDS30oEezKIHFdsVuAmPVsnyriD0 Gake5zdBxOPnT/beXaur2TXJMYL1iHbzWlxygPhzAerrxnxou5Bc7m6VSYzs28Vo dPYhl9vMC9/YFGYoyijFXepK8rJ3pW4pCohYhqMsvcUmwo1ubyR6Gy0R4o3QRuXg w= 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-sender:x-me-sender:x-sasl-enc; s=fm3; bh=8uUJWR 2V/XuZ4mJImPmv6iVwW72wLkUdPIh1eYEYNNk=; b=I7W7fQ9Jjuy95OvrIoeUps i06jzPFT8F4BugUbItQW15E67YVVpoRQpiREYCSeFwQun46/So8CVFnmGTAhIVR+ NoigUx/+RKN1g+IhbW9MniFIruyZosmVGk4dVFDEqTPYuNMYqUi5d1SQsxpEbhmG XKDoz6Gb6KhFxCH2jlBz0JN9RVn+1XclcfNTuUpeDx88zG4wOII9Mpneah1PpJII nS0cgkIm3vUuIHT2ZSZ8/XGdCCnBvtcoKdMkJbhmWljAj2ChKFYHEBG+Flwek0eT gQkALA7ODsjnI8JVQgR94b/yUjblC/CqVwMUJnON212eDo0VzxQcb44z+AUu4++A == X-ME-Sender: <xms:UfGxWyc3PtSIsTfA3hFEnJGfmP78PDe9yP3o_7FAwJ_t6CTC5yBPBg> X-ME-Proxy: <xmx:UfGxWw9h3hMR2qYS1QiJIwxa5i8InU1g2GG4gK6pEaw-LrpSEyLt-w> <xmx:UfGxW8H32NUWRFAjgxfbC7hOI6Qg2dM-s4b74nh3GDEbK3niml4cKw> <xmx:UfGxW2eM_rZ7OGoO8BQWthOa8FbZlGM0c6VDwRar2ZVF_rf7-wC8jA> <xmx:UfGxW5MK7cQZIi0eCeTyLD42-K2KObCzWo-fbP9jpOZKHbJVAGpTAw> <xmx:UfGxW5BIQQ7Qk02COkMJg6Hu0aHE-LSS6pXCnATXggtzEl2p0UHWJQ> <xmx:UvGxWzTPLP3Mg9b9MLaEzhK5zzdOtzbMPLj5DiosDUwT8ZsCvmgfsw> Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9FFE7102A0; Mon, 1 Oct 2018 06:05:03 -0400 (EDT) From: Thomas Monjalon <thomas@monjalon.net> To: "Joseph, Anoob" <Anoob.Joseph@caviumnetworks.com> Cc: dev@dpdk.org, Fiona Trahe <fiona.trahe@intel.com>, Akhil Goyal <akhil.goyal@nxp.com>, Anoob Joseph <ajoseph@caviumnetworks.com>, Pablo de Lara <pablo.de.lara.guarch@intel.com>, Murthy NSSR <nidadavolu.murthy@caviumnetworks.com>, Jerin Jacob <jerin.jacob@caviumnetworks.com>, Narayana Prasad <narayanaprasad.athreya@caviumnetworks.com>, Ankur Dwivedi <ankur.dwivedi@caviumnetworks.com>, Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>, Ragothaman Jayaraman <rjayaraman@caviumnetworks.com>, Srisivasubramanian S <ssrinivasan@caviumnetworks.com>, Tejasree Kondoj <kondoj.tejasree@caviumnetworks.com> Date: Mon, 01 Oct 2018 12:05:00 +0200 Message-ID: <46633655.Q4LKdWAF6e@xps> In-Reply-To: <c6077921-c2ea-92ca-0cbe-a6c293703be9@caviumnetworks.com> References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <21787cc6-1151-53e9-a86b-aa008b421fb1@caviumnetworks.com> <c6077921-c2ea-92ca-0cbe-a6c293703be9@caviumnetworks.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric capabilities X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> X-List-Received-Date: Mon, 01 Oct 2018 10:05:07 -0000 24/09/2018 13:36, Joseph, Anoob: > Hi Fiona, > > Can you please comment on this? > > We are adding all capabilities of octeontx-crypto PMD as a macro in > otx_cryptodev_capabilites.h file and then we are using it from > otx_cryptodev_ops.c. This is the approach followed by QAT crypto PMD. As > per my understanding, this is to ensure that cryptodev_ops file remains > simple. For other PMDs with fewer number of capabilities, the structure > can be populated in the .c file itself without the size of the file > coming into the picture. > > But this would cause checkpatch to report error. Akhil's suggestion is > to move the entire definition to a header and include it from the .c > file. I believe, the QAT approach was to avoid variable definition in > the header. What do you think would be a better approach here? I think we should avoid adding some code in a .h file. And it is even worst when using macros. I suggest defining the capabilities in a .c file. If you don't want to bloat the main .c file, you can create a function defined in another .c file.