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 7D63CA0562; Wed, 14 Apr 2021 14:15:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59585161A14; Wed, 14 Apr 2021 14:15:05 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60077.outbound.protection.outlook.com [40.107.6.77]) by mails.dpdk.org (Postfix) with ESMTP id AA1D4161A0D for ; Wed, 14 Apr 2021 14:15:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jWudLACUtj/Ucu/05PQWOXy7RUBgRH93H5rRoulscoIRixhktKl8NvCDdWcZ9n9Bf/FMtny8koYhcO3QYubLBNkCzM9UY2SapyYBM9Uri8rq5av2TGmBOGbHLULhuPMk6e8H6ujaI2mvhzHbWbqkvbTZCjSki1Lq7fRy8nN7K7LbEuxNdCoLIdFbEmDkRG1zFIAnd+7hzE4/Mt86GroZsNRpz0a5Ek6wKB/2NKTtMNPISypBMzCg81ldWe8N8A0amKNB326ebpKupVOCi8sx5tYwM+cWA98bx0JezzD9volvoLSxh0WZbZp8qjGU+LNvolc94hm0Z9CA2RGH8hlSzg== 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=PxCW1xz3Jkt0jvHX55BWJme2ZOhZArtuxA/xrFreFXM=; b=Vl5qZ7Gnogcq3XXXmh4t2f7qD+fBKYhUWUTQNXHygmNtLkBRuzkC/vJQLEUoq6Zec4YN/AcQSNGmzT2WCDQOfx72jYW3BR6JimsCfV5CAviwnXpLRnTc2OU9WJenX2hIerGnUMDzhXZX2J35M97zzKhKC8PLt99nsmJnigFN2wyPMF54nJ6YRoaBywudpIg3d+e75jLe4ncJz8q8uIZ5lC8cpasF5u0sxrgBuoEnOOD4eOdmiF9kc3N4i2l9eA0+YqzCMyXncpRE7DQJ6PibrNhywfVlOTXmjLBGEdeGZ3L1GswVB3zsve2X6DYRSXAM5SfHUQqqtD/NjOKNei5RKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PxCW1xz3Jkt0jvHX55BWJme2ZOhZArtuxA/xrFreFXM=; b=SCC239Ju2g3oJ9zmVhmWJCPlro7/bn4NUw77gbriF4Ne/EgT7Vh3CZLQ7U5eXxL4bb99oKZHJdMGiT1eBj7C7BzQWfyKM5RiIdnw1zBh3os19gP6YFowptG1U3jf1eCUDzGQWbJIsO+nGrehgCXCEgjSOYGxERB+mh7W9pD+se4= Received: from AM5PR0401MB2593.eurprd04.prod.outlook.com (2603:10a6:203:37::20) by AS8PR04MB7576.eurprd04.prod.outlook.com (2603:10a6:20b:29b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Wed, 14 Apr 2021 12:15:02 +0000 Received: from AM5PR0401MB2593.eurprd04.prod.outlook.com ([fe80::84e:e701:1bd5:648d]) by AM5PR0401MB2593.eurprd04.prod.outlook.com ([fe80::84e:e701:1bd5:648d%8]) with mapi id 15.20.4020.023; Wed, 14 Apr 2021 12:15:02 +0000 From: Nipun Gupta To: "Chautru, Nicolas" , Hemant Agrawal , "dev@dpdk.org" , "gakhil@marvell.com" CC: "david.marchand@redhat.com" Thread-Topic: [PATCH v3 7/8] app/bbdev: add parameter to take input in network order Thread-Index: AQHXMCR9XEgtvQq/9U2YVsKGEuyewKqzMsOAgAC8ciA= Date: Wed, 14 Apr 2021 12:15:02 +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: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [223.225.40.224] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5ec9b99a-a191-4fc5-bd43-08d8ff3eee71 x-ms-traffictypediagnostic: AS8PR04MB7576: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jY+y5nmNSYwBe7gRaVuAE75bBDhyOqDxY7ODVOvuomaObVal967PQ7Da/aOMTdQZBu0hd8js9rnlgexJ30Q40UGFhSSly33z40b9Jg9UVIt6JX90rTMSBi+EavxPPA2kCpFk7e0iEVjzCiBNMaJFcpPy7nSjV5VOE6ZA1X3GN/A9s1k9CPszudgt9Gr7DqphCPZjickhV33w0ORTpVhHZEDd8LNFvTDmYqAZue8ci0LFlPZ4vdxLd2evfbT5se1AKFFm51KEMI2tgxggXAKA3ifBGFrD/UxkEjo2NZen3vpQ8/9cSe+xT26xgsDNg4FpdCnwWYNsWXKAnew1H5ciUzU01UjeWIUuFCJCC+D+rxxUQwkYkg6QnPHAS5sg2LjVRz7zuwdwt81570pv+ZvFCxaenNBG6LL8RwjTEer0siQ2fVTAYcBKTy1RlRvbcyMw7hMLXDcJ4IYI3X3qbotNN3NL7sL6jrhH6A9ufFsKgpCW3pNhZWjXmFt6IJzeJcnOmoEtKlX99GAtB07RcuuSbepW+Cx0FLgOUN28dRyN0VuCYSKf2QPYjK0uUBhUm/B03O57EauMUmaWgARsFcl9nN1kmXMEJLFH3nZGadRWNpU= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM5PR0401MB2593.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(346002)(39860400002)(366004)(396003)(376002)(4326008)(186003)(26005)(122000001)(55016002)(8936002)(55236004)(9686003)(66476007)(110136005)(71200400001)(66446008)(38100700002)(44832011)(478600001)(33656002)(316002)(6506007)(52536014)(64756008)(86362001)(83380400001)(7696005)(66556008)(8676002)(66946007)(2906002)(5660300002)(53546011)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?jA0PDhhPzSfFZ4bUbsgQfDRV1La+TbhBvqFdFgjEIRyPWO+B95XJGbZsHAkJ?= =?us-ascii?Q?Nx4cirrLMbNRzRM9FDXzQDuO9B4DxjJo1NAKXvqKpFcXzlnD4nTa22Dgp1ku?= =?us-ascii?Q?UchDoLQgVhxfbX7TplxPQ4Oa5fSKPlW42eHuKqkeXKc3K3NfIu5IFZk5/KUv?= =?us-ascii?Q?Lf45qmGevSOcYBaKXrgG4rNwN+co70+U/hgu4TEgqaFLpNygo7nl7IasMew2?= =?us-ascii?Q?Kwo9DEAWD96FyfmYnjFz8TlqIkHqRqxRPO5JITyUay0Si4vXMfT09434vWhT?= =?us-ascii?Q?HjGVCqZEh4nny8NsqFPbMkBGl2Oc4iEBJX4+md1qBQflVrbMrGO3yTBkG8TT?= =?us-ascii?Q?6FJs38TY4yC2uRUkicjWaXf51aY3ddaYaUwFiLse0m4fA6W2Ouer7cJz2C5z?= =?us-ascii?Q?tJRokydsmxmULQKwgIToJo0xPjsyhhph4cSXXURFhBrzrgdm7sq9Fd5hl8S/?= =?us-ascii?Q?sQbMjLFol2HY4GIWO42fe6OMhLa+tTas2XlxxQV2Rji+5m0fjcGE/gc50KqU?= =?us-ascii?Q?h7dRnXHb2P2OYPkIthBXCbenDE7LcrxrlcPW7a8C3lHAKX3xc/u6rwook1vz?= =?us-ascii?Q?59ehHx7j1SLYVrcQPOwwvTmOOekcbnhGuDdQ3Zv/I2XRWIK5txRxc7IdIfeh?= =?us-ascii?Q?QiUIU+YHjkIg0PnhgErDBlf7ftda267XgpC79oysaIzWqPVaM7MKwjoM6P6g?= =?us-ascii?Q?Hn7hcqgQYEUVb79q+NY9tkb9+44fDiVlfDhC7PkJSi2qGBau2AFHIbtNKyTA?= =?us-ascii?Q?6yWoOdrU1fBZ1lbNSfJ0DMPSmCnn3xzblKcxOnGGrQ4R3+naWGhSgwkIZdBz?= =?us-ascii?Q?lFB/ZDAQe/JVfkZ1eZYmmlpV+fyn/ZSwhnkc5jzQB6ZNPTTlkWlhPLYLPIGx?= =?us-ascii?Q?0fRAdmeFZmFkJHH9hIGSoA+KypUQ5JCtYas3CFzpLs2GD8oPu46n2bGZZUqU?= =?us-ascii?Q?60qsPjPQHeaswbx7A5THqY3XFTuy9dKJQ/RH7GTmVyZXwl5TS82Nw3En+yzc?= =?us-ascii?Q?QFi8X0y51xWAa8DqXGsz9fvza3neYV4WTMPHGq0vaXhl+SF1QFhMTwoLzvbf?= =?us-ascii?Q?UTtAqIhuHvKTsjiDMlQ5L8gQHGkgOthMStZdAVOVYcAas0e0V6nwNOKgXs80?= =?us-ascii?Q?3RezBn4Wk+JiS9s6/RyuBDu350n1gfelVYodytr6dbzn0Fvfx1RmyoLvvTWs?= =?us-ascii?Q?mx4tFrNRlJKepvHzu1HtQsfWCJuk6q0lD9lTpsozWgheFsIpiXc594zEHz2c?= =?us-ascii?Q?UYzpNJJFBl+K0LHYi4ZwdBAnhJ9EEZ/Ons71N2pxRGt3Opw0xXgFdshc5dTc?= =?us-ascii?Q?wuZ5X13KhF1OlHCSOxMnlB5G?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM5PR0401MB2593.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ec9b99a-a191-4fc5-bd43-08d8ff3eee71 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 12:15:02.5067 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zNi/nmBI/92SeNJ66atcINW9H6V34bnu8J2feQeQoKjHMaxitRagJt5AG63+nAoi8MDc2zog8OJUSI2v7W6dRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7576 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" > -----Original Message----- > From: Chautru, Nicolas > Sent: Wednesday, April 14, 2021 6:30 AM > To: Hemant Agrawal ; dev@dpdk.org; > gakhil@marvell.com > Cc: david.marchand@redhat.com; Nipun Gupta > Subject: RE: [PATCH v3 7/8] app/bbdev: add parameter to take input in net= work > order >=20 > 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 t= est vector > parsing? Agree, we can add BBDEV capability option. >=20 > > -----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 netwo= rk > > order > > > > From: Nipun Gupta > > > > Test bbdev application is reading the input and output from the test ve= ctor > > 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 > > > > 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(-) > > > > 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) > > > > /* 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) > > } > > > > *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]); > > + } > > > > 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)); > > > > - 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), > > }; > > > > 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