From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10078.outbound.protection.outlook.com [40.107.1.78]) by dpdk.org (Postfix) with ESMTP id 8D5371B4C7; Tue, 23 Oct 2018 15:47:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+QB7l666g0yKzb3z178NVKlYxAjBsmG4aUij08mtyVc=; b=b7AXwEjThpfXJnNGXqEj2GOJFyXUqY428+1fbEqkQNhg4ghpoyrfxCE3/lN6ircun1ckFnBNkUF5MiKCVirFk14AwiV73CHXGv3mT8XF781nuOO40IUCUUvkCnysaxv/RtggbwfEy17zeJL+MY2xFs3q0ivn35cT/Ix961Sza+Y= Received: from VI1PR04MB4893.eurprd04.prod.outlook.com (20.177.49.154) by VI1PR04MB4063.eurprd04.prod.outlook.com (10.171.183.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 23 Oct 2018 13:47:06 +0000 Received: from VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::70c8:7997:4cf:743f]) by VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::70c8:7997:4cf:743f%2]) with mapi id 15.20.1250.028; Tue, 23 Oct 2018 13:47:06 +0000 From: Akhil Goyal To: "dev@dpdk.org" , "thomas@monjalon.net" CC: Hemant Agrawal , Gagandeep Singh , Akhil Goyal , "stable@dpdk.org" Thread-Topic: [PATCH] drivers: fix compilation if security disabled Thread-Index: AQHUatbii+fjIWeZCkyN1WoPelDkcQ== Date: Tue, 23 Oct 2018 13:47:06 +0000 Message-ID: <20181023134224.26246-1-akhil.goyal@nxp.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0100.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::16) To VI1PR04MB4893.eurprd04.prod.outlook.com (2603:10a6:803:56::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR04MB4063; 6:95fGQjNA/dzy4FR6EBpGRygKx55Zb7Eu9Cce8CXRb6d4pHcpawMcNunoJAYj99TCBLLTvaJ8DfQirFFIwcWNSTGAUEsakk5YJ+8U3AvW10Wzp134kLsGFVftYKn/At3MyxQoU2jhj3ReOW472wXFBImT0dkEAoL91eGiPqEDn3bSuDDuDb+LPeQvwaFYKj/94lrC2HJOgfXy9rApbFt2MmlI7H39gGTnn+/pfhr1Wc7KeINlQiH7wwA1fA/GJ+ifFccsRc6kbNpGJQdeNvK1TKAoxKYr3bGp0BBXzhyK4Vwo48DT1Nb6DRRTwViPi87cC9cl9Obh6sotCOG9BjgbPvjQ69rIpZE9wHFkgBBbEgBS+D2CJNcAkj3X4dE76auCo6k+ZYmY304qb3qvCDn7pIHVgLmEFHRdNNiN3+lQIYIrako9EvOS37/zCSuplI9M7HxJl8ZIcLukdmiYk/+NUg==; 5:3rRA5Wtd32MA069U63uUSN5C1J7frQ/fF1gp+WGzbIhj55w1ah1eo6NjXi9ApO8TTUdHGpQdaOn8oBN0UuDKByFNZAZanFHiIRuPwgXdnD54aLnB1ZHA/NycBVk9Iz0RAlOfvC4cmczdxiTj9XR8rha/03vIFAs8PK8AUSf5ej0=; 7:oJ4ZA5+sOa9BazFRyWBeMctjVMH0pnLNUYuPLddrH4/3wVFw4ou4Hd9p1DnqyNMNl2IHD/l5PlMvlVvlQkqmui7aB9pJrcF6GFUyI30WcZMTj+fMkQux7AE8i+qYDAIDz0uQm3H2mcVEFsD9Gm+uf4cu2nR9ygf9o9euyl7rsXaSs541Dciv1bwqpcKoOYrvTJAx+Rf8GeMhcPdo2xVhyVeCBMqfMMeGUdqZ2PP3f81ppfzO1fI4DqTwc6/cpwvM x-ms-office365-filtering-correlation-id: 4572ad5c-fa30-4bdf-1033-08d638ee053c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB4063; x-ms-traffictypediagnostic: VI1PR04MB4063: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(192374486261705)(185117386973197)(275809806118684); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:VI1PR04MB4063; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB4063; x-forefront-prvs: 0834BAF534 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(376002)(136003)(39860400002)(199004)(189003)(6512007)(7736002)(2900100001)(575784001)(305945005)(6506007)(106356001)(386003)(105586002)(478600001)(36756003)(71200400001)(25786009)(316002)(71190400001)(110136005)(53936002)(54906003)(26005)(66066001)(52116002)(99286004)(2616005)(6486002)(476003)(5660300001)(6436002)(1076002)(2501003)(8936002)(486006)(102836004)(2906002)(55236004)(68736007)(8676002)(3846002)(44832011)(81156014)(14454004)(86362001)(6116002)(97736004)(256004)(14444005)(1857600001)(186003)(5250100002)(81166006)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4063; H:VI1PR04MB4893.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: lRPyJ8CcAutOerm1n+1byiF/n/0rkE5AwR+MHDqF7s+5C0Eed2lLYS/9hlpHDR0JBjQVDqHuOyspmVCv21LmER4KRekPJZmLm2qLz/d2lfCQZdCnq/Yaazff8Z+kHXEIHeraPdVtRgAJZajX0kPGe9d53TfX4+PlBQUVK/3Q60C1PQtW6cKs4OG1ym0k1We/pPaYGUsKaTtAreu/kGUHZdjSlylsILFjiv/U6WjfnoV3d2RxlpX11m1TVvDLd+JCvU5XZF9Kd8sUJbG3qSzQ3Le2rXVAP3K/xa9XEy+XGcS5CMVgA8UA4wc3/qsQjvzFJG/s+qtKHsHwlZpYh6T4+g4K4++h0+DUckMitL5948k= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4572ad5c-fa30-4bdf-1033-08d638ee053c X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2018 13:47:06.6166 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4063 Subject: [dpdk-dev] [PATCH] drivers: fix compilation if security disabled 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, 23 Oct 2018 13:47:08 -0000 RTE_SECURITY is enabled by default. If it is disabled, dpaa2_sec, dpaa_sec and caam_jr compilation fails. This patch fixes compilation by disabling these drivers when rte_security is not available. Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8") Fixes: 09e1e8d256b0 ("mk: fix dependencies of dpaaX drivers") Fixes: af7c9b5e9ce7 ("crypto/caam_jr: introduce basic driver") Cc: stable@dpdk.org Signed-off-by: Akhil Goyal --- drivers/crypto/Makefile | 8 +++++--- drivers/crypto/dpaa2_sec/Makefile | 7 ------- drivers/event/dpaa2/Makefile | 5 ++++- drivers/event/dpaa2/dpaa2_eventdev.c | 6 ++++++ mk/rte.app.mk | 3 +++ 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile index c25a19fb0..009f8443d 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -6,7 +6,6 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) +=3D aesni_gcm DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) +=3D aesni_mb DIRS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) +=3D armv8 -DIRS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR) +=3D caam_jr DIRS-$(CONFIG_RTE_LIBRTE_PMD_CCP) +=3D ccp DIRS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_CRYPTO) +=3D octeontx DIRS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) +=3D openssl @@ -16,12 +15,15 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) +=3D kasumi DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) +=3D zuc DIRS-$(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO) +=3D mvsam DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) +=3D null +ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y) ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy) DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) +=3D dpaa2_sec -endif +endif # CONFIG_RTE_LIBRTE_FSLMC_BUS ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y) DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC) +=3D dpaa_sec -endif +DIRS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR) +=3D caam_jr +endif # CONFIG_RTE_LIBRTE_PMD_DPAA_SEC +endif # CONFIG_RTE_LIBRTE_SECURITY DIRS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) +=3D virtio =20 include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/M= akefile index 8b8dfd2ab..f537f76a6 100644 --- a/drivers/crypto/dpaa2_sec/Makefile +++ b/drivers/crypto/dpaa2_sec/Makefile @@ -4,13 +4,6 @@ # =20 include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(CONFIG_RTE_LIBRTE_SECURITY),y) -$(error "RTE_LIBRTE_SECURITY is required to build RTE_LIBRTE_PMD_DPAA2_SEC= ") -endif -endif - # # library name # diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile index 73e8fd8a7..e0134cc46 100644 --- a/drivers/event/dpaa2/Makefile +++ b/drivers/event/dpaa2/Makefile @@ -22,10 +22,13 @@ LDLIBS +=3D -lrte_eal -lrte_eventdev LDLIBS +=3D -lrte_bus_fslmc -lrte_mempool_dpaa2 -lrte_pmd_dpaa2 LDLIBS +=3D -lrte_bus_vdev LDLIBS +=3D -lrte_common_dpaax -LDLIBS +=3D -lrte_pmd_dpaa2_sec CFLAGS +=3D -I$(RTE_SDK)/drivers/net/dpaa2 CFLAGS +=3D -I$(RTE_SDK)/drivers/net/dpaa2/mc + +ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y) +LDLIBS +=3D -lrte_pmd_dpaa2_sec CFLAGS +=3D -I$(RTE_SDK)/drivers/crypto/dpaa2_sec +endif =20 # versioning export map EXPORT_MAP :=3D rte_pmd_dpaa2_event_version.map diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpa= a2_eventdev.c index a89d1be5c..8d168b028 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -35,7 +35,9 @@ #include #include #include +#ifdef RTE_LIBRTE_SECURITY #include +#endif #include "dpaa2_eventdev.h" #include "dpaa2_eventdev_logs.h" #include @@ -795,6 +797,7 @@ dpaa2_eventdev_eth_stop(const struct rte_eventdev *dev, return 0; } =20 +#ifdef RTE_LIBRTE_SECURITY static int dpaa2_eventdev_crypto_caps_get(const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, @@ -937,6 +940,7 @@ dpaa2_eventdev_crypto_stop(const struct rte_eventdev *d= ev, =20 return 0; } +#endif =20 static struct rte_eventdev_ops dpaa2_eventdev_ops =3D { .dev_infos_get =3D dpaa2_eventdev_info_get, @@ -959,11 +963,13 @@ static struct rte_eventdev_ops dpaa2_eventdev_ops =3D= { .eth_rx_adapter_queue_del =3D dpaa2_eventdev_eth_queue_del, .eth_rx_adapter_start =3D dpaa2_eventdev_eth_start, .eth_rx_adapter_stop =3D dpaa2_eventdev_eth_stop, +#ifdef RTE_LIBRTE_SECURITY .crypto_adapter_caps_get =3D dpaa2_eventdev_crypto_caps_get, .crypto_adapter_queue_pair_add =3D dpaa2_eventdev_crypto_queue_add, .crypto_adapter_queue_pair_del =3D dpaa2_eventdev_crypto_queue_del, .crypto_adapter_start =3D dpaa2_eventdev_crypto_start, .crypto_adapter_stop =3D dpaa2_eventdev_crypto_stop, +#endif }; =20 static int diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 3203cf0ad..c0036daf8 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -234,12 +234,15 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) +=3D= -L$(ARMV8_CRYPTO_LIB_PATH) - _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO) +=3D -L$(LIBMUSDK_PATH)/lib = -lrte_pmd_mvsam_crypto -lmusdk _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_CRYPTO) +=3D -lrte_pmd_octeontx_c= rypto _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) +=3D -lrte_pmd_crypto_sc= heduler +ifeq ($(CONFIG_RTE_LIBRTE_SECURITY),y) ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) +=3D -lrte_pmd_dpaa2_sec endif # CONFIG_RTE_LIBRTE_FSLMC_BUS ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC) +=3D -lrte_pmd_dpaa_sec +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CAAM_JR) +=3D -lrte_pmd_caam_jr endif # CONFIG_RTE_LIBRTE_DPAA_BUS +endif # CONFIG_RTE_LIBRTE_SECURITY _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) +=3D -lrte_pmd_virtio_crypt= o endif # CONFIG_RTE_LIBRTE_CRYPTODEV =20 --=20 2.17.1