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 C2101A0524; Wed, 14 Apr 2021 03:00:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96524161428; Wed, 14 Apr 2021 03:00:59 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 8CB9E161426 for ; Wed, 14 Apr 2021 03:00:57 +0200 (CEST) IronPort-SDR: VQP+fiGbbFB1/VcQV18kECJR61BRHgDkzYMgfygosvwrYZb5Z6IOVQrxwEJUA2/hUzcw3NGzo2 CRX7Owht+r8A== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="258507172" X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="258507172" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 18:00:55 -0700 IronPort-SDR: vx1nG6fDIhE57mJyptkXgmlnCSxWFXVlmGiq7jzK+/dQ1e0qqTiT1VgTXAjmZl9aXA02PkXXdm yd75ajkFbyaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="424493831" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga008.jf.intel.com with ESMTP; 13 Apr 2021 18:00:55 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 13 Apr 2021 18:00:54 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 13 Apr 2021 18:00:54 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 13 Apr 2021 18:00:54 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 13 Apr 2021 18:00:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RhEAD6PvcHLw/s/C9PghZCKqElcenVTr+Viu8wJSwUyMmqIXbzalEFKxLf+97TTug0EtL5IrSNN669QE/IK446ssfelm9hnLPxgcwO33L1iOkgprxonqIs6zTIEix/ra3cX0rEtQAmbcyHRcxl7huzE3CYCNYQ0EKGRqt5DpI5uvRPKxqyX+5ki0ig8Frv5DQ/DQtGcDEv4Qgci64e8I/nMXNVlB8+ejb4mSF4YsuOWbs0Tdf7EayD7+vqowcq8GHSoTvgzpT6Rh4Ei14uzoPQgDA/lNf2RBNLn2PHJmo0CcSEzEug4szo9uf1XbxG2IfrtxQ/ed+ToCZl4X3BF/ng== 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-SenderADCheck; bh=6cASt8zlVzXmQjYJ7ZjLMjM5o/jiNERqgMtKwYfxBiQ=; b=V5Du0K9twht8OllyoEqyNizQNQtKS+1J3Ncyt+8mL27zcYowYyvbXl+L/3qU+PuPMG3nHGIQHg1J6s7VcOWtWYqfGAgg4jDQ+SRo0p/fFr+xorLl7c4Yv5z19iTVdMK0o+ESBex0u2EFvNTk5Cj0lKiv2PXOW856hx7fPj4XfBxG21/Mu1bJ9qekUsIeV9ouxVTX+99ZJfrYgfjzr0k8dzWRaqLEutydZ7qtYYS5IL5s6jvWcg3P0ouGTD+xErACtPbokmssmM0RrHkaCoGbOYwFyDQo1ldtUtWquHnizDrza5VfAsx43hnMI/3ASKodAykB1xLoVGqgF/ZhNzndaQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6cASt8zlVzXmQjYJ7ZjLMjM5o/jiNERqgMtKwYfxBiQ=; b=AN75Ft6H0uKGrHjl6HeyQ/5ArpoIBO4Cf6mskM3eBF0qAmOH0THF2HOzajC46TdS9+x0xF0+1HjqfdtkCMsynclo9vCJZ7keOVYkUvK7L1c7W9OJ2JfqZWXEhmuvXZGEzDbpZ5XFvQh0dErdpm/5dqIEh0itkf8mtHauvibco9g= Received: from BY5PR11MB4451.namprd11.prod.outlook.com (2603:10b6:a03:1cb::30) by BYAPR11MB3368.namprd11.prod.outlook.com (2603:10b6:a03:1b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21; Wed, 14 Apr 2021 01:00:13 +0000 Received: from BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::756a:2aef:40b1:11c8]) by BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::756a:2aef:40b1:11c8%5]) with mapi id 15.20.4020.022; Wed, 14 Apr 2021 01:00:13 +0000 From: "Chautru, Nicolas" To: Hemant Agrawal , "dev@dpdk.org" , "gakhil@marvell.com" CC: "david.marchand@redhat.com" , Nipun Gupta Thread-Topic: [PATCH v3 7/8] app/bbdev: add parameter to take input in network order Thread-Index: AQHXMCSMhRt3GsIjAUCB/6s62ncTnaqzMhqQ Date: Wed, 14 Apr 2021 01:00:13 +0000 Message-ID: References: <20210410170252.4587-1-hemant.agrawal@nxp.com> <20210413051715.26430-1-hemant.agrawal@nxp.com> <20210413051715.26430-8-hemant.agrawal@nxp.com> In-Reply-To: <20210413051715.26430-8-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [45.28.143.88] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4154d757-3792-45f0-97b8-08d8fee0a91a x-ms-traffictypediagnostic: BYAPR11MB3368: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DDhP/h9dqMb/ehR8foms4/CrockPQpGssu134zquMKuyl0z7MuycuCnkiXgL/Q7DkCSGzE4RMVdIRREQA+RAcYRYhfbr70+0SldXZo9pT/sO4E4aLf8TqLFwPB/hrKhT6pj344ndliuxd5D+JlcP3wq3ytfZ1eV1ztzbWqG8GNWvUUOBnUPcJCcu5L5ZNn06dpetDaI6ugsLN874MZXmAMuUVsZCTyXzjgF5L6+mRyrHTsvkjq/ccbOLCFos2guQwAVWzoPOo76krl0RJlpB/SZbZ+hW8RNNKKrzbZtzZbRegdhGgY27GIaq2vxINGMnC5qod7Fe9rb1nkRjXpExEt47fV61h/TrREYTCfyjS69S3FsAkRIRfgLZ0QrP+7W50WjYEITYC582R5n84peIARZ2HwBmmE3hIkSco2IAnf7ZVvHO+qRYI8clUTR2brSA+NQ2/bcBAFt6i/eiYHdtsxtMobp/9FrtGv4oE7/tRp+YxhcGpD7uzB1y2MxWVs6WIYtfa33zPPMAuzg0lT0xSKYIQ4y/zF7CtLzz6jasnPBSGFwwqPOaM9yrVk+Gc7Q5NNbIZ6pBoxVXDKFE/NZpoEdOEyYQ9qg9Z53/ZnC+hXk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4451.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(39840400004)(376002)(346002)(366004)(396003)(26005)(110136005)(54906003)(71200400001)(8676002)(66946007)(7696005)(122000001)(52536014)(2906002)(186003)(53546011)(6506007)(33656002)(478600001)(5660300002)(316002)(66446008)(38100700002)(83380400001)(66556008)(64756008)(66476007)(4326008)(86362001)(55016002)(76116006)(9686003)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?0DbVJuf308Lul9K44HH5FX0B/CSPf8G0ejHDq9z1ZQOK3xifhBxdjLTAkgXs?= =?us-ascii?Q?UVd1500G1pfDJx/IHqvSBEUnAXyf3MOeJDTC1Bh9xAhN9iY5iPLtHbqHflN7?= =?us-ascii?Q?wWJPV358bkKihloPO0A85+qF8igqFOaWGw/0pDT+3Ldq+6is5MqbB3B58Sdc?= =?us-ascii?Q?Dp8S8ac2cLoZvNrHYgf2ZPLu7UNE4zp2VQWPnimUVhKmyJ4Wqu3AZHrz8Duv?= =?us-ascii?Q?iCw7KvXumKVL9EoWdJhJK8Mtpod3lAZPMwldjnxtugz7DLNmQ2POECyQ6dPl?= =?us-ascii?Q?C/2G3PErCoceHmYzSkI4GRQGfVIgNOcZIyh81fsSqznuSB1HnoEp27TDuUck?= =?us-ascii?Q?lREN3RJrC0snssc5Yzsn7YO7QO2m19gHCG1eTr90SdNHqFUKMxAhnvqH5v+l?= =?us-ascii?Q?Bl3/B+vpuDcslXsVC3n7WGMkGET39Kv4cpLopOH8BnYNNL0MbT7hmMI515vO?= =?us-ascii?Q?qfr4EOefVC4R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True 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: BY5PR11MB4451.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4154d757-3792-45f0-97b8-08d8fee0a91a X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 01:00:13.5277 (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: B7qu1FnGU6nOL1Bc2rR9CyN/TVJx/pD00+JpUG/evamKDQ2zO7uW/65BUGbdbMVFQaT0HwDl6PK6/q7BeJBf8auJl36LEqFJd5VZGrSHazA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3368 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 7/8] app/bbdev: add parameter to take input in network order 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 Sender: "dev" If you want this, should this be a new BBDEV capability option? If not how can you enforce compatibility if you just bypass this in the tes= t vector parsing? > -----Original Message----- > From: Hemant Agrawal > Sent: Monday, April 12, 2021 10:17 PM > To: dev@dpdk.org; gakhil@marvell.com; Chautru, Nicolas > > Cc: david.marchand@redhat.com; Nipun Gupta > Subject: [PATCH v3 7/8] app/bbdev: add parameter to take input in network > order >=20 > From: Nipun Gupta >=20 > Test bbdev application is reading the input and output from the test vect= or > files in the same endianness which is of the system. > This patch adds an option to provide data in the network order i.e. big > endian format >=20 > Signed-off-by: Nipun Gupta > --- > app/test-bbdev/test_bbdev_vector.c | 18 ++++++++++++++++-- app/test- > bbdev/test_bbdev_vector.h | 2 ++ > 2 files changed, 18 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test- > bbdev/test_bbdev_vector.c > index 50d1da00f7..fe04bd6b95 100644 > --- a/app/test-bbdev/test_bbdev_vector.c > +++ b/app/test-bbdev/test_bbdev_vector.c > @@ -53,7 +53,8 @@ starts_with(const char *str, const char *pre) >=20 > /* tokenization test values separated by a comma */ static int - > parse_values(char *tokens, uint32_t **data, uint32_t *data_length) > +parse_values(char *tokens, uint32_t **data, uint32_t *data_length, > + int network_order) > { > uint32_t n_tokens =3D 0; > uint32_t data_size =3D 32; > @@ -94,6 +95,14 @@ parse_values(char *tokens, uint32_t **data, uint32_t > *data_length) > } >=20 > *data_length =3D *data_length + (strlen(tok) - strlen("0x"))/2; > + if (network_order) { > + if ((strlen(tok) - strlen("0x"))/2 =3D=3D 4) > + values[n_tokens] =3D > + rte_cpu_to_be_32(values[n_tokens]); > + else if ((strlen(tok) - strlen("0x"))/2 =3D=3D 2) > + values[n_tokens] =3D > + rte_cpu_to_be_16(values[n_tokens]); > + } >=20 > tok =3D strtok(NULL, VALUE_DELIMITER); > if (tok =3D=3D NULL) > @@ -416,7 +425,8 @@ parse_data_entry(const char *key_token, char > *token, > /* Clear new op data struct */ > memset(op_data + *nb_ops, 0, sizeof(struct op_data_buf)); >=20 > - ret =3D parse_values(token, &data, &data_length); > + ret =3D parse_values(token, &data, &data_length, > + vector->network_order); > if (!ret) { > op_data[*nb_ops].addr =3D data; > op_data[*nb_ops].length =3D data_length; @@ -728,6 +738,10 > @@ parse_ldpc_encoder_params(const char *key_token, char *token, > ret =3D parse_expected_status(token, &status, vector- > >op_type); > if (!ret) > vector->expected_status =3D status; > + } else if (!strcmp(key_token, "network_order")) { > + vector->mask |=3D TEST_BBDEV_VF_NETWORK_ORDER; > + vector->network_order =3D (uint8_t) strtoul(token, &err, 0); > + ret =3D ((err =3D=3D NULL) || (*err !=3D '\0')) ? -1 : 0; > } else { > printf("Not valid ldpc enc key: '%s'\n", key_token); > return -1; > diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test- > bbdev/test_bbdev_vector.h > index 4e5dbf5d50..aa53f0bb0d 100644 > --- a/app/test-bbdev/test_bbdev_vector.h > +++ b/app/test-bbdev/test_bbdev_vector.h > @@ -35,6 +35,7 @@ enum { > TEST_BBDEV_VF_CODE_BLOCK_MODE =3D (1ULL << 23), > TEST_BBDEV_VF_OP_FLAGS =3D (1ULL << 24), > TEST_BBDEV_VF_EXPECTED_STATUS =3D (1ULL << 25), > + TEST_BBDEV_VF_NETWORK_ORDER =3D (1ULL << 26), > }; >=20 > enum op_data_type { > @@ -60,6 +61,7 @@ struct test_bbdev_vector { > enum rte_bbdev_op_type op_type; > int expected_status; > int mask; > + int network_order; > union { > struct rte_bbdev_op_turbo_dec turbo_dec; > struct rte_bbdev_op_turbo_enc turbo_enc; > -- > 2.17.1