From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D59AFA058B; Wed, 25 Mar 2020 14:23:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA4042C15; Wed, 25 Mar 2020 14:23:29 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2074.outbound.protection.outlook.com [40.107.20.74]) by dpdk.org (Postfix) with ESMTP id 6088E2BCE for ; Wed, 25 Mar 2020 14:23:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dCEv+vM0UZxoDVbv9aTv9m1GU15ZCywsFxpL+b0a2A3/tYNEZskG5fgqSVMJ338T9QjLISPHA6njwD/wlSacLz/LuJQy4EX4N5tiB+/N1RTv7G82ma5wcdPS2JwWthkkwM40hvd31yZf7fF9QUy3JNy9AuDJUkUXAhutmTKHQu7FMI4f3wMO1JZ0RHuJyo6bGGvFXC7T0KoKzLV2yKrWnx2kULfn2egcvTO57lDT04UCCegUIIQ8MpnI8WD5eJd8zmuAxxCzyuZwzgtIvslmdgJ42zNdyH+hCiRUdMLvo6dLA5GkPf7LwOM8XbI2kpe7WzYL4E23xyIqDxC97oSM8Q== 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=voIwpOolm+CNYzEAYKv1Zvzeqkv8GBby9A2m9zfKUvw=; b=As/JoHxIKQ4EEWa9FwpmpR/6rXgovdrwGVGfWCh423qauwSeo0ifgWlQTvGzPd07PAtKrCpLEtMwv68xkjVzMtlUYBLDmqMipzXdYTP0Fmh+Gb/GUAI5kCXC6ge5Hv3P7MwKLIlLizqPjeWxmYEkhwT1mr5gLodTMRoo/A52pAzeYHe4ybfFPdBxOntH/Vk+B9h4vC6WW5fNsUt4h1q7B7RFOViyuQWkQaVxLx6Nk1GqYLiAnHiF0v45SfdqkDb1m6bOh4MyUVm1W3x9WpEkZAiSQiJH47OyE+N/qMmwvEX60lqPxNmGbHH34DxA0rvtgOvb+zB0Ko3MMfBj0uexjA== 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=voIwpOolm+CNYzEAYKv1Zvzeqkv8GBby9A2m9zfKUvw=; b=lclGVnZg/dnT+G07PitVvr8OfbkUNU8sIP4ALEek5q+zC9Xb6W45WnLP8Rwsz7DmDdly01Mzxab7l6fUfvDa5skqnWiRkHJvx4qZMBtBr13G6hnL1vMj8HRL7RVQcUAumn5atRvfD9dgbO3iWj06Jzq8YFJI8NMRmjKmiVxLwWQ= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (10.255.118.11) by VE1PR04MB6510.eurprd04.prod.outlook.com (20.179.235.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19; Wed, 25 Mar 2020 13:23:27 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::8060:a35c:4858:c490]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::8060:a35c:4858:c490%7]) with mapi id 15.20.2835.023; Wed, 25 Mar 2020 13:23:27 +0000 From: Akhil Goyal To: Nicolas Chautru , "thomas@monjalon.net" , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" Thread-Topic: [PATCH v3 06/14] test-bbdev: support HARQ validation Thread-Index: AQHV8lZztSx0WWDoZUK27q/WVLTWpahZZwEQ Date: Wed, 25 Mar 2020 13:23:27 +0000 Message-ID: References: <1582778348-113547-15-git-send-email-nicolas.chautru@intel.com> <1583348102-13253-1-git-send-email-nicolas.chautru@intel.com> <1583348102-13253-7-git-send-email-nicolas.chautru@intel.com> In-Reply-To: <1583348102-13253-7-git-send-email-nicolas.chautru@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [45.118.166.92] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 48b0f036-444a-4663-05b2-08d7d0bfb421 x-ms-traffictypediagnostic: VE1PR04MB6510: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0353563E2B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(39860400002)(366004)(396003)(136003)(376002)(33656002)(478600001)(8936002)(26005)(2906002)(71200400001)(186003)(8676002)(81166006)(55016002)(81156014)(9686003)(86362001)(4326008)(5660300002)(66556008)(6506007)(66446008)(52536014)(66476007)(64756008)(316002)(76116006)(66946007)(110136005)(44832011)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6510; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Hb6MLG0J6Sj8gAlJQTFFxL5WFNjUU4fyvfipv6O1ykS6ubcxcyNAq3iR3d3pcjBinJ42e9Vdrg+LfAY0Xqux3kuELXCl6Sgh5iZwCN26riNL6JgiD6bmXTNvyNpbZMDdYRg1joOypAApNTkbchMHL+mQ326+iUVeZeAY0OuNH2IWtnfSxCL0wp/WdkKaI7obM3tJN7UVTKaeoaMmSkWd6zcPHo0a0F6o2GG1IWoL5zlfc4HeEx3oaHcDlD1KrH2WXtGG+btg/L2oQzAYxFvQ9nOo9H778EFkdA9gxq/BD5wMz8W3wyrzq+vPUCiPorN+O6D7P9tgSGaRk1m8ufEAz+EgKd0S2mB+29DjQX3BHS8GHYQ5rPfdJjyuXJe9Nym/5/R2/urvWwhU4eLQ9bmSzec+y6Ixhjp39s8eD8W8qWxOK41/dr3Tbtp2QJSJtBGa x-ms-exchange-antispam-messagedata: gSNW5H3ZZosRU8kTyEc+J3831jfV4k2SETlUh+ZsFkPyF7KEIAO7LkTPLYVkgdAspcy+/dQaMZt8m0QsnkQM2MaAiQ3mum3KShDnrwF699U1nEeOkG2H86of/L9RKbGu57Y3kZi12x/3ga2d3jEczQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48b0f036-444a-4663-05b2-08d7d0bfb421 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2020 13:23:27.3749 (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: 5j5kRMsCb37kbWuXj39xq/t/ksTC1UpjTcGrWqCH4o/Azxi6QJ4KdUA1odB5h4CdIROK8xBHbXWlSAigDj9ttg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6510 Subject: Re: [dpdk-dev] [PATCH v3 06/14] test-bbdev: support HARQ validation 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_bbdev_dec_op *op, > unsigned int order_idx, const int expected_status) > { > - TEST_ASSERT(op->status =3D=3D expected_status, > + int status =3D op->status; > + /* ignore parity mismatch false alarms for long iterations */ > + { > + if (!(expected_status & (1 << RTE_BBDEV_SYNDROME_ERROR)) > && > + (status & (1 << > RTE_BBDEV_SYNDROME_ERROR))) { > + printf("WARNING: Ignore Syndrome Check > mismatch\n"); > + status -=3D (1 << RTE_BBDEV_SYNDROME_ERROR); > + } > + if ((expected_status & (1 << RTE_BBDEV_SYNDROME_ERROR)) > && > + !(status & (1 << > RTE_BBDEV_SYNDROME_ERROR))) { > + printf("WARNING: Ignore Syndrome Check > mismatch\n"); > + status +=3D (1 << RTE_BBDEV_SYNDROME_ERROR); > + } > + } What is the need of these extra braces. > + > + TEST_ASSERT(status =3D=3D expected_status, > "op_status (%d) !=3D expected_status (%d)", > op->status, expected_status); >=20 > @@ -1236,9 +1333,10 @@ typedef int (test_case_function)(struct active_dev= ice > *ad, > "op_status (%d) !=3D expected_status (%d)", > op->status, expected_status); >=20 > - TEST_ASSERT((void *)(uintptr_t)order_idx =3D=3D op->opaque_data, > - "Ordering error, expected %p, got %p", > - (void *)(uintptr_t)order_idx, op->opaque_data); > + if (op->opaque_data !=3D (void *)(uintptr_t)INVALID_OPAQUE) > + TEST_ASSERT((void *)(uintptr_t)order_idx =3D=3D op->opaque_data, > + "Ordering error, expected %p, got %p", > + (void *)(uintptr_t)order_idx, op->opaque_data); >=20 > return TEST_SUCCESS; > } > @@ -1282,6 +1380,170 @@ typedef int (test_case_function)(struct > active_device *ad, > return TEST_SUCCESS; > } >=20 > + > +/* Compute K0 for a given configuration for HARQ output length computati= on > */ > +static inline uint16_t > +get_k0(uint16_t n_cb, uint16_t z_c, uint8_t basegraph, uint8_t rv_index) > +{ > + if (rv_index =3D=3D 0) > + return 0; > + uint16_t n =3D (basegraph =3D=3D 1 ? 66 : 50) * z_c; > + if (n_cb =3D=3D n) { > + if (rv_index =3D=3D 1) > + return (basegraph =3D=3D 1 ? 17 : 13) * z_c; > + else if (rv_index =3D=3D 2) > + return (basegraph =3D=3D 1 ? 33 : 25) * z_c; > + else > + return (basegraph =3D=3D 1 ? 56 : 43) * z_c; > + } > + /* LBRM case - includes a division by N */ > + if (rv_index =3D=3D 1) > + return (((basegraph =3D=3D 1 ? 17 : 13) * n_cb) > + / n) * z_c; > + else if (rv_index =3D=3D 2) > + return (((basegraph =3D=3D 1 ? 33 : 25) * n_cb) > + / n) * z_c; > + else > + return (((basegraph =3D=3D 1 ? 56 : 43) * n_cb) > + / n) * z_c; > +} Please add comments for the logic behind these calculations.=20 It would be better to remove these hard codings and define some macros. There are some other hard codings in the patch. Please fix those as well. > + > +/* HARQ output length including the Filler bits */ > +static inline uint16_t > +compute_Harq_Len(struct rte_bbdev_op_ldpc_dec *ops_ld) { Camel Casing? One generic comment on the patches. I can see that the name of MACROS Is quite big. It would be better to rename them with a shorter logical name= .