From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 2D3D11DBF for ; Mon, 11 Dec 2017 20:40:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2017 11:40:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,392,1508828400"; d="scan'208";a="12537647" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 11 Dec 2017 11:40:13 -0800 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 19:40:12 +0000 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx112.ger.corp.intel.com ([169.254.1.12]) with mapi id 14.03.0319.002; Mon, 11 Dec 2017 19:40:12 +0000 From: "De Lara Guarch, Pablo" To: Ravi Kumar , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 05/11] crypto/ccp: add support for CPU based authentication Thread-Index: AQHTad2MLqnr6MA4WEageTyK0Mb4waM+jtYA Date: Mon, 11 Dec 2017 19:40:11 +0000 Message-ID: References: <1512047553-118101-1-git-send-email-Ravi1.kumar@amd.com> <1512047553-118101-5-git-send-email-Ravi1.kumar@amd.com> In-Reply-To: <1512047553-118101-5-git-send-email-Ravi1.kumar@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjkzYTFlZGItYTUxNi00MDkyLWI1ZDgtNjBmZDBjYmE3ZDNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InNZR0dcL01nWjM1M0RLdzJ0bXNzTmxaYnBvTExxSm1hWW4wVlwvWXp6dTVNQT0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 05/11] crypto/ccp: add support for CPU based authentication 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: Mon, 11 Dec 2017 19:40:15 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ravi Kumar > Sent: Thursday, November 30, 2017 1:12 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 05/11] crypto/ccp: add support for CPU based > authentication When enabling this, I got the following error: In file included from build/include/rte_mempool.h:79:0, from build/include/rte_mbuf.h:65, from build/include/rte_cryptodev_pmd.h:51, from drivers/crypto/ccp/ccp_crypto.c:46: drivers/crypto/ccp/ccp_crypto.c: In function 'cpu_crypto_auth': build/include/rte_memcpy.h:367:2: error: array subscript is above array bou= nds [-Werror=3Darray-bounds] rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32); Also, could you add a commit message in this and the other patches? If the patch is simple enough, a commit message might not be necessary, but for patches like this one, I think it is quite useful. Also, I have an extra comment below. Thanks, Pablo >=20 > Signed-off-by: Ravi Kumar ... > a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c index > 4d71ec1..1833929 100644 > --- a/drivers/crypto/ccp/ccp_crypto.c > +++ b/drivers/crypto/ccp/ccp_crypto.c ... > +static int cpu_crypto_auth(struct rte_crypto_op *op, struct ccp_session > *sess, > + EVP_MD_CTX *ctx) > +{ > + uint8_t *src, *dst; > + int srclen, status; > + struct rte_mbuf *mbuf_src, *mbuf_dst; > + const EVP_MD *algo =3D NULL; > + EVP_PKEY *pkey; > + > + algo_select(sess->auth.algo, &algo); > + pkey =3D EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, sess- > >auth.key, > + sess->auth.key_length); > + mbuf_src =3D op->sym->m_src; > + mbuf_dst =3D op->sym->m_dst ? op->sym->m_dst : op->sym- > >m_src; > + srclen =3D op->sym->auth.data.length; > + src =3D rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *, > + op->sym->auth.data.offset); > + > + if (sess->auth.op =3D=3D CCP_AUTH_OP_VERIFY) { > + dst =3D (uint8_t *)rte_pktmbuf_append(mbuf_src, > + sess->auth.digest_length); There was a change in the previous release, that removed any append in the = source mbuf, to allocate memory for a temporary digest (like in this case). Instead, mem= ory in the queue pair=20 structure was reserved. This way, you won't have to worry about not having = enough space in the mbuf.