From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 662ADA054A; Tue, 7 Jun 2022 14:28:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F3144021D; Tue, 7 Jun 2022 14:28:41 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5987B40156 for ; Tue, 7 Jun 2022 14:28:38 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2576iSsA008292; Tue, 7 Jun 2022 05:28:37 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2174.outbound.protection.outlook.com [104.47.56.174]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3gj1p1s6hw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Jun 2022 05:28:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dvtIz93HORoC8uyc/6tNHkFCWhO5nKZNdQrco4rGeOkvwTIiUrCVKzjdVjH1geKQoTtk6D6ZwTXjldMcXNngIs6kSnLV8WFkk702xAW4bXAwA6I7aESSXJdkK8PCLvqqN883fSRB+1vRVWdgsIYGBebYJ8OcUoy5Kv0j5evuvFKnRwYkpIdqqU+7wJ0llw6wkWTZDP9oSFHlxjIkhRHRxukUzSIodBzckO5HZlGoxTU6b+BBMsW83d09redGN265OzUZded/SHGswiR6atxCLPnHPdrBZHOxZk1LUOqrfx8c5qRToNubN6O4wGqT6IAyKTm/P3J422mOS2Xn1jY5CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6BPkYnnBh+2eW5Fvk9kw/NX3xAG9DU4SwdZXvqtvHN0=; b=Z/RO9G+la5fZBoiGybX0JA6Su9Vg+fqttGcwlXIHzQx43ygU1bVUgoF7CSme62/80iitrp6fyJI86nt9CGG5yCbcRCsbktXi2A5O2q5LRBFlE/FAN9tp6vQ4LoWC4IrfNb6TMHjRkFF40GoInvZa4gb7uXtpNVf8YlkE6SXkUo4rZdtT91Plg5eDwtybX2nlbrKDQiyqJ80h6RhjNbH89E7zHFutMgNGGOa5SalCbtm+eq9sLcvEKREZemiBFbpJqyJTD4b5OLzG9F5ADVqfQHWAiyk9MIO/5AUzTv2fgzNM7ekv52qSW22OqmHToceTc852G8h5FxwLckMkt0pXLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6BPkYnnBh+2eW5Fvk9kw/NX3xAG9DU4SwdZXvqtvHN0=; b=XXz17jxobPu37EUZKcxZIeg1m92wronmXqem6x9vqfe1irKknWEZPITXFk/SXr6i8brrSd7/uizy8t8OzEzzMohQU4Mdi8Dxn4mrlCPP5UIiFw4+I/7JK+91JNtb25JYf9cY/dnhCQTF/hUorQCQZr09pv1aEhKl8eIa/JuGDsI= Received: from CO1PR18MB4714.namprd18.prod.outlook.com (2603:10b6:303:e9::18) by DM5PR18MB1370.namprd18.prod.outlook.com (2603:10b6:3:148::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.19; Tue, 7 Jun 2022 12:28:34 +0000 Received: from CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::f5b1:af25:ac02:89df]) by CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::f5b1:af25:ac02:89df%4]) with mapi id 15.20.5314.019; Tue, 7 Jun 2022 12:28:33 +0000 From: Gowrishankar Muthukrishnan To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , Fan Zhang , Brian Dooley , Brandon Lo Subject: RE: [EXT] [PATCH] examples/fips_validation: fix link to libjansson Thread-Topic: [EXT] [PATCH] examples/fips_validation: fix link to libjansson Thread-Index: AQHYelWw9WiMT5GAfk+GHEugDxzP8q1D3R0w Date: Tue, 7 Jun 2022 12:28:33 +0000 Message-ID: References: <20220607100203.1611166-1-david.marchand@redhat.com> In-Reply-To: <20220607100203.1611166-1-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c67864a9-3f4c-4d87-93d1-08da48813d0b x-ms-traffictypediagnostic: DM5PR18MB1370:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aqCNmV2qgM35FA6610gMazwtsFKTA55DvNb/SO94fJFcadewxno6ESefhjNzBcM0UFRRKlDCe79ZcKNOujUkCUIa+4pQXH70icYOAFzONEpkeG2AxPhWmT89CQ/wI5dhIuwXmkIsR+h3azOWv1hPLck5yrUvAM1kb5fxKQeuRuvJdgHScQsAUknT0liD5R8VsXWDGW2s4mEhoiUOsF4WYvEOuwkKO9uXwSAWqGnhCrI2JRJ2yVj0eFDtmn5hb4SupDkOgKSrTABNExPfoi/ismGsuVhBDgk6VwRj4cRTDzGJs3xoZ52f4PnZ3R81AFQp+q4I7TOEvxTiCtDgew9KbAKdaNEmkxaawz0zLVxS5GBGiS0c+x8pii8CHofvG+bthNbb5sKGsqzmckypVT8GE6+2UGn5Sd9dNafl3IsuRcsnAvkj++sYXSQvo65fiNJk6R9ND8t84fVegkX27GwwLWBMZm0um5Iy6o3MYlgRZmnlKDU1OJQ1jaYugd/CD0e5THWF8coBgZcGL6QwXqjaDBr8NuXZj32qgJRI4YGepmR1IDG+JkSvmtqOTG0AtJPxg3X69wc45VSSnal9tQbiRWAYbQvZM5hGaqpoN4uwoEdk/D4HpUllbYk0iq1HZoLhFP2E2vTe+KtAgVlAK6VxDMFoEBZRVb7L1NqquEDFGvzeWQ39vlydwN3ibKeQd7x9dYybQhuLZlgya5/U9zAUpw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR18MB4714.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(8936002)(66476007)(66446008)(38100700002)(5660300002)(76116006)(508600001)(8676002)(86362001)(30864003)(52536014)(122000001)(71200400001)(55016003)(38070700005)(66556008)(64756008)(83380400001)(2906002)(4326008)(66946007)(186003)(53546011)(7696005)(6506007)(33656002)(9686003)(26005)(54906003)(316002)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HtRb51mlkFTiZ9L967gZmqXo3WDiVad32mbPAzqqT65wdtia0otx45dB5BwZ?= =?us-ascii?Q?wKpR9CWv2XbkQMTKhLVPuGpK295MaNvWswG0KVKpLMSDnVhGV44nBNOxdEWz?= =?us-ascii?Q?0VwCTBj1CUHFIdZ32VTmmS02gkKxRRQ8b2F6nh5mRgX/o2CpsE9pgniKzCjJ?= =?us-ascii?Q?iERhAPSE7+Tee3E5DmBKvk7TizEBIaXfwIeYVEF3C0Jo1PnQgC3ZWq+xSet4?= =?us-ascii?Q?9Rd9K0EBxIrUXNp4zMk9pEXzQ2GsjIwQg1bgAuB2/QlHteP1kojbsAWgszPZ?= =?us-ascii?Q?Nlr4yDdPhZFcPZKQV59I9eS9SxRL48N/KQ0FqPU21aAb++k689INmulWLpks?= =?us-ascii?Q?xcZjcRWvXUKbM0U4Nnh03lCz3qqi2pvNHD8e7X7Jn/kg2ZwsC77PrXYidHFL?= =?us-ascii?Q?ZlE76eP4XgKgSxil1TsXfche+ksE7Kn375GzgJnhN4a2v8jgGAHk0N/eyYki?= =?us-ascii?Q?U6eZwHpc46w5l8j9rygTfSP52Rd3QGuUPZjmicBH7J7f6wKET6dpftRuIWQn?= =?us-ascii?Q?JZzHZ7SzIUL1YJ8bvVj4PHTYi8QhAH6VOUQuU7+wnVfmFLeB+W4YgSavxN/2?= =?us-ascii?Q?2PWSQSRtMX1WdgNwNaq/gCJLYeS+WC+wbxq9MpD0CJNdQ3uXK2vSZyOK4TpY?= =?us-ascii?Q?98eYP8J26wicWIRPOIaU4VuKMMbhCu0wZ47BccCY0siGs/XcnB0Fn00Q3WHp?= =?us-ascii?Q?YxEYXGprkNes9DbcSXRNh6jqIb7OJIL10I01X/apXnuQ8Zskt8L5qqDuNh78?= =?us-ascii?Q?UWRbF9IPkvJr6dQ46iAqPEnDSio9j/mRjRmDa5hZOtlwvrh+7QZCUxpg3bp6?= =?us-ascii?Q?Mo8tXGgjuIZq5VqdeYkFgAQXnNWkLr6Tq+SmUXqYODVXQGEK+rxxDF1qlruj?= =?us-ascii?Q?ILJ2qX2C+euBhKV78/vL79QgAaPzpwsdMLb9CeBRqdgUzqLvGNPw+Q5vKMLf?= =?us-ascii?Q?9cs92pVonwGFSt9YjPiOSdSXCKVUs2IxklLU249rjbWbBk/MNWspOjiVxq2K?= =?us-ascii?Q?DIrV2uxVwnadgvc3ZVX0/Ysxv4N58EAj37HX4hxWRVzZazjNlZ8LfyXTAYDr?= =?us-ascii?Q?q2/+5KiNMSekkc1SLdydPK8Q5LBgr+gcWPi/tK1/T1zXP7+dtmfV9Kthqdqz?= =?us-ascii?Q?6lFZEhL4tonOwHS5xPRPfEa5pesmHcKMRlMkhnuHYXiwsyrbggMLmY2MD3KW?= =?us-ascii?Q?YDiHFLoMEqS6e3NzzJjXoHngzhTABJiEBgffrmc6cljPW+Ix7PsITJYbSvz7?= =?us-ascii?Q?KH+d8E29t0Z7cJ3yLhkUrGKUpxfVU1RVFnzPMHiaidoIX4xh34RMkJL4RU2t?= =?us-ascii?Q?IqVCUL3GHQb6/jkPWEtF9Wzk9Jy06suDCi+1fp6nLUYMCAiwNVNb3r6YZHOb?= =?us-ascii?Q?wyA04Fh9zTD1t2zNXZOuW3CP7KFh8/RaPyThN84nFP78jR1b4xpI3nY4kVnN?= =?us-ascii?Q?FM5FLd4ZviVnwVepq6qKMLIwDUBy+BxzBpBnFw+C+ZOK5xpfWqEiCTJuPU7z?= =?us-ascii?Q?fBq8Kk6Z6dGAJj0y5FW6RutyGv8MpfWaVMooxWxzAW4fng+klRarWKIsaZuB?= =?us-ascii?Q?VFkhKqU/UCgLlC2Tr39VRwT1u/Yb00jyuxRUMOnDK8JWyc7aSexixv7rZpZ5?= =?us-ascii?Q?vlCzhztp9yXwOoNnyDDzWOY4s+HssLtuDggSoXlnQCZiX+wEeFYEH059KQ+K?= =?us-ascii?Q?YaZsT+yN48ox7Nn2662Wh7ab+WKuf2jAmxOpdCREGPpapHBsl8XOgw7iEzAQ?= =?us-ascii?Q?ypJYJtRv9Q=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR18MB4714.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c67864a9-3f4c-4d87-93d1-08da48813d0b X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2022 12:28:33.8340 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xImx0/OMHuKGO1nnz/cnDLXi+p/p3Szarc2ZZysLn/jTocCTrKHrJyAbBktHI7ryjp2/HVGiPHc6mjqYa9SgjP38Al767Im3P+jdEiIeLMc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR18MB1370 X-Proofpoint-GUID: mc7jFjDPRmYI1hlEtQm7NhwRc3DKvIrT X-Proofpoint-ORIG-GUID: mc7jFjDPRmYI1hlEtQm7NhwRc3DKvIrT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-07_04,2022-06-07_02,2022-02-23_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: David Marchand > Sent: Tuesday, June 7, 2022 3:32 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Fan Zhang ; Brian > Dooley ; Gowrishankar Muthukrishnan > ; Brandon Lo > Subject: [EXT] [PATCH] examples/fips_validation: fix link to libjansson >=20 > External Email >=20 > ---------------------------------------------------------------------- > When compiling this example out of DPDK, linking the executable fails > with: >=20 > ## Building fips_validation > /usr/bin/ld: /tmp/ccQjeHBg.o: in function `fips_test_init': > fips_validation.c:(.text+0x7ab): undefined reference to `json_loadf' > /usr/bin/ld: /tmp/ccQjeHBg.o: in function > `fips_test_parse_one_json_vector_set': > fips_validation.c:(.text+0xc2e): undefined reference to `json_object_ge= t' > /usr/bin/ld: fips_validation.c:(.text+0xc36): undefined reference to > `json_string_value' > /usr/bin/ld: /tmp/ccQjeHBg.o: in function > `fips_test_parse_one_json_group': > fips_validation.c:(.text+0xd00): undefined reference to `json_object_ge= t' > /usr/bin/ld: fips_validation.c:(.text+0xd14): undefined reference to > `json_integer_value' > ... >=20 > Code in an example can't rely on RTE_HAS_JANSSON, because it only > indicates that the jansson library was available at the time of dpdk > compilation. >=20 > Prefer a local build flag (like what is done in vm_power_manager). > And add linking to libjansson, if available. >=20 > Fixes: f556293fd58e ("examples/fips_validation: add JSON info to header") >=20 > Signed-off-by: David Marchand Acked-by: Gowrishankar Muthukrishnan Thanks, Gowrishankar > --- > examples/fips_validation/Makefile | 6 +++++ > examples/fips_validation/fips_validation.c | 10 ++++---- > examples/fips_validation/fips_validation.h | 16 ++++++------- > .../fips_validation/fips_validation_aes.c | 4 ++-- > .../fips_validation/fips_validation_cmac.c | 4 ++-- > .../fips_validation/fips_validation_gcm.c | 12 +++++----- > .../fips_validation/fips_validation_hmac.c | 8 +++---- > examples/fips_validation/main.c | 24 +++++++++---------- > examples/fips_validation/meson.build | 1 + > 9 files changed, 46 insertions(+), 39 deletions(-) >=20 > diff --git a/examples/fips_validation/Makefile > b/examples/fips_validation/Makefile > index ff3cd4a87a..bca6647f55 100644 > --- a/examples/fips_validation/Makefile > +++ b/examples/fips_validation/Makefile > @@ -36,6 +36,12 @@ CFLAGS +=3D -O3 $(shell $(PKGCONF) --cflags libdpdk) > LDFLAGS_SHARED =3D $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC =3D > $(shell $(PKGCONF) --static --libs libdpdk) >=20 > +JANSSON :=3D $(shell $(PKGCONF) --exists jansson; echo $$?) ifeq > +($(JANSSON), 0) LDFLAGS +=3D $(shell $(PKGCONF) --libs jansson) CFLAGS += =3D > +-DUSE_JANSSON endif > + > ifeq ($(MAKECMDGOALS),static) > # check for broken pkg-config > ifeq ($(shell echo $(LDFLAGS_STATIC) | grep 'whole-archive.*l:lib.*no- > whole-archive'),) > diff --git a/examples/fips_validation/fips_validation.c > b/examples/fips_validation/fips_validation.c > index 8cec172a5f..94e31abf83 100644 > --- a/examples/fips_validation/fips_validation.c > +++ b/examples/fips_validation/fips_validation.c > @@ -314,7 +314,7 @@ fips_test_init(const char *req_file_path, const char > *rsp_file_path, > } >=20 > if (info.file_type =3D=3D FIPS_TYPE_JSON) { -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > json_error_t error; > json_info.json_root =3D json_loadf(info.fp_rd, 0, &error); > if (!json_info.json_root) { > @@ -322,10 +322,10 @@ fips_test_init(const char *req_file_path, const cha= r > *rsp_file_path, > req_file_path, error.line, error.column); > return -EINVAL; > } > -#else /* RTE_HAS_JANSSON */ > +#else /* USE_JANSSON */ > RTE_LOG(ERR, USER1, "No json library configured.\n"); > return -EINVAL; > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ > } >=20 > info.fp_wr =3D fopen(rsp_file_path, "w"); @@ -448,7 +448,7 @@ > fips_test_write_one_case(void) > fprintf(info.fp_wr, "%s\n", info.vec[i]); } >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > int > fips_test_parse_one_json_vector_set(void) > { > @@ -535,7 +535,7 @@ fips_test_parse_one_json_case(void) >=20 > return 0; > } > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > static int > parser_read_uint64_hex(uint64_t *value, const char *p) diff --git > a/examples/fips_validation/fips_validation.h > b/examples/fips_validation/fips_validation.h > index 6385ec4d8d..69d738b718 100644 > --- a/examples/fips_validation/fips_validation.h > +++ b/examples/fips_validation/fips_validation.h > @@ -5,9 +5,9 @@ > #ifndef _FIPS_VALIDATION_H_ > #define _FIPS_VALIDATION_H_ >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > #include > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > #define FIPS_PARSE_ERR(fmt, args) \ > RTE_LOG(ERR, USER1, "FIPS parse error" ## fmt ## "\n", ## args) > @@ -170,7 +170,7 @@ struct gcm_interim_data { > uint8_t gen_iv; > }; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > struct fips_test_json_info { > /* Information used for reading from json */ > json_t *json_root; > @@ -185,7 +185,7 @@ struct fips_test_json_info { > /* Other info */ > uint8_t is_sample; > }; > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > struct fips_test_interim_info { > FILE *fp_rd; > @@ -222,9 +222,9 @@ struct fips_test_interim_info { extern struct > fips_test_vector vec; extern struct fips_test_interim_info info; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > extern struct fips_test_json_info json_info; -#endif /* RTE_HAS_JANSSON > */ > +#endif /* USE_JANSSON */ >=20 > int > fips_test_init(const char *req_file_path, const char *rsp_file_path, @@ = - > 242,7 +242,7 @@ fips_test_parse_one_case(void); void > fips_test_write_one_case(void); >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > int > fips_test_parse_one_json_vector_set(void); >=20 > @@ -266,7 +266,7 @@ parse_test_cmac_json_init(void); >=20 > int > parse_test_aes_json_init(void); > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > int > parse_test_aes_init(void); > diff --git a/examples/fips_validation/fips_validation_aes.c > b/examples/fips_validation/fips_validation_aes.c > index 8db6f4fa31..4f61505bb3 100644 > --- a/examples/fips_validation/fips_validation_aes.c > +++ b/examples/fips_validation/fips_validation_aes.c > @@ -107,7 +107,7 @@ struct fips_test_callback aes_writeback_callbacks[] = =3D { > {NULL, NULL, NULL} /**< end pointer */ }; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > struct fips_test_callback aes_dec_json_vectors[] =3D { > {KEY_JSON_STR, parse_uint8_known_len_hex_str, > &vec.cipher_auth.key}, > {IV_JSON_STR, parse_uint8_hex_str, &vec.iv}, @@ -313,7 > +313,7 @@ parse_test_aes_json_init(void) >=20 > return 0; > } > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > static int > parse_test_aes_writeback(struct fips_val *val) diff --git > a/examples/fips_validation/fips_validation_cmac.c > b/examples/fips_validation/fips_validation_cmac.c > index 094e3922a4..a54744714b 100644 > --- a/examples/fips_validation/fips_validation_cmac.c > +++ b/examples/fips_validation/fips_validation_cmac.c > @@ -51,7 +51,7 @@ struct hash_algo_conversion { > {"AES", FIPS_TEST_ALGO_AES_CMAC}, > }; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > static int > parser_read_cmac_direction_str(__rte_unused const char *key, char *src, > __rte_unused struct fips_val *val) > @@ -117,7 +117,7 @@ parse_test_cmac_json_init(void) >=20 > return 0; > } > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > static int > parse_test_cmac_writeback(struct fips_val *val) diff --git > a/examples/fips_validation/fips_validation_gcm.c > b/examples/fips_validation/fips_validation_gcm.c > index 1b7bd0b729..28ef04c817 100644 > --- a/examples/fips_validation/fips_validation_gcm.c > +++ b/examples/fips_validation/fips_validation_gcm.c > @@ -6,9 +6,9 @@ > #include > #include >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > #include > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > #include > #include > @@ -161,7 +161,7 @@ struct fips_test_callback gcm_enc_vectors[] =3D { > {NULL, NULL, NULL} /**< end pointer */ }; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > struct fips_test_callback gcm_dec_json_vectors[] =3D { > {KEY_JSON_STR, parse_uint8_known_len_hex_str, > &vec.aead.key}, > {IV_JSON_STR, parse_uint8_known_len_hex_str, &vec.iv}, > @@ -193,7 +193,7 @@ struct fips_test_callback gcm_enc_json_vectors[] =3D = { > {AAD_JSON_STR, parse_gcm_aad_str, &vec.aead.aad}, > {NULL, NULL, NULL} /**< end pointer */ }; -#endif /* > RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > static int > parse_test_gcm_writeback(struct fips_val *val) @@ -277,7 +277,7 @@ > parse_test_gcm_init(void) > return 0; > } >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > static int > parse_test_gcm_json_writeback(struct fips_val *val) { @@ -367,4 +367,4 > @@ parse_test_gcm_json_init(void) > return 0; > } >=20 > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ > diff --git a/examples/fips_validation/fips_validation_hmac.c > b/examples/fips_validation/fips_validation_hmac.c > index 4cd1b1ac07..e0721ef028 100644 > --- a/examples/fips_validation/fips_validation_hmac.c > +++ b/examples/fips_validation/fips_validation_hmac.c > @@ -74,7 +74,7 @@ struct fips_test_callback hmac_tests_interim_vectors[] > =3D { > {NULL, NULL, NULL} /**< end pointer */ }; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > struct hash_size_conversion json_algorithms[] =3D { > {"HMAC-SHA-1", RTE_CRYPTO_AUTH_SHA1_HMAC}, > {"HMAC-SHA2-224", RTE_CRYPTO_AUTH_SHA224_HMAC}, > @@ -95,7 +95,7 @@ struct fips_test_callback > hmac_tests_interim_json_vectors[] =3D { > {TAGLEN_JSON_STR, parser_read_uint32_bit_val, > &vec.cipher_auth.digest}, > {NULL, NULL, NULL} /**< end pointer */ }; -#endif /* > RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > static int > parse_test_hmac_writeback(struct fips_val *val) @@ -136,7 +136,7 @@ > parse_test_hmac_init(void) > return 0; > } >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > static int > parse_test_hmac_json_writeback(struct fips_val *val) { @@ -195,4 +195,4 > @@ parse_test_hmac_json_init(void) >=20 > return 0; > } > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ > diff --git a/examples/fips_validation/main.c > b/examples/fips_validation/main.c index 332a4110e3..ceabea788e 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -41,9 +41,9 @@ enum { > struct fips_test_vector vec; > struct fips_test_interim_info info; >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > struct fips_test_json_info json_info; > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > struct cryptodev_fips_validate_env { > const char *req_path; > @@ -172,10 +172,10 @@ cryptodev_fips_validate_app_uninit(void) > static int > fips_test_one_file(void); >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > static int > fips_test_one_json_file(void); > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > static int > parse_cryptodev_arg(char *arg) > @@ -436,16 +436,16 @@ main(int argc, char *argv[]) > goto exit; > } >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > if (info.file_type =3D=3D FIPS_TYPE_JSON) { > ret =3D fips_test_one_json_file(); > json_decref(json_info.json_root); > } else { > ret =3D fips_test_one_file(); > } > -#else /* RTE_HAS_JANSSON */ > +#else /* USE_JANSSON */ > ret =3D fips_test_one_file(); > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > if (ret < 0) { > RTE_LOG(ERR, USER1, "Error %i: Failed test %s\n", > @@ -501,16 +501,16 @@ main(int argc, char *argv[]) > break; > } >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > if (info.file_type =3D=3D FIPS_TYPE_JSON) { > ret =3D fips_test_one_json_file(); > json_decref(json_info.json_root); > } else { > ret =3D fips_test_one_file(); > } > -#else /* RTE_HAS_JANSSON */ > +#else /* USE_JANSSON */ > ret =3D fips_test_one_file(); > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ >=20 > if (ret < 0) { > RTE_LOG(ERR, USER1, "Error %i: Failed test > %s\n", @@ -1920,7 +1920,7 @@ fips_test_one_file(void) > return ret; > } >=20 > -#ifdef RTE_HAS_JANSSON > +#ifdef USE_JANSSON > static int > fips_test_json_init_writeback(void) > { > @@ -2084,4 +2084,4 @@ fips_test_one_json_file(void) >=20 > return 0; > } > -#endif /* RTE_HAS_JANSSON */ > +#endif /* USE_JANSSON */ > diff --git a/examples/fips_validation/meson.build > b/examples/fips_validation/meson.build > index 8cd63066b5..8bca26a095 100644 > --- a/examples/fips_validation/meson.build > +++ b/examples/fips_validation/meson.build > @@ -24,4 +24,5 @@ sources =3D files( >=20 > if dpdk_conf.has('RTE_HAS_JANSSON') > ext_deps +=3D jansson_dep > + cflags +=3D '-DUSE_JANSSON' > endif > -- > 2.36.1