From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pablo.de.lara.guarch@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id 374864C57
 for <dev@dpdk.org>; Tue, 19 Jun 2018 15:40:13 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 19 Jun 2018 06:40:12 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,243,1526367600"; d="scan'208";a="238433198"
Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31])
 by fmsmga005.fm.intel.com with ESMTP; 19 Jun 2018 06:39:58 -0700
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by
 IRSMSX106.ger.corp.intel.com ([169.254.8.80]) with mapi id 14.03.0319.002;
 Tue, 19 Jun 2018 14:39:58 +0100
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Anoob Joseph
 <anoob.joseph@caviumnetworks.com>
CC: Akhil Goyal <akhil.goyal@nxp.com>, Thomas Monjalon <thomas@monjalon.net>, 
 Nithin Dabilpuram <nithin.dabilpuram@cavium.com>, Ankur Dwivedi
 <ankur.dwivedi@cavium.com>, Murthy NSSR <Nidadavolu.Murthy@cavium.com>,
 Narayana Prasad <narayanaprasad.athreya@caviumnetworks.com>, "Ragothaman
 Jayaraman" <Ragothaman.Jayaraman@cavium.com>, Srisivasubramanian Srinivasan
 <Srisivasubramanian.Srinivasan@cavium.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [PATCH 01/16] config: add Cavium CPT PMD skeleton
Thread-Index: AQHT/0iUx2VLGocrfEunFTQzwVSvQaRfB0yAgAicvvA=
Date: Tue, 19 Jun 2018 13:39:58 +0000
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8977F8D8122@IRSMSX108.ger.corp.intel.com>
References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com>
 <1528476325-15585-2-git-send-email-anoob.joseph@caviumnetworks.com>
 <20180614025638.GA16602@jerin>
In-Reply-To: <20180614025638.GA16602@jerin>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWZkM2NkYTAtYjQxZC00MjhiLWFiYzMtY2RkZTA1MDdkM2FkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTURVRkxrQXJvdFhMN2xTcnVXd0x4RTl4U1psc0VYMXdEazVOK0VFcWJiZUN6NDQzMkdlczF4N3pZSXNsME0yVSJ9
x-ctpclassification: CTP_NT
dlp-product: dlpe-windows
dlp-version: 11.0.200.100
dlp-reaction: no-action
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH 01/16] config: add Cavium CPT PMD skeleton
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: Tue, 19 Jun 2018 13:40:15 -0000

Hi Anoob,

> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Thursday, June 14, 2018 3:57 AM
> To: Anoob Joseph <anoob.joseph@caviumnetworks.com>
> Cc: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>; Nithin Dabilpuram <nithin.dabilpuram@cavium.com>;
> Ankur Dwivedi <ankur.dwivedi@cavium.com>; Murthy NSSR
> <Nidadavolu.Murthy@cavium.com>; Narayana Prasad
> <narayanaprasad.athreya@caviumnetworks.com>; Ragothaman Jayaraman
> <Ragothaman.Jayaraman@cavium.com>; Srisivasubramanian Srinivasan
> <Srisivasubramanian.Srinivasan@cavium.com>; dev@dpdk.org
> Subject: Re: [PATCH 01/16] config: add Cavium CPT PMD skeleton
>=20
> -----Original Message-----
> > Date: Fri,  8 Jun 2018 22:15:10 +0530
> > From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
> > To: Akhil Goyal <akhil.goyal@nxp.com>, Pablo de Lara
> > <pablo.de.lara.guarch@intel.com>, Thomas Monjalon
> > <thomas@monjalon.net>
> > Cc: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>, Ankur Dwivedi
> > <ankur.dwivedi@cavium.com>, Jerin Jacob
> > <jerin.jacob@caviumnetworks.com>,  Murthy NSSR
> > <Nidadavolu.Murthy@cavium.com>, Narayana Prasad
> > <narayanaprasad.athreya@caviumnetworks.com>, Ragothaman Jayaraman
> > <Ragothaman.Jayaraman@cavium.com>, Srisivasubramanian Srinivasan
> > <Srisivasubramanian.Srinivasan@cavium.com>, dev@dpdk.org
> > Subject: [PATCH 01/16] config: add Cavium CPT PMD skeleton
> > X-Mailer: git-send-email 2.7.4
> >
> > From: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>
> >
> > Add makefile and config file options.
> > Also add version map file and maintainers file to claim
> > responsibility.
> >
> > Signed-off-by: Ankur Dwivedi <ankur.dwivedi@cavium.com>
> > Signed-off-by: Murthy NSSR <Nidadavolu.Murthy@cavium.com>
> > Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>
> > Signed-off-by: Ragothaman Jayaraman
> <Ragothaman.Jayaraman@cavium.com>
> > Signed-off-by: Srisivasubramanian Srinivasan
> > <Srisivasubramanian.Srinivasan@cavium.com>
> > ---
> >  MAINTAINERS                                |  7 ++++++
> >  config/common_base                         |  8 ++++++
> >  drivers/crypto/Makefile                    |  1 +
> >  drivers/crypto/cpt/Makefile                | 40
> ++++++++++++++++++++++++++++++
> >  drivers/crypto/cpt/rte_pmd_cpt_version.map |  4 +++
> >  mk/rte.app.mk                              |  2 +-
> >  6 files changed, 61 insertions(+), 1 deletion(-)  create mode 100644
> > drivers/crypto/cpt/Makefile  create mode 100644
> > drivers/crypto/cpt/rte_pmd_cpt_version.map
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS index 4667fa7..1b4a8eb 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -504,6 +504,13 @@ F: drivers/net/octeontx/
> >  F: doc/guides/nics/octeontx.rst
> >  F: doc/guides/nics/features/octeontx.ini
> >
> > +Cavium CPT
> > +M: Ankur Dwivedi <ankur.dwivedi@cavium.com>
> > +M: Nithin Dabilpuram <nithin.dabilpuram@cavium.com>
> > +M: Murthy NSSR <Nidadavolu.Murthy@cavium.com>
> > +F: drivers/crypto/cpt/
> > +F: doc/guides/cryptodevs/cpt.rst

Add the documentation file line in the patch where you actually add it.

>=20
> Move this under crypto drivers section if it is not already the case.
>=20
> > +
> >  Chelsio cxgbe
> >  M: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> >  F: drivers/net/cxgbe/
> > diff --git a/config/common_base b/config/common_base index
> > 6b0d1cb..85e03a8 100644
> > --- a/config/common_base
> > +++ b/config/common_base
> > @@ -631,6 +631,14 @@ CONFIG_RTE_LIBRTE_PMD_DPAA_EVENTDEV=3Dn
> >  CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV=3Dn
> >
> >  #
> > +# Compile PMD for Cavium CPT Crypto device #
> > +CONFIG_RTE_LIBRTE_PMD_CPT=3Dn
>=20
> Please enable this option  by default, If there are arm64 specific usage =
then
> please stub it out so that it can compile on all architectures. It will h=
elp to verify
> the API changes across the architecture by author.(i.e author should not =
depend
> arm64 box to verify the compilation changes) and enable distribution OS s=
upport
> like Ubuntu as they building with default arm64 config.

Agreed. Actually, I thought this was disabled because of the dependency wit=
h libcrypto
(based on the Makefile below), but actually it is not needed.
Also, move this where the other crypto drivers are.

>=20
>=20
> > +CONFIG_RTE_LIBRTE_PMD_CPT_DEBUG_INIT=3Dn
> > +CONFIG_RTE_LIBRTE_PMD_CPT_DEBUG_RX=3Dn
> > +CONFIG_RTE_LIBRTE_PMD_CPT_DEBUG_TX=3Dn
>=20
> This config option is not required when we are using dynamic debugging
>=20
> > +
> > +#
> >  # Compile raw device support
> >  # EXPERIMENTAL: API may change without prior notice  # diff --git
> > a/drivers/crypto/Makefile b/drivers/crypto/Makefile index
> > 1d0c88e..a0515f3 100644
> > --- a/drivers/crypto/Makefile
> > +++ b/drivers/crypto/Makefile
> > @@ -22,5 +22,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)
> >  DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC) +=3D dpaa_sec  endif
> >  DIRS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) +=3D virtio
> > +DIRS-$(CONFIG_RTE_LIBRTE_PMD_CPT) +=3D cpt
> >
> >  include $(RTE_SDK)/mk/rte.subdir.mk
> > diff --git a/drivers/crypto/cpt/Makefile b/drivers/crypto/cpt/Makefile
> > new file mode 100644 index 0000000..b2d950d
> > --- /dev/null
> > +++ b/drivers/crypto/cpt/Makefile
> > @@ -0,0 +1,40 @@
> > +
> > +include $(RTE_SDK)/mk/rte.vars.mk
> > +
> > +# library name
> > +LIB =3D librte_pmd_cptvf.a
> > +
> > +# library version
> > +LIBABIVER :=3D 1
> > +
> > +# build flags
> > +CFLAGS +=3D $(WERROR_FLAGS)
> > +
> > +# external library include paths
> > +CFLAGS +=3D -I$(LIBCRYPTO_THUNDERX_PATH)/include
> > +LDLIBS +=3D -L$(LIBCRYPTO_THUNDERX_PATH) -lcrypto
>=20
> What is the external library dependency here? Does look like it is docume=
nted in
> doc patch.
>=20
> If there is something, I think, better to change LIBCRYPTO_THUNDERX_PATH =
to
> LIBCRYPTO_OCTEONTX_PATH

Is this needed? I don't see any dependency with libcrypto and I don't see t=
his variable
documented in the driver guide.

>=20
> > +LDLIBS +=3D -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS +=3D
> > +-lrte_cryptodev LDLIBS +=3D -lrte_pci -lrte_bus_pci
> > +
> > +VPATH +=3D $(RTE_SDK)/drivers/crypto/cpt/base
> > +
> > +CFLAGS +=3D -O3
> > +#CFLAGS +=3D -DAUTH_SOFT_COMPUTE_IPAD_OPAD #CFLAGS +=3D -
> DCPT_DEBUG
>=20
> Remove commented out stuff.
>=20
> > +
> > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_CPT) +=3D
> > +
> > +# export include files
> > +SYMLINK-y-include +=3D
> > +
> > +# versioning export map
> > +EXPORT_MAP :=3D rte_pmd_cpt_version.map
> > +
> > +# library dependencies
> > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_CPT) +=3D lib/librte_eal
> > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_CPT) +=3D lib/librte_cryptodev
> > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_CPT) +=3D lib/librte_mempool
> > +lib/librte_mbuf
> > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_CPT) +=3D lib/librte_malloc
> > +
> > +include $(RTE_SDK)/mk/rte.lib.mk
> > diff --git a/drivers/crypto/cpt/rte_pmd_cpt_version.map
> > b/drivers/crypto/cpt/rte_pmd_cpt_version.map
> > new file mode 100644
> > index 0000000..9b9ab1a
> > --- /dev/null
> > +++ b/drivers/crypto/cpt/rte_pmd_cpt_version.map
> > @@ -0,0 +1,4 @@
> > +DPDK_18.05 {
> > +

DPDK_18.08.

> > +	local: *;
> > +};
> > diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 1e32c83..158066d
> > 100644
> > --- a/mk/rte.app.mk
> > +++ b/mk/rte.app.mk
> > @@ -209,7 +209,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC)   +=3D
> -lrte_pmd_dpaa_sec
> >  endif # CONFIG_RTE_LIBRTE_DPAA_BUS
> >  _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) +=3D
> > -lrte_pmd_virtio_crypto  endif # CONFIG_RTE_LIBRTE_CRYPTODEV
> > -
> > +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CPT)   +=3D -lrte_pmd_cptvf

This should be inside ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y).

> >  ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y)
> >  _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) +=3D -lrte_pmd_isal_comp
> >  _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) +=3D -lisal
>=20
>=20
> You can add meson build as well here on the same patch.
>=20
>=20
> > --
> > 1.9.3
> >