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 A9F39A058B; Wed, 25 Mar 2020 11:18:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61380374C; Wed, 25 Mar 2020 11:18:19 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) by dpdk.org (Postfix) with ESMTP id 274FBF3E for ; Wed, 25 Mar 2020 11:18:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nQBLZox0a/GEkYqidOW3v2oeqScQqycdYoDYgcgyqwIgTkPAHN6lbQ6lBYWA7HHd/B1LWg3TdI9ZxRkeyfD4AA6Ofb9VdMttLmBQ/OBtbPuEe8FMCbc57yOUy/zP1ZV80UBUbeQ6l4xRhQISYymgt7JY9KYEIZrwyQxdedwpGOggo8uldZbgeurndxxis2gxT7WUS32VMcuubvzkBnWzSrly09iD3lJJRrOR8LsrztOhL7T1ExY/40EPKIaUuoQWa3PyqBGFRaFvL9KxS2n2YXZ6kSY9FVyCZFlObc3JNpPjXGw/AtKKKXtLUwBSya8vLGia4saxZE9Z/6TghODO1A== 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=LOdITiYCvfRhzzwZT90qhyfrLblyXsZzjl/ZyBXX26M=; b=jOYvXEmmZWo8olVTdQ0iG8q21RjvGGkfPHiCJYUm2m3+AueYdbQ+G0o5V0spM9pbD6EbkKhpMzFbaojuA6NoSqTqy3hJMvMXNYX6s6HyYPiyAJkgY2fz2C6g8NTpEzqWgKXST0Pa91cye25E4EhWj+KWkzIPOMWxKBFSoYtmmiWz3AE0AUeg+2+2/1rb2sA7/rfmeBPtOGUAlCPBRw++bJAWnEGSN+R8FkbOVT5FkP2iKPR6D6xbJ0h5aDihROCTvflsn1DtIrnlTHV8ZPyfrZo1O0Vg7JJjORZzsmsAFVy7IJRTFOqHWxJAryfJvV+NJ0Ame8oglU2kwC0lTpF/lA== 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=LOdITiYCvfRhzzwZT90qhyfrLblyXsZzjl/ZyBXX26M=; b=KeJ6/Is/ctEDubKgRNUfEJ5CfA1gyJWjdT9F6uYRPU1G8fvNz1gi8eocOSmJ8Ntbc/grv1qB6h/bWWDCQ+g0Q+1rfw7djcJufvxf0XvXzuYFte2xt26m8zoTBq/B6oeMq5mOTbedX6OmFpfhW78mW9ZGNlKCtpklLCj9n2HzHz0= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (10.255.118.11) by VE1PR04MB6592.eurprd04.prod.outlook.com (20.179.234.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Wed, 25 Mar 2020 10:18:16 +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 10:18:16 +0000 From: Akhil Goyal To: Nicolas Chautru , "thomas@monjalon.net" , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" Thread-Topic: [PATCH v3 04/14] baseband/turbo_sw: support large size code block Thread-Index: AQHV8lZy3A+h2ojLlkWEA7ETNnETTKhZNYjQ Date: Wed, 25 Mar 2020 10:18:15 +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-5-git-send-email-nicolas.chautru@intel.com> In-Reply-To: <1583348102-13253-5-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: db1f32fe-12b3-4f01-fe34-08d7d0a5d522 x-ms-traffictypediagnostic: VE1PR04MB6592: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0353563E2B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(376002)(346002)(136003)(55016002)(2906002)(9686003)(7696005)(76116006)(66946007)(66476007)(52536014)(8936002)(8676002)(81166006)(66556008)(66446008)(4326008)(64756008)(81156014)(478600001)(186003)(71200400001)(33656002)(110136005)(86362001)(26005)(316002)(6506007)(44832011)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6592; 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: rtV08w4dkhuJA/7SMpASMJSBixM5rIotIj/Xg7HIgeZaSZpg7BYPIX+c+X89JdT9qidJGEugBhLo5oHwQPyhQ4gYHB0RzH10aIAarqucJlWRstHAjkfMZFn1yy9SCikD5OecTcwjC9XGgtFVC8lTR0w6/hPe93Pv6isBMbF8vTJ0AgfHdg7qnCRbZB3UXerZ9nb+PsmMqZsDEaWadXGOraOtTvRNA/IA99nD4df+UPSLW6icDuo5sKzCR1OCO/N/owrOeoTvNRVuFitDu+r1OqVOr54rFGkP8llD6exIsq2dk1UmMBSm/PgZHO8H6AskHcgteMmNdbnMggYbOJ1zktRxKOIgG4j1CvYs8cvtg3K96Xy63oI7UOh9QU7EJuHLlNLOIME/lKzl1gV10kwAPiuTAAOycSAKq3A4qgVyGuPCymEjQMy/Bisf7Ez2wjw/ x-ms-exchange-antispam-messagedata: czGLp/6gigrNSbKJisFKYbS/P9GuBY44AFrnuGfcFGx8uLrAKtBoVfLM4jXsEdjvcagLjSdgLRj/P8uuJVgFPvC9jTsZJq/gzLFPKx8o6IuZVRD0cYz8AJ0N7+d8HvmL+QWkfVxU03OWldXLbqZ3Pw== 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: db1f32fe-12b3-4f01-fe34-08d7d0a5d522 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2020 10:18:15.9136 (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: kDghYPQjOLZt5SRfswkOwSOap9eqqyFNYBmT187GKLgpaSfEO5pLjtpsSj8WzBK/GBfxAWZNjpdtGK8SRrJQbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6592 Subject: Re: [dpdk-dev] [PATCH v3 04/14] baseband/turbo_sw: support large size code block 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" >=20 > From: Nic Chautru >=20 > This is to support cases when the input data for > decoding a code block is larger than 64kB and would > not fit as a contiguous block of data into one > mbuf. In that case the length from the opearation > supersedes the mbug default structure. Spell check Operation Mbuf >=20 > Signed-off-by: Nic Chautru > --- > app/test-bbdev/test_bbdev_perf.c | 40 ++++++++++++++++++= +----- > doc/guides/rel_notes/release_20_05.rst | 6 ++++ > drivers/baseband/turbo_sw/bbdev_turbo_software.c | 11 ++++--- > 3 files changed, 45 insertions(+), 12 deletions(-) >=20 > diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test- > bbdev/test_bbdev_perf.c > index d8db58e..d46966d 100644 > --- a/app/test-bbdev/test_bbdev_perf.c > +++ b/app/test-bbdev/test_bbdev_perf.c > @@ -764,6 +764,7 @@ typedef int (test_case_function)(struct active_device > *ad, > { > int ret; > unsigned int i, j; > + bool large_input =3D false; >=20 > for (i =3D 0; i < n; ++i) { > char *data; > @@ -774,24 +775,47 @@ typedef int (test_case_function)(struct active_devi= ce > *ad, > op_type, n * ref_entries->nb_segments, > mbuf_pool->size); >=20 > - TEST_ASSERT_SUCCESS(((seg->length + > RTE_PKTMBUF_HEADROOM) > > - (uint32_t)UINT16_MAX), > - "Given data is bigger than allowed mbuf > segment size"); > - > + if (seg->length > 64000) { Shouldn't this be seg->length + RTE_PKTMBUF_HEADROOM and you don't need A check again in assert. 64000 should be a MACRO > + /* > + * Special case when DPDK mbuf cannot handle > + * the required input size > + */ > + printf("Warning: Larger input size than DPDK > mbuf %d\n", > + seg->length); > + large_input =3D true; > + } else { > + TEST_ASSERT_SUCCESS( > + ((seg->length + > RTE_PKTMBUF_HEADROOM) > + > (uint32_t)UINT16_MAX), > + "Given data is bigger than allowed > mbuf segment size" > + ); > + } > bufs[i].data =3D m_head; > bufs[i].offset =3D 0; > bufs[i].length =3D 0; >=20 > if ((op_type =3D=3D DATA_INPUT) || (op_type =3D=3D > DATA_HARQ_INPUT)) { > - data =3D rte_pktmbuf_append(m_head, seg->length); > - TEST_ASSERT_NOT_NULL(data, > + if ((op_type =3D=3D DATA_INPUT) && large_input) { > + /* Allocate a fake overused mbuf */ > + data =3D rte_malloc(NULL, 128 * 1024, 0); Again hard coding. Define some macros to know the basis of this value. > + memcpy(data, seg->addr, seg->length); > + m_head->buf_addr =3D data; > + m_head->buf_iova =3D rte_mem_virt2phy(data); > + m_head->data_off =3D 0; > + m_head->data_len =3D seg->length; > + } else { > + data =3D rte_pktmbuf_append(m_head, seg- > >length); > + TEST_ASSERT_NOT_NULL(data, > "Couldn't append %u bytes to mbuf > from %d data type mbuf pool", > seg->length, op_type); >=20 > - TEST_ASSERT(data =3D=3D RTE_PTR_ALIGN(data, > min_alignment), > + TEST_ASSERT(data =3D=3D RTE_PTR_ALIGN( > + data, min_alignment), > "Data addr in mbuf (%p) is not aligned > to device min alignment (%u)", > data, min_alignment); > - rte_memcpy(data, seg->addr, seg->length); > + rte_memcpy(data, seg->addr, seg->length); > + } > + > bufs[i].length +=3D seg->length; >=20 > for (j =3D 1; j < ref_entries->nb_segments; ++j) { > diff --git a/doc/guides/rel_notes/release_20_05.rst > b/doc/guides/rel_notes/release_20_05.rst > index 2190eaf..d6c3dfb 100644 > --- a/doc/guides/rel_notes/release_20_05.rst > +++ b/doc/guides/rel_notes/release_20_05.rst > @@ -56,6 +56,12 @@ New Features > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > +* **Updated the TURBO_SW bbdev PMD.** > + > + Updated the ``turbo_sw`` bbdev driver with changes including: > + > + * Support for large size code block not fitting in one mbuf segment. > + * Exposes the accurate LLR decimal assumption. Is it really worth to highlight this in release note? You even suggested no= t to Backport it to stable. I am not sure if it is really that important to be h= ighlighted In release notes. If at all, this patch is not changing the LLR decimal. This should be moved= to Appropriate patch. >=20 > Removed Items > ------------- > diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c > b/drivers/baseband/turbo_sw/bbdev_turbo_software.c > index 5ca8ca1..ea3fecb 100644 > --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c > +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c > @@ -1335,7 +1335,7 @@ struct turbo_sw_queue { >=20 > static inline void > process_ldpc_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *o= p, > - uint8_t c, uint16_t out_length, uint16_t e, > + uint8_t c, uint16_t out_length, uint32_t e, > struct rte_mbuf *m_in, > struct rte_mbuf *m_out_head, struct rte_mbuf *m_out, > struct rte_mbuf *m_harq_in, > @@ -1617,8 +1617,8 @@ struct turbo_sw_queue { > struct rte_bbdev_stats *queue_stats) > { > uint8_t c, r =3D 0; > - uint16_t e, out_length; > - uint16_t crc24_overlap =3D 0; > + uint32_t e; > + uint16_t out_length, crc24_overlap =3D 0; > struct rte_bbdev_op_ldpc_dec *dec =3D &op->ldpc_dec; > struct rte_mbuf *m_in =3D dec->input.data; > struct rte_mbuf *m_harq_in =3D dec->harq_combined_input.data; > @@ -1661,7 +1661,10 @@ struct turbo_sw_queue { > e =3D (r < dec->tb_params.cab) ? > dec->tb_params.ea : dec->tb_params.eb; >=20 > - seg_total_left =3D rte_pktmbuf_data_len(m_in) - in_offset; > + if (e < 64000) /* Special case handling when overusing mbuf */ Macro for 64000 > + seg_total_left =3D rte_pktmbuf_data_len(m_in) - > in_offset; > + else > + seg_total_left =3D e; >=20 > process_ldpc_dec_cb(q, op, c, out_length, e, > m_in, m_out_head, m_out, > -- > 1.8.3.1