From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pablo.de.lara.guarch@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id D43531B7CB
 for <dev@dpdk.org>; Tue, 15 May 2018 15:34:13 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga004.jf.intel.com ([10.7.209.38])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 15 May 2018 06:34:12 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.49,403,1520924400"; d="scan'208";a="199526381"
Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99])
 by orsmga004.jf.intel.com with ESMTP; 15 May 2018 06:34:11 -0700
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by
 IRSMSX107.ger.corp.intel.com ([169.254.10.141]) with mapi id 14.03.0319.002;
 Tue, 15 May 2018 14:34:10 +0100
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Gavin Hu <gavin.hu@arm.com>
CC: "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling
 issue
Thread-Index: AQHT7C6X73hTEu5Rg0GbSUVhTZEzbaQwmjgAgAAwDMA=
Date: Tue, 15 May 2018 13:34:09 +0000
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CD0B635@IRSMSX108.ger.corp.intel.com>
References: <1526372924-28411-1-git-send-email-gavin.hu@arm.com>
 <1526376227-25534-1-git-send-email-gavin.hu@arm.com>
 <1526376227-25534-3-git-send-email-gavin.hu@arm.com>
 <20180515114133.GA19163@jerin>
In-Reply-To: <20180515114133.GA19163@jerin>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTBjYjYzZmItOGY4Yy00MmEzLWJkNTctYjYwNmE1MzdiNjczIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImhSdFp3RThxSUo4TVIza0VTNWtIcDMrWGtDSzJGb3Y3dHR5cDh3dmFsMk09In0=
x-ctpclassification: CTP_NT
dlp-product: dlpe-windows
dlp-version: 11.0.200.100
dlp-reaction: no-action
x-originating-ip: [163.33.239.180]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling
 issue
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://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 15 May 2018 13:34:14 -0000



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob
> Sent: Tuesday, May 15, 2018 12:42 PM
> To: Gavin Hu <gavin.hu@arm.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling=
 issue
>=20
> -----Original Message-----
> > Date: Tue, 15 May 2018 05:23:46 -0400
> > From: Gavin Hu <gavin.hu@arm.com>
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling
> > issue
> > X-Mailer: git-send-email 2.1.4

Wrong title, should be "eventdev: fix clang build".

> >
> > ~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
> > 'rte_memcpy' call operates on objects of type 'struct rte_event'
> > while the size is based on a different type
> >       'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
> >                 rte_memcpy(ev, &m_data->response_info, sizeof(ev));
> > ~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
> > note: did you mean to dereference the argument to 'sizeof' (and
> > multiply it by the number of elements)?
> >       rte_memcpy(ev, &m_data->response_info, sizeof(ev));
> >
> > Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> > ---
> >  lib/librte_eventdev/rte_event_crypto_adapter.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c
> > b/lib/librte_eventdev/rte_event_crypto_adapter.c
> > index 831f842..0f34fe0 100644
> > --- a/lib/librte_eventdev/rte_event_crypto_adapter.c
> > +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
> > @@ -527,7 +527,8 @@ eca_ops_enqueue_burst(struct
> rte_event_crypto_adapter *adapter,
> >  			continue;
> >  		}
> >
> > -		rte_memcpy(ev, &m_data->response_info, sizeof(ev));
> > +		rte_memcpy(ev, &m_data->response_info,
> > +			sizeof(struct rte_event));
>=20
> Following could be a shorter replacement.
>=20
> rte_memcpy(ev, &m_data->response_info, sizeof(*ev));
>=20
> >  		ev->event_ptr =3D ops[i];
> >  		ev->event_type =3D RTE_EVENT_TYPE_CRYPTODEV;
> >  		if (adapter->implicit_release_disabled)
> > --
> > 2.1.4
> >