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 ECD82A00C2; Thu, 6 Oct 2022 15:13:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA18442C52; Thu, 6 Oct 2022 15:13:30 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id CB69542C3C for ; Thu, 6 Oct 2022 15:13:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665062009; x=1696598009; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=dX2CWTwiH3niMjOt7KQE6btLGJcA7kuoz/IP3ihFOjA=; b=e0kl9VMqGPQcMabpipfp/W/a8i8RGsjC4ahPYJnePPJk7MrOHY8m95GP bCdgSohcAJbjdY/7eiGxTsfgEMJkbFkfHxJyAkYYQ6XtI0koLhnEls2A1 MJa/Z6FzLsp/5sfJasQVnJzE8yXFIJTslsN0x/37Yh29wX03QoWH0Adt0 4O1eBt2Ho+TgbRwyipTd/FMsy+y0DAchLT3CSbaQb3KJ3wugEaMo/uv7Q cQ28HW5dIARrOWlk7UqGpDppTRP3EHlLEYqsAtwjGj6II5lbrJ7prWgt7 hfRleGV4zPZdj2FmC3c+5mky0aLQ3J2HbKU3kBT5p09cdxdBTxwn2qD3D g==; X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="389728033" X-IronPort-AV: E=Sophos;i="5.95,163,1661842800"; d="scan'208";a="389728033" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 06:13:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="627011584" X-IronPort-AV: E=Sophos;i="5.95,163,1661842800"; d="scan'208";a="627011584" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 06 Oct 2022 06:13:27 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 6 Oct 2022 06:13:27 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 6 Oct 2022 06:13:27 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 6 Oct 2022 06:13:27 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.104) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 6 Oct 2022 06:13:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dfHXkLzOKjrTiJuU8t/38UUSyxdkXK62DX5yta7kLyOPvr13QKBD6ud111ofosMg2G7VCnYD2+1S79V8ED9gdgKxxohhAMh+BUwDMHdFj95v5BzqpQ2YZ/3m9vGRLMX2oBUFgXAAK8W3OujjeeI3BXqbDM3orbXGOTFtTzprg0moyc3i9TU2b80AdD4dbd3quAWPWhZfNdzfMpRMcLOX1m1l26vNrGm3TQsRsxmfLhQenkkSpYVc96KhEteJuwkDOevljDrqM++vsyCA9HxdV5LIH2UK5yAwLTTNaxqPPwTSkT81GskVBh/2um+Hd7vcajuVb4xNIefD5mbzSp3PWQ== 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=6/PqOtVhtPv7wBmNokl1oYE1n5QAXOkFUREP4khU080=; b=haoHcMmSlGIMjbQQ2Wp6d1xPikI0+yxPr812BEtqmqmFBVlh66AJ3DUMMFDnShTApS0rfWMBX5GW7Yv7xV/0MaUMF6fBHhmefuDODC3lap3QPx5k7NY8UIHA3gNLRAdecnQWEtIyCidKXwHrMC+mqiROSFbrfaU974iypvZ4RTXdGzjZkbsbPOgrYzcoR5H3d0cRsNNeCLaSa91i0CWo44hBk1+D8HZoKfZbFbG4Xeo8JhBe3CsX8Mstm+8oXv+GIA4e+OwuQYaiLDCowyO1HG3clDVegCxndxVxl9223sXnRmjm7MmVg8/FQzQ+60YGs2tDSLxto2OZmHWnFNpazA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CY4PR11MB1848.namprd11.prod.outlook.com (2603:10b6:903:123::22) by MW4PR11MB6935.namprd11.prod.outlook.com (2603:10b6:303:228::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Thu, 6 Oct 2022 13:13:24 +0000 Received: from CY4PR11MB1848.namprd11.prod.outlook.com ([fe80::38c9:96ab:bbf6:1b30]) by CY4PR11MB1848.namprd11.prod.outlook.com ([fe80::38c9:96ab:bbf6:1b30%10]) with mapi id 15.20.5676.036; Thu, 6 Oct 2022 13:13:24 +0000 From: "Dooley, Brian" To: Gowrishankar Muthukrishnan , "dev@dpdk.org" CC: Anoob Joseph , "Zhang, Roy Fan" , Akhil Goyal , "jerinj@marvell.com" Subject: RE: [PATCH v2 1/2] examples/fips_validation: share test callback with multiple keys Thread-Topic: [PATCH v2 1/2] examples/fips_validation: share test callback with multiple keys Thread-Index: AQHYrkH9g8NuNTYmYEOFntuCc+fs564BrfHw Date: Thu, 6 Oct 2022 13:13:24 +0000 Message-ID: References: <73d188a54d126678538a1a2b7d8b9aae95e4e6d8.1657694117.git.gmuthukrishn@marvell.com> <20220812115201.1032352-1-gmuthukrishn@marvell.com> In-Reply-To: <20220812115201.1032352-1-gmuthukrishn@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY4PR11MB1848:EE_|MW4PR11MB6935:EE_ x-ms-office365-filtering-correlation-id: 194ad816-a7bd-4efa-a96a-08daa79c8cec x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QccyoVGz8LTsr/KqRrjVWDsSn6e0PgWmA+5U6hV/PBjg2T+dEYwluLCDlomSkdPYGe7iDaCa+8XOtG09Q42SyBuK3AQu2NptcMe6yG1x9NaoLyCOebv8BvOCko6bMj1bMzBfc5G9nr+USljKGXq1pH4kOTzgtyM9TH+Y3C9n9L1AB9DCyFqkvmCuGiViD2KhudgOAfB6qdP2PI9z0h4rVuo+a6RE9kVK8jto8TAYZSTA0HB5DQUvNobTiPh/JS3k9HVRrWQJBfBpAhGnnmWAfuQPuEPNwW8d91rvtl1SivMJKqcYRfE/9F5kozKIqxMshs4a7Z4GKgC6pcdBqAhDfmSQAVft6PciT1pIQs5L7xCg/c+ER+72i6VSiDnNWn2egTsAcybDTsj+ZE78FpXR14AGBv2ele2amgCBHAV3CUXkhsDBXJYIE1KpciFMU7tvh48uCFV7v5m2DbfH4G6DPii0xn9Y3QUT2+aX7q0Wm9+hyHNPY/M04HelxGotBfiuUkgbjvw82pMQ/HqTAE92aBURIsIIWPZjlvDHBh5A9w3Kzb+ZKRwTFAjMokyjnmsZre0t3WOa8iXSeuZA+nGgbq63VKjPct8BfgpCEwrUHgbe5pBDHBwrkOucVP29dj+aqsIaUfvgJKL7ws20P0NTARNerm02Oa2QULkE7giKRLjv/rveK+bMFgZBUl5e4x/IAhNQqtSf5qOexE0ws5j9BpAwkK02OJJLCQTC8Iq+hTQ73x5HAaxfDKKSeNtidsmTifpE5c8Di0SFFHeqftE7CA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR11MB1848.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(376002)(346002)(366004)(136003)(396003)(451199015)(52536014)(66446008)(41300700001)(66556008)(5660300002)(76116006)(8676002)(64756008)(66476007)(86362001)(8936002)(66946007)(54906003)(316002)(110136005)(55016003)(33656002)(4326008)(2906002)(83380400001)(38070700005)(7696005)(122000001)(38100700002)(82960400001)(71200400001)(186003)(6506007)(9686003)(26005)(53546011)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Rq6ZfaIZT0hKgSMpWnZra6VU3oulBr0ytWkbhSnJa2ibqhAx8h5dfaX/Yoar?= =?us-ascii?Q?glUFcYzFLaWp5Td3vs0RY92VygJb2LccoBUvz87Ot9SGn0R1mDdzDXeyhpcY?= =?us-ascii?Q?V8RyLsTzsqLJIF/oOnvfFuqbccfTvEa+wLPiu2nUi3Z9C7r5jS+itLJZGp2O?= =?us-ascii?Q?0Fp82Rl8hlrb1bnoPqURPJadAbvhujT3hJ+fv/DyhqbJyJsRYSWD9NseTogJ?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BFkPBXMdf9bJbhEieLIKa7il3qxFskq?= =?us-ascii?Q?iQtELyzj/JQUv3qKSFuWsvfCxcZSV9y2NCM1nOT4WGmRd5JWdu838G8JvQ2H?= =?us-ascii?Q?eyGASKnLOa7/fCU/a7SnBSXaDWDJXRB99cye72udbBPf36L++CYdwBNIxaep?= =?us-ascii?Q?NmlVD5TzxNF+X/cp22Vp7DYnMuQ0pLbufZOdnEQUEVUcCE/POVPpc8Gfcs1P?= =?us-ascii?Q?Ky4EWMUhRqeClTApXH4eMB/hGk0ZXUSzka8z5RApWGPCSdcdUCZBGLUHm7ow?= =?us-ascii?Q?8ubToojvhhC+FyeavyuBZsmButE8Q3fcxR55bd6VpF9ypZlVEgzaa+f5MWsK?= =?us-ascii?Q?T50o2bXoNzP2OnrOQoatZ7GnaZno3tc3jgnXVbDV6d2XG+LyGw4Oy3IK7nDx?= =?us-ascii?Q?DSo2cpmkR2LFUZiHWD5EV6ECnVAxzQVHYZ4z4UvkOnUi2fi/A62TzqSswWSK?= =?us-ascii?Q?+ahlrRHOdFqnuSHap9s7vceeFSzSGhtvZ/18yHjU?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1848.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 194ad816-a7bd-4efa-a96a-08daa79c8cec X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2022 13:13:24.7090 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FCOtyhuo8lgrnAc7dXedEI56l11Lv3qycC8BGdwvxu2wcId/B2ne+23autCjY9lUChGdvci10ooAMBl2JfxNSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6935 X-OriginatorOrg: intel.com 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: Gowrishankar Muthukrishnan > Sent: Friday, August 12, 2022 12:52 PM > To: dev@dpdk.org > Cc: Anoob Joseph ; Zhang, Roy Fan > ; Dooley, Brian ; Akhil > Goyal ; jerinj@marvell.com; Gowrishankar > Muthukrishnan > Subject: [PATCH v2 1/2] examples/fips_validation: share test callback wit= h > multiple keys >=20 > Make use of key param in test callbacks so that, test callback can be sha= red > with multiple keys. >=20 > Signed-off-by: Gowrishankar Muthukrishnan > --- > examples/fips_validation/fips_validation.c | 27 +++++++++++++++------- > 1 file changed, 19 insertions(+), 8 deletions(-) >=20 > diff --git a/examples/fips_validation/fips_validation.c > b/examples/fips_validation/fips_validation.c > index 12b9b03f56..9678aa2161 100644 > --- a/examples/fips_validation/fips_validation.c > +++ b/examples/fips_validation/fips_validation.c > @@ -499,11 +499,8 @@ fips_test_parse_one_json_group(void) > return -EINVAL; > } >=20 > - /* First argument is blank because the key > - * is not included in the string being parsed. > - */ > ret =3D info.interim_callbacks[i].cb( > - "", json_value, > + info.interim_callbacks[i].key, json_value, > info.interim_callbacks[i].val > ); > if (ret < 0) > @@ -525,11 +522,8 @@ fips_test_parse_one_json_case(void) > param =3D json_object_get(json_info.json_test_case, > info.callbacks[i].key); > if (param) { > strcpy(info.one_line_text, > json_string_value(param)); > - /* First argument is blank because the key > - * is not included in the string being parsed. > - */ > ret =3D info.callbacks[i].cb( > - "", info.one_line_text, > + info.callbacks[i].key, info.one_line_text, > info.callbacks[i].val > ); > if (ret < 0) > @@ -625,7 +619,14 @@ parse_uint8_hex_str(const char *key, char *src, > struct fips_val *val) { > uint32_t len, j; >=20 > +#ifdef USE_JANSSON > + /* > + * Offset not applicable in case of JSON test vectors. > + */ > + RTE_SET_USED(key); > +#else > src +=3D strlen(key); > +#endif >=20 > len =3D strlen(src) / 2; >=20 > @@ -653,6 +654,15 @@ parse_uint8_hex_str(const char *key, char *src, > struct fips_val *val) > return 0; > } >=20 > +#ifdef USE_JANSSON > +int > +parser_read_uint32_val(const char *key, char *src, struct fips_val > +*val) { > + RTE_SET_USED(key); > + > + return parser_read_uint32(&val->len, src); } #else > int > parser_read_uint32_val(const char *key, char *src, struct fips_val *val)= { > @@ -676,6 +686,7 @@ parser_read_uint32_val(const char *key, char *src, > struct fips_val *val) >=20 > return ret; > } > +#endif >=20 > int > parser_read_uint32_bit_val(const char *key, char *src, struct fips_val *= val) > -- > 2.25.1 Acked-by: Brian Dooley