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 53339A04BF; Thu, 3 Sep 2020 22:45:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ACF2A1BEAF; Thu, 3 Sep 2020 22:45:29 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 95AE3E07 for ; Thu, 3 Sep 2020 22:45:25 +0200 (CEST) IronPort-SDR: pQMenmzD816bxPxs2iVjEjUc9SqBpOZK1dTJZRhQSzXKxtVbisGGQLQ1yhxuXj/IZGXxxulk3L muSMweGW+KYg== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="219209719" X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="219209719" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2020 13:45:23 -0700 IronPort-SDR: DIF/Nv2lVvo9MLgkv54TOWb+X/8VLcR9sd8qZQVbLJoPtHoP+127YdvP9woIs2rjt46iwVRJw5 LIe1ctyM6h2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="302353880" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga006.jf.intel.com with ESMTP; 03 Sep 2020 13:45:23 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 3 Sep 2020 13:45:23 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 3 Sep 2020 13:45:23 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) 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.1713.5; Thu, 3 Sep 2020 13:45:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LO/MrAftjjk8Pm8COlpcOMpvYC2j8bZmmy/9qGA1ri0jiBIaN7zO4QejfcTtOTLO7ImvNdy/oNkVKIwEC5ArfpZCJXvD7B7+hb/FaAI14c+A6jlK5J1h0pLCRd7QzHr7sI+pvbWOvMgZERPVgcYgZKQC1nbT/y50hHIyUXqTzSXz6CCbU5ifP6fcrwVD+Zg9B4eUNvmYV6VQKutiWBGlf/Ae8yTRqBAslQVauU/gRyXz2Yg7mUE1dsh9jR7xfZWkrdsZUIRob3Sy62eTw4QR8ACAEdN3rg555B6F9W0jJmZykg0tVvNI9BQaBbb1gqUCqBLXr+jPE024GJCHB6TL4w== 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=khAD7EzzuxcVGWYtG4UzJqOkmEm2HQ/WNZ9FyVSsf58=; b=LThlDwaWmJhtNn9JpLUS+J2+tnEMO5QxxIsAOIRRH8zA1qEvJGwBs0W6i/fKdrFOSc+MrLzO95yRKh4SsjpEskN1UcH9tEWrp7Ka922aKBcGGviUnkKoy5Cp7Q74U1M1Hz4NlZhc3sBmM52XFM0DA1Fg20gsyXhO534JJKRCNLD/bVqADrWvUwe9aEjgfmg10tKWQI6XkqRwekvGKsdJXTqTDDm7zCU8E82Cm3twVWhPiekFpPB3FIxLnCzPjocVeZbjUMXccK//0KpLZiTfRh+noLb5aW0733TtpmEbl7BDbMzKiFya0hPzMgzQT4nd8m0yfgv0nbNy+CTeLJB0hQ== 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=khAD7EzzuxcVGWYtG4UzJqOkmEm2HQ/WNZ9FyVSsf58=; b=GVGM7y1TcIjkFml1CU5aRrLx4z2e2Oj3XOevCnRJ6fhABeQqI5XnamP7ZgIrp6aGWS/Qn0vJX1mdDIn6urAlcp+lFdPQy9hLr8pHFfB4erUF9nSa1Or5pHeGTBzAwNufgRuxWqWt0xd6RNNgCHqADdBeX2M+3ENDvkefWjqNc6k= Received: from BY5PR11MB4451.namprd11.prod.outlook.com (2603:10b6:a03:1cb::30) by BYAPR11MB3750.namprd11.prod.outlook.com (2603:10b6:a03:f9::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.23; Thu, 3 Sep 2020 20:45:17 +0000 Received: from BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::4162:97e1:7d04:a508]) by BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::4162:97e1:7d04:a508%7]) with mapi id 15.20.3348.016; Thu, 3 Sep 2020 20:45:17 +0000 From: "Chautru, Nicolas" To: "Ananyev, Konstantin" , "Xu, Rosen" , "dev@dpdk.org" , "akhil.goyal@nxp.com" CC: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processing functions Thread-Index: AQHWgdH1nrzpwpcDM0KVd9XQf2vxI6lXWrzQ Date: Thu, 3 Sep 2020 20:45:17 +0000 Message-ID: References: <1597796731-57841-1-git-send-email-nicolas.chautru@intel.com> <1597796731-57841-6-git-send-email-nicolas.chautru@intel.com> In-Reply-To: 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: intel.com; dkim=none (message not signed) header.d=none;intel.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: 22b816f0-465e-4740-0d4e-08d8504a443b x-ms-traffictypediagnostic: BYAPR11MB3750: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0Wj1rTx/Kc5/0OjhwuXCjKZKK912AH3SmKUS4ghyiS6Y5nODPPu7KdsOKXRHdWgWpJNM4F2OgI8oegP/pvD2Oxo2+8P+r9C6iwp+75ytJtfPS5Jqa8ZBz6oFnOI6GAV45SkHW5WEiFm32dWH39iWZRVfqxMVdPvzcADr7Txp9i9s30hyeY8ywayEndYBvwYZsOG920rGzccZrvq7en6KD1zncYtvidBmIsb6W817STtY31F1DgOvazC5r3u6mG6YxX4ZIXP6BDY2EhV07EoA3V0+qwrToveEpgtt4OSc9paPaUV+eIqC4qqV87IMP3LupKdNf21vEuotyFU66h0Hrg== 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:(4636009)(366004)(346002)(39860400002)(136003)(396003)(376002)(107886003)(7696005)(2906002)(71200400001)(86362001)(83380400001)(110136005)(316002)(186003)(76116006)(66556008)(26005)(4326008)(66946007)(66446008)(9686003)(52536014)(53546011)(6506007)(64756008)(8936002)(5660300002)(55016002)(33656002)(66476007)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: Y1SdhNfSrTLZScSAfz7N1xdufPWHpPci4JF10DeXqe9EUlG1koy8iVIJtUTEvZwd46BWKiS0RuY0hxUJ3xVOLkzcm4urs6jU5UM8t7+M/fI6NA+AQnSKd3iCXOfvK6logczUKBy7wfu+ZXZnzYekaOhuYpsgsbJD832dpfcce8Qnp6z/kaj4tdIDRZilgHBqnZBrNYQ4Eqfl+vbf/Br3wipp2Pcm0eUD+kRDxX4WwqG9lohYpAIzoR09lnqZyTPclvewZIW+sjeJEiJdAvyJxNxDSscK7JxBjTlMM2gfur7fnBg0X536Col6m/VG2tb8rXtv/pYKDlOdKY+STugDSegm9OE5Cw5OYYvWBYMlhpl2vaph3n/hSBePNEDgtCYCkEoiFj6EoM/7imU+xuuHpAfv4tIn7gGkF5hfhpM7Oqzmb2QWCuogMkKwoU6gnzS5+dTkCik7WGvIxcaMXlmmEsKY+ZLlkvrMZRAijDRtTjQZurAIbp3tHQSD+OJ5JCmvu0tZOPkaoTPBiHW3PrqvWxNubfaD5YvC1fsEMfWDzm3TJYTnO3yTCdCYgIzqFgiatgwIqUIpFKZKKlVBbeSi5y3TheQBT+s1J1NByKINrFXsjq6do3MsUPwQYBguEEKiWyHVILYanY7igcoSw5UR4A== 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: 22b816f0-465e-4740-0d4e-08d8504a443b X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2020 20:45:17.3868 (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: zlvKVd7cf5wfinLTdgaOR2r4HaiRG5lluF+WfQb34kohOqCNZxRlyChIES9YFKMEmEYmY3eM0TgbxJLx1gKu2JKd6H43QAM5MIYhkKJMN8M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3750 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processing functions 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" > From: Ananyev, Konstantin >=20 >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Xu, Rosen > > Sent: Thursday, September 3, 2020 3:34 AM > > To: Chautru, Nicolas ; dev@dpdk.org; > > akhil.goyal@nxp.com > > Cc: Richardson, Bruce > > Subject: Re: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC > > processing functions > > > > Hi, > > > > > -----Original Message----- > > > From: Chautru, Nicolas > > > Sent: Sunday, August 30, 2020 2:01 > > > To: Xu, Rosen ; dev@dpdk.org; > > > akhil.goyal@nxp.com > > > Cc: Richardson, Bruce > > > Subject: RE: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC > > > processing functions > > > > > > Hi Rosen, > > > > > > > From: Xu, Rosen > > > > > > > > Hi, > > > > > > > > > -----Original Message----- > > > > > From: dev On Behalf Of Nicolas Chautru > > > > > Sent: Wednesday, August 19, 2020 8:25 > > > > > To: dev@dpdk.org; akhil.goyal@nxp.com > > > > > Cc: Richardson, Bruce ; Chautru, > > > > > Nicolas > > > > > Subject: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC > > > > > processing functions > > > > > > > > > > Adding LDPC decode and encode processing operations > > > > > > > > > > Signed-off-by: Nicolas Chautru > > > > > --- > > > > > drivers/baseband/acc100/rte_acc100_pmd.c | 1625 > > > > > +++++++++++++++++++++++++++++- > > > > > drivers/baseband/acc100/rte_acc100_pmd.h | 3 + > > > > > 2 files changed, 1626 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c > > > > > b/drivers/baseband/acc100/rte_acc100_pmd.c > > > > > index 7a21c57..5f32813 100644 > > > > > --- a/drivers/baseband/acc100/rte_acc100_pmd.c > > > > > +++ b/drivers/baseband/acc100/rte_acc100_pmd.c > > > > > @@ -15,6 +15,9 @@ > > > > > #include > > > > > #include > > > > > #include > > > > > +#ifdef RTE_BBDEV_OFFLOAD_COST > > > > > +#include > > > > > +#endif > > > > > > > > > > #include > > > > > #include > > > > > @@ -449,7 +452,6 @@ > > > > > return 0; > > > > > } > > > > > > > > > > - > > > > > /** > > > > > * Report a ACC100 queue index which is free > > > > > * Return 0 to 16k for a valid queue_idx or -1 when no queue is > > > > > available @@ -634,6 +636,46 @@ > > > > > struct acc100_device *d =3D dev->data->dev_private; > > > > > > > > > > static const struct rte_bbdev_op_cap bbdev_capabilities[] =3D { > > > > > + { > > > > > + .type =3D RTE_BBDEV_OP_LDPC_ENC, > > > > > + .cap.ldpc_enc =3D { > > > > > + .capability_flags =3D > > > > > + > RTE_BBDEV_LDPC_RATE_MATCH | > > > > > + > RTE_BBDEV_LDPC_CRC_24B_ATTACH > > > > > | > > > > > + > > > > > RTE_BBDEV_LDPC_INTERLEAVER_BYPASS, > > > > > + .num_buffers_src =3D > > > > > + > > > > > RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, > > > > > + .num_buffers_dst =3D > > > > > + > > > > > RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, > > > > > + } > > > > > + }, > > > > > + { > > > > > + .type =3D RTE_BBDEV_OP_LDPC_DEC, > > > > > + .cap.ldpc_dec =3D { > > > > > + .capability_flags =3D > > > > > + > RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | > > > > > + > RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | > > > > > + > > > > > RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | > > > > > + > > > > > RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | > > > > > +#ifdef ACC100_EXT_MEM > > > > > + > > > > > RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | > > > > > + > > > > > RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | > > > > > +#endif > > > > > + > > > > > RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | > > > > > + > RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS > > > > > | > > > > > + RTE_BBDEV_LDPC_DECODE_BYPASS | > > > > > + > RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | > > > > > + > > > > > RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | > > > > > + > RTE_BBDEV_LDPC_LLR_COMPRESSION, > > > > > + .llr_size =3D 8, > > > > > + .llr_decimals =3D 1, > > > > > + .num_buffers_src =3D > > > > > + > > > > > RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, > > > > > + .num_buffers_hard_out =3D > > > > > + > > > > > RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, > > > > > + .num_buffers_soft_out =3D 0, > > > > > + } > > > > > + }, > > > > > RTE_BBDEV_END_OF_CAPABILITIES_LIST() > > > > > }; > > > > > > > > > > @@ -669,9 +711,14 @@ > > > > > dev_info->cpu_flag_reqs =3D NULL; > > > > > dev_info->min_alignment =3D 64; > > > > > dev_info->capabilities =3D bbdev_capabilities; > > > > > +#ifdef ACC100_EXT_MEM > > > > > dev_info->harq_buffer_size =3D d->ddr_size; > > > > > +#else > > > > > + dev_info->harq_buffer_size =3D 0; #endif > > > > > } > > > > > > > > > > + > > > > > static const struct rte_bbdev_ops acc100_bbdev_ops =3D { > > > > > .setup_queues =3D acc100_setup_queues, > > > > > .close =3D acc100_dev_close, > > > > > @@ -696,6 +743,1577 @@ > > > > > {.device_id =3D 0}, > > > > > }; > > > > > > > > > > +/* Read flag value 0/1 from bitmap */ static inline bool > > > > > +check_bit(uint32_t bitmap, uint32_t bitmask) { > > > > > + return bitmap & bitmask; > > > > > +} > > > > > + > > > > > +static inline char * > > > > > +mbuf_append(struct rte_mbuf *m_head, struct rte_mbuf *m, > > > > > +uint16_t > > > > > +len) { > > > > > + if (unlikely(len > rte_pktmbuf_tailroom(m))) > > > > > + return NULL; > > > > > + > > > > > + char *tail =3D (char *)m->buf_addr + m->data_off + m- > >data_len; > > > > > + m->data_len =3D (uint16_t)(m->data_len + len); > > > > > + m_head->pkt_len =3D (m_head->pkt_len + len); > > > > > + return tail; > > > > > +} > > > > > > > > Is it reasonable to direct add data_len of rte_mbuf? > > > > > > > > > > Do you suggest to add directly without checking there is enough room > > > in the mbuf? We cannot rely on the application providing mbuf with > > > enough tailroom. > > > > What I mentioned is this changes about mbuf should move to librte_mbuf. > > And it's better to align Olivier Matz. >=20 > There is already rte_pktmbuf_append() inside rte_mbuf.h. > Wouldn't it suit? >=20 Hi Ananyev, Rosen,=20 I agree that this can be confusing at first look and notably compared to pa= cket processing.=20 Note first that this same existing syntaxwhich is already used in all bbde= v PMDs when manipulating outbound mbufs in the context of base band signal = processing (not really a packet as for NIC or other devices).=20 Nothing new in that very PMD as this follows existing logic already in DPDK= bbdev PMDs.=20 This function basically differs from the typical rte_pktmbuf_append() as th= is is not appending data in the last mbuf but is used to potentially updat= e sequentially data for any mbufs in the middle from preallocated data henc= e it takes 2 arguments for both the head and the current mbuf segment in th= e list.=20 There may be a more elegant way to do this down the line notably once there= is a proposal to handle gracefully large mbufs (another usecase we have to= handle in a slightly custom way). But I believe that is orthogonal to that= very PMD serie which keeps on reling on using existing logic. =20 > > > > > In case you ask about the 2 mbufs, this is because this function is > > > used to also support segmented memory made of multiple mbufs segments= . > > > Note that this function is also used in other existing bbdev PMDs. > > > In case you believe there is a better way to do this, we can > > > certainly discuss and change these in several PMDs through another se= rie. > > > > > > Thanks for all the reviews and useful comments. > > > Nic