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 64A14A04D7; Thu, 3 Sep 2020 10:06:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CCB21BEAF; Thu, 3 Sep 2020 10:06:56 +0200 (CEST) Received: from GBR01-CWL-obe.outbound.protection.outlook.com (mail-eopbgr110120.outbound.protection.outlook.com [40.107.11.120]) by dpdk.org (Postfix) with ESMTP id C56D7E07 for ; Thu, 3 Sep 2020 10:06:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gO9x6TwHrVOU+4wU6aM4p5LRsPG8kiO2ApoEhta45w2CbG7SOiFaMM6PKYLbZT5WkA8aCCUPxv+CdkNdaqU2lYRJ6VoQDUukGlFU8kHk+qjYDqry6sIePInSBCJ1mHjYPv7umxvktGdnoudum6sTIAnqVAEQJQv0WuZpFoyYLragrHOJVsVsgl7eIDXEj4J6PBDlb9i2OIA6cEvCiZzcACfr7MKNqqv107UGsCd4B1PA2bZhgzqFHhnDiHMDn6mZlUFg7CngZ8LlgjIFtm9DN1jwZqzX6TZxaDnzn6hLBvHNCujXubeA8L/P/cuFqYMcJ34GuCKTvBq710wC3c/Ktw== 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=IjKxYHc8udtgTiCI1mEs8FoMAU073NyHcsdZgtriKlQ=; b=HNADF+K1SN/dnDhXAM7wXR+xNYDJW240FvlTVlDWhI83w28OynzA72Cj5nI9UQf1sasWexPThU5qUUxa+nQrG+8QQ5MliNpSnHvwqYabJV5p+uxqV0aZlclBqqEtJO97ss7BLgUSctzra4qAqRcPO1lP04Pgh1Srtre7f0t5Dam7QD67NbD1vxKpQw6PrdlpjGDPA1UH6nBMfFfHewV9086K/FSKdjfMwKqmBAC/Jw2giqrbDfpgHGFw9UWrEebq6HjvtKN8iMsQ+Uo7kfv9Dwz1W93fswvW1mTWm7PvywhJb8+cnk+f8YK6iwY7Zj/+Te06CI/ENtoLyIb/dT2stg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=accelercomm.com; dmarc=pass action=none header.from=accelercomm.com; dkim=pass header.d=accelercomm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=accelercomm.onmicrosoft.com; s=selector1-accelercomm-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IjKxYHc8udtgTiCI1mEs8FoMAU073NyHcsdZgtriKlQ=; b=Mcz7GrOYu/TJEy/s8+ldLiZYxOnPkoOyB4Cz124wvGN35V3jzbuiPmb+xV+Es3iKN/Lc7mX3jLqeCYtBJQ3blxmQwrw3YshmsbiOPEFknr5zvCJmTqe0jHmB7TuduuWx8VxH8/heLOTf/he6ntSzExoGjnynVlsfW3pxDtVZPrQ= Received: from LOYP265MB2174.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:114::11) by LO3P265MB1882.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Thu, 3 Sep 2020 08:06:53 +0000 Received: from LOYP265MB2174.GBRP265.PROD.OUTLOOK.COM ([fe80::fd8e:7ab4:840b:fbcb]) by LOYP265MB2174.GBRP265.PROD.OUTLOOK.COM ([fe80::fd8e:7ab4:840b:fbcb%3]) with mapi id 15.20.3348.015; Thu, 3 Sep 2020 08:06:53 +0000 From: Dave Burley To: "Chautru, Nicolas" , "dev@dpdk.org" CC: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processing functions Thread-Index: AQHWdb+qCjhvM2dNJ06knjdffc9KoalBEyHMgAAEgoCAAACspYAAZ5KAgBUmpnI= Date: Thu, 3 Sep 2020 08:06:52 +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-GB, en-US Content-Language: en-GB 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=accelercomm.com; x-originating-ip: [2a00:23c4:cf2d:a200:6023:b810:2491:c6a9] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2f94f8c9-051d-4542-4da9-08d84fe0516f x-ms-traffictypediagnostic: LO3P265MB1882: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T/Ppm4ALyR/lsXbQDjfuIlnrUv5H180mjQ3CQUoU5+esOSFeNN2q0kOhfR1JKRr4RDOP8anDgPtqop1igmYLCo/hu17GThAHQuRnlSjmKEb00UE32GzmmH95lga5mUlLE8M3Yew+tY7M1T25Ho6apsrBKSeD01Yg3SJvJMonSuLCXE0x/xwN6dpUeyXGv7eB+ONV2W59wCX9laqIji/7TOYA+ZiSqIEcmPHxFIcP6pbmxaBswydcn+Mz+MsvmpYSk+w3A+pzd45w8wWUrqmfpTifC4SVdBEXj7tnVbYomw9WpBzny5ilg+YcQSITDvsThfcJ05PQrtStpIHWEhMjvDAY7qzgWoMPj5+6qz0YGV+hjS5vqFpjOgxrldjgb8/aGGzy6ehMKk7Nr43KiUjSaGyo5oesXAAAcvBVFmkN3KWKcnMq7QyfNGrWytIN2gGr6m77F0TL+5ygvpIhJBAQeg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LOYP265MB2174.GBRP265.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(346002)(39830400003)(136003)(376002)(366004)(396003)(7696005)(33656002)(6506007)(71200400001)(8936002)(66556008)(64756008)(9686003)(66446008)(55016002)(478600001)(66476007)(76116006)(966005)(53546011)(66946007)(110136005)(44832011)(5660300002)(4326008)(86362001)(52536014)(30864003)(83380400001)(316002)(186003)(2906002)(461764006)(559001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: XT/kXAT7CL0vGr02CF5gHnBz+NTtULIG2RnpamUKtcd0xjRW6HeGAP+dcqoAzgrLRzFyYzS2+g3fe7NFZvVviuOfbp2HWAfa9hdOXoC32xg/A/ThfaNSpYa+HeFRqdi82x6EpKnKUBLhBpNDiph3tyvXEgIaoVqjCRdbp18mhkkBojYvIgVPPYs3OCPX1enNWKJQomWE9EB24SK95MaMYn5v+LbFIbnfQldFnrG0C/zLnEnNrK3mGFKqvUTT+RXkQN7F5bjrvbEG62KB/ktdZ7L19NkJPNJgRBuI/fcvyL0BVGypcgUgcpyjJly2zDmhXu9Bu5F3EBKAHBV7/sd7FozrUzRziPBgK9UFfJJ45jnxLj5h2k0SIetQbT78Y8afgBwAAKjZI5mrsbjr8y4Fpn+ONosW+/H8UatdTClZh0Q86W5qQB7EgePemSp99G/uAOaUeJQQkLHXuZEH2z1F0B20wexNSReyPMcGPESqEj+er2witYuFjvT+9x/qJM6VfJwrVVsG8Bh3P2i6iHMmoI7cqxqcOIn0UzNNNkd4oeHL+EWmzZs/3mLsXvl9fOH+EEDL+2Mic/43NNjo6G+GD38Or/MhMMIK4FbtRwhM3LQM9dLaKCQYCYcDbL28TtzWQOL3X9lTE7MxNLy1mLRqA+I5raNBG3KKR9nPb5PyE0sOk9Mrut1pJr1QpVnhvK3Wiw3L9V+6c2OmPQxlpWY8sg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: accelercomm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LOYP265MB2174.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 2f94f8c9-051d-4542-4da9-08d84fe0516f X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2020 08:06:52.9078 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a4aefd0f-62ef-4258-bd2b-0b6f6112bf2c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: csGT91pkNF22g00oERxustkiDeSfhX4vzMRJvhkHqG46Ux3L6tDs2zuUeI7rn7mDEFjcXKoF1iMOe48gw+4bm/VXXG8HPYV4cbQosajfpsY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO3P265MB1882 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" Acked-by: Dave Burley =0A= =0A= =0A= From: Chautru, Nicolas =0A= Sent: 20 August 2020 22:05=0A= To: Dave Burley ; dev@dpdk.org = =0A= Cc: Richardson, Bruce =0A= Subject: RE: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processi= ng functions =0A= =A0=0A= =0A= > From: Dave Burley > =0A= > Hi Nic=0A= > =0A= > Thank you - it would be useful to have further documentation for clarific= ation=0A= > as the data format isn't explicitly documented in BBDEV.=0A= =0A= Thanks Dave. Just updated on this other patch -> https://patches.dpdk.org/p= atch/75793/=0A= Feel free to ack or let me know if you need more details. =0A= =0A= > Best Regards=0A= > =0A= > Dave=0A= > =0A= > =0A= > From: Chautru, Nicolas =0A= > Sent: 20 August 2020 15:52=0A= > To: Dave Burley ; dev@dpdk.org=0A= > =0A= > Cc: Richardson, Bruce =0A= > Subject: RE: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC=0A= > processing functions=0A= > =0A= > Hi Dave,=0A= > This is assuming 6 bits LLR compression packing (ie. first 2 MSB dropped)= .=0A= > Similar to HARQ compression.=0A= > Let me know if unclear, I can clarify further in documentation if not exp= licit=0A= > enough.=0A= > Thanks=0A= > Nic=0A= > =0A= > > -----Original Message-----=0A= > > From: Dave Burley =0A= > > Sent: Thursday, August 20, 2020 7:39 AM=0A= > > To: Chautru, Nicolas ; dev@dpdk.org=0A= > > Cc: Richardson, Bruce =0A= > > Subject: Re: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC=0A= > > processing functions=0A= > >=0A= > > Hi Nic,=0A= > >=0A= > > As you've now specified the use of RTE_BBDEV_LDPC_LLR_COMPRESSION for= =0A= > > this PMB, please could you confirm what the packed format of the LLRs i= n=0A= > > memory looks like?=0A= > >=0A= > > Best Regards=0A= > >=0A= > > Dave Burley=0A= > >=0A= > >=0A= > > From: dev on behalf of Nicolas Chautru=0A= > > =0A= > > Sent: 19 August 2020 01:25=0A= > > To: dev@dpdk.org ; akhil.goyal@nxp.com=0A= > > =0A= > > Cc: bruce.richardson@intel.com ; Nicolas=0A= > > Chautru =0A= > > Subject: [dpdk-dev] [PATCH v3 05/11] baseband/acc100: add LDPC processi= ng=0A= > > functions=0A= > >=0A= > > Adding LDPC decode and encode processing operations=0A= > >=0A= > > Signed-off-by: Nicolas Chautru =0A= > > ---=0A= > > =A0drivers/baseband/acc100/rte_acc100_pmd.c | 1625=0A= > > +++++++++++++++++++++++++++++-=0A= > > =A0drivers/baseband/acc100/rte_acc100_pmd.h |=A0=A0=A0 3 +=0A= > > =A02 files changed, 1626 insertions(+), 2 deletions(-)=0A= > >=0A= > > diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c=0A= > > b/drivers/baseband/acc100/rte_acc100_pmd.c=0A= > > index 7a21c57..5f32813 100644=0A= > > --- a/drivers/baseband/acc100/rte_acc100_pmd.c=0A= > > +++ b/drivers/baseband/acc100/rte_acc100_pmd.c=0A= > > @@ -15,6 +15,9 @@=0A= > > =A0#include =0A= > > =A0#include =0A= > > =A0#include =0A= > > +#ifdef RTE_BBDEV_OFFLOAD_COST=0A= > > +#include =0A= > > +#endif=0A= > >=0A= > > =A0#include =0A= > > =A0#include =0A= > > @@ -449,7 +452,6 @@=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 return 0;=0A= > > =A0}=0A= > >=0A= > > -=0A= > > =A0/**=0A= > > =A0 * Report a ACC100 queue index which is free=0A= > > =A0 * Return 0 to 16k for a valid queue_idx or -1 when no queue is avai= lable=0A= > > @@ -634,6 +636,46 @@=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_device *d =3D dev->data->dev_pri= vate;=0A= > >=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 static const struct rte_bbdev_op_cap bbdev_cap= abilities[] =3D {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ty= pe=A0=A0 =3D RTE_BBDEV_OP_LDPC_ENC,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ca= p.ldpc_enc =3D {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 .capability_flags =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_RATE_MATCH |= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_CRC_24B_ATTACH= |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_INTERLEAVER_BY= PASS,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 .num_buffers_src =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_B= BDEV_LDPC_MAX_CODE_BLOCKS,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 .num_buffers_dst =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_B= BDEV_LDPC_MAX_CODE_BLOCKS,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 },=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ty= pe=A0=A0 =3D RTE_BBDEV_OP_LDPC_DEC,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ca= p.ldpc_dec =3D {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ca= pability_flags =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE |=0A= > > +#ifdef ACC100_EXT_MEM=0A= > >=0A= > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABL=0A= > > E |=0A= > >=0A= > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENA=0A= > > BLE |=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_DECODE_BYPASS |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_DEC_SCATTER_GATHER |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION |=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_LLR_COMPRESSION,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ll= r_size =3D 8,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .ll= r_decimals =3D 1,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .nu= m_buffers_src =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_MAX_CODE_BLOCK= S,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .nu= m_buffers_hard_out =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_MAX_CODE_BLOCK= S,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 .nu= m_buffers_soft_out =3D 0,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 },=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_END_OF_CAPAB= ILITIES_LIST()=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 };=0A= > >=0A= > > @@ -669,9 +711,14 @@=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 dev_info->cpu_flag_reqs =3D NULL;=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 dev_info->min_alignment =3D 64;=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 dev_info->capabilities =3D bbdev_capabilities;= =0A= > > +#ifdef ACC100_EXT_MEM=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 dev_info->harq_buffer_size =3D d->ddr_size;=0A= > > +#else=0A= > > +=A0=A0=A0=A0=A0=A0 dev_info->harq_buffer_size =3D 0;=0A= > > +#endif=0A= > > =A0}=0A= > >=0A= > > +=0A= > > =A0static const struct rte_bbdev_ops acc100_bbdev_ops =3D {=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 .setup_queues =3D acc100_setup_queues,=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 .close =3D acc100_dev_close,=0A= > > @@ -696,6 +743,1577 @@=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 {.device_id =3D 0},=0A= > > =A0};=0A= > >=0A= > > +/* Read flag value 0/1 from bitmap */=0A= > > +static inline bool=0A= > > +check_bit(uint32_t bitmap, uint32_t bitmask)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 return bitmap & bitmask;=0A= > > +}=0A= > > +=0A= > > +static inline char *=0A= > > +mbuf_append(struct rte_mbuf *m_head, struct rte_mbuf *m, uint16_t len)= =0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(len > rte_pktmbuf_tailroom(m)))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return NULL;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 char *tail =3D (char *)m->buf_addr + m->data_off + = m->data_len;=0A= > > +=A0=A0=A0=A0=A0=A0 m->data_len =3D (uint16_t)(m->data_len + len);=0A= > > +=A0=A0=A0=A0=A0=A0 m_head->pkt_len=A0 =3D (m_head->pkt_len + len);=0A= > > +=A0=A0=A0=A0=A0=A0 return tail;=0A= > > +}=0A= > > +=0A= > > +/* Compute value of k0.=0A= > > + * Based on 3GPP 38.212 Table 5.4.2.1-2=0A= > > + * Starting position of different redundancy versions, k0=0A= > > + */=0A= > > +static inline uint16_t=0A= > > +get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 if (rv_index =3D=3D 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t n =3D (bg =3D=3D 1 ? N_ZC_1 : N_ZC_2) * z_= c;=0A= > > +=A0=A0=A0=A0=A0=A0 if (n_cb =3D=3D n) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (rv_index =3D=3D 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn (bg =3D=3D 1 ? K0_1_1 : K0_1_2) * z_c;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else if (rv_index =3D=3D 2)= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn (bg =3D=3D 1 ? K0_2_1 : K0_2_2) * z_c;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn (bg =3D=3D 1 ? K0_3_1 : K0_3_2) * z_c;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 /* LBRM case - includes a division by N */=0A= > > +=A0=A0=A0=A0=A0=A0 if (rv_index =3D=3D 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return (((bg =3D=3D 1 ? K0_= 1_1 : K0_1_2) * n_cb)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 / n) * z_c;=0A= > > +=A0=A0=A0=A0=A0=A0 else if (rv_index =3D=3D 2)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return (((bg =3D=3D 1 ? K0_= 2_1 : K0_2_2) * n_cb)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 / n) * z_c;=0A= > > +=A0=A0=A0=A0=A0=A0 else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return (((bg =3D=3D 1 ? K0_= 3_1 : K0_3_2) * n_cb)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 / n) * z_c;=0A= > > +}=0A= > > +=0A= > > +/* Fill in a frame control word for LDPC encoding. */=0A= > > +static inline void=0A= > > +acc100_fcw_le_fill(const struct rte_bbdev_enc_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_fcw_le *fcw, = int num_cb)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->qm =3D op->ldpc_enc.q_m;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->nfiller =3D op->ldpc_enc.n_filler;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->BG =3D (op->ldpc_enc.basegraph - 1);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->Zc =3D op->ldpc_enc.z_c;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->ncb =3D op->ldpc_enc.n_cb;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->k0 =3D get_k0(fcw->ncb, fcw->Zc, op->ldpc_enc.= basegraph,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op-= >ldpc_enc.rv_index);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->rm_e =3D op->ldpc_enc.cb_params.e;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->crc_select =3D check_bit(op->ldpc_enc.op_flags= ,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_CRC_24B_ATTACH);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->bypass_intlv =3D check_bit(op->ldpc_enc.op_fla= gs,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_INTERLEAVER_BYPASS);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->mcb_count =3D num_cb;=0A= > > +}=0A= > > +=0A= > > +/* Fill in a frame control word for LDPC decoding. */=0A= > > +static inline void=0A= > > +acc100_fcw_ld_fill(const struct rte_bbdev_dec_op *op, struct=0A= > acc100_fcw_ld=0A= > > *fcw,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 union acc100_harq_layout_da= ta *harq_layout)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t harq_out_length, harq_in_length, ncb_p, k0= _p, parity_offset;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t harq_index;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t l;=0A= > > +=A0=A0=A0=A0=A0=A0 bool harq_prun =3D false;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->qm =3D op->ldpc_dec.q_m;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->nfiller =3D op->ldpc_dec.n_filler;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->BG =3D (op->ldpc_dec.basegraph - 1);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->Zc =3D op->ldpc_dec.z_c;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->ncb =3D op->ldpc_dec.n_cb;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->k0 =3D get_k0(fcw->ncb, fcw->Zc, op->ldpc_dec.= basegraph,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op-= >ldpc_dec.rv_index);=0A= > > +=A0=A0=A0=A0=A0=A0 if (op->ldpc_dec.code_block_mode =3D=3D 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->rm_e =3D op->ldpc_dec.= cb_params.e;=0A= > > +=A0=A0=A0=A0=A0=A0 else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->rm_e =3D (op->ldpc_dec= .tb_params.r <=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.tb_params.cab) ?=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->l= dpc_dec.tb_params.ea :=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->l= dpc_dec.tb_params.eb;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->hcin_en =3D check_bit(op->ldpc_dec.op_flags,= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_HQ_COMBINE_IN_ENABLE);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->hcout_en =3D check_bit(op->ldpc_dec.op_flags,= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->crc_select =3D check_bit(op->ldpc_dec.op_flags= ,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_CRC_TYPE_24B_CHECK);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->bypass_dec =3D check_bit(op->ldpc_dec.op_flags= ,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_DECODE_BYPASS);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->bypass_intlv =3D check_bit(op->ldpc_dec.op_fla= gs,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_DEINTERLEAVER_BYPASS);=0A= > > +=A0=A0=A0=A0=A0=A0 if (op->ldpc_dec.q_m =3D=3D 1) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->bypass_intlv =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->qm =3D 2;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->hcin_decomp_mode =3D check_bit(op->ldpc_dec.op= _flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_HARQ_6BIT_COMPRESSION);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->hcout_comp_mode =3D check_bit(op->ldpc_dec.op_= flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_HARQ_6BIT_COMPRESSION);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->llr_pack_mode =3D check_bit(op->ldpc_dec.op_fl= ags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_LLR_COMPRESSION);=0A= > > +=A0=A0=A0=A0=A0=A0 harq_index =3D op->ldpc_dec.harq_combined_output.of= fset /=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ACC= 100_HARQ_OFFSET;=0A= > > +#ifdef ACC100_EXT_MEM=0A= > > +=A0=A0=A0=A0=A0=A0 /* Limit cases when HARQ pruning is valid */=0A= > > +=A0=A0=A0=A0=A0=A0 harq_prun =3D ((op->ldpc_dec.harq_combined_output.o= ffset %=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ACC= 100_HARQ_OFFSET) =3D=3D 0) &&=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (op= ->ldpc_dec.harq_combined_output.offset <=3D UINT16_MAX=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * A= CC100_HARQ_OFFSET);=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0 if (fcw->hcin_en > 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_in_length =3D op->ldpc= _dec.harq_combined_input.length;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (fcw->hcin_decomp_mode >= 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 har= q_in_length =3D harq_in_length * 8 / 6;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_in_length =3D RTE_ALIG= N(harq_in_length, 64);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if ((harq_layout[harq_index= ].offset > 0) & harq_prun) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _bbdev_log_debug("HARQ IN offset unexpected for=0A= > now\n");=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcin_size0 =3D harq_layout[harq_index].size0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcin_offset =3D harq_layout[harq_index].offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcin_size1 =3D harq_in_length -=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_layout[harq_index].offse= t;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcin_size0 =3D harq_in_length;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcin_offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcin_size1 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->hcin_size0 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->hcin_offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->hcin_size1 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->itmax =3D op->ldpc_dec.iter_max;=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->itstop =3D check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_ITERATION_STOP_ENABLE);=0A= > > +=A0=A0=A0=A0=A0=A0 fcw->synd_precoder =3D fcw->itstop;=0A= > > +=A0=A0=A0=A0=A0=A0 /*=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * These are all implicitly set=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->synd_post =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->so_en =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->so_bypass_rm =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->so_bypass_intlv =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->dec_convllr =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->hcout_convllr =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->hcout_size1 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->so_it =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->hcout_offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->negstop_th =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->negstop_it =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->negstop_en =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->gain_i =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * fcw->gain_h =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0=A0 */=0A= > > +=A0=A0=A0=A0=A0=A0 if (fcw->hcout_en > 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 parity_offset =3D (op->ldpc= _dec.basegraph =3D=3D 1 ? 20 : 8)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * o= p->ldpc_dec.z_c - op->ldpc_dec.n_filler;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 k0_p =3D (fcw->k0 > parity_= offset) ?=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 fcw->k0 - op->ldpc_dec.n_filler : fcw->k0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ncb_p =3D fcw->ncb - op->ld= pc_dec.n_filler;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 l =3D k0_p + fcw->rm_e;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_out_length =3D (uint16= _t) fcw->hcin_size0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_out_length =3D RTE_MIN= (RTE_MAX(harq_out_length, l),=0A= > ncb_p);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_out_length =3D (harq_o= ut_length + 0x3F) & 0xFFC0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if ((k0_p > fcw->hcin_size0= + ACC100_HARQ_OFFSET_THRESHOLD)=0A= > > &&=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 harq_prun) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcout_size0 =3D (uint16_t) fcw->hcin_size0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcout_offset =3D k0_p & 0xFFC0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcout_size1 =3D harq_out_length - fcw->hcout_offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcout_size0 =3D harq_out_length;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcout_size1 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw= ->hcout_offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_layout[harq_index].off= set =3D fcw->hcout_offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_layout[harq_index].siz= e0 =3D fcw->hcout_size0;=0A= > > +=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->hcout_size0 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->hcout_size1 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw->hcout_offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +}=0A= > > +=0A= > > +/**=0A= > > + * Fills descriptor with data pointers of one block type.=0A= > > + *=0A= > > + * @param desc=0A= > > + *=A0=A0 Pointer to DMA descriptor.=0A= > > + * @param input=0A= > > + *=A0=A0 Pointer to pointer to input data which will be encoded. It ca= n be changed=0A= > > + *=A0=A0 and points to next segment in scatter-gather case.=0A= > > + * @param offset=0A= > > + *=A0=A0 Input offset in rte_mbuf structure. It is used for calculatin= g the point=0A= > > + *=A0=A0 where data is starting.=0A= > > + * @param cb_len=0A= > > + *=A0=A0 Length of currently processed Code Block=0A= > > + * @param seg_total_left=0A= > > + *=A0=A0 It indicates how many bytes still left in segment (mbuf) for = further=0A= > > + *=A0=A0 processing.=0A= > > + * @param op_flags=0A= > > + *=A0=A0 Store information about device capabilities=0A= > > + * @param next_triplet=0A= > > + *=A0=A0 Index for ACC100 DMA Descriptor triplet=0A= > > + *=0A= > > + * @return=0A= > > + *=A0=A0 Returns index of next triplet on success, other value if leng= ths of=0A= > > + *=A0=A0 pkt and processed cb do not match.=0A= > > + *=0A= > > + */=0A= > > +static inline int=0A= > > +acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_mbuf **input, ui= nt32_t *offset, uint32_t cb_len,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *seg_total_left, i= nt next_triplet)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t part_len;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_mbuf *m =3D *input;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 part_len =3D (*seg_total_left < cb_len) ? *seg_tota= l_left : cb_len;=0A= > > +=A0=A0=A0=A0=A0=A0 cb_len -=3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0 *seg_total_left -=3D part_len;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _pktmbuf_iova_offset(m, *offset);=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].blen =3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].blkid =3D ACC100_DMA_= BLKID_IN;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].last =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].dma_ext =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 *offset +=3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 while (cb_len > 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (next_triplet < ACC100_D= MA_MAX_NUM_POINTERS &&=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 m->next !=3D NULL) {=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 m = =3D m->next;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 *se= g_total_left =3D rte_pktmbuf_data_len(m);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 par= t_len =3D (*seg_total_left < cb_len) ?=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 *seg_total_left :=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cb_len;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->data_ptrs[next_triplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_pktmbuf_mtophys(m);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->data_ptrs[next_triplet].blen =3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->data_ptrs[next_triplet].blkid =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ACC100_DMA_BLKID_IN;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->data_ptrs[next_triplet].last =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->data_ptrs[next_triplet].dma_ext =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cb_= len -=3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 *se= g_total_left -=3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* = Initializing offset for next segment (mbuf) */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 *of= fset =3D part_len;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 nex= t_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Some data still left for processing: "=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "data_left: %u, next_triplet: %u, next_mbuf: %p",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 cb_len, next_triplet, m->next);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn -EINVAL;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 /* Storing new mbuf as it could be changed in scatt= er-gather case*/=0A= > > +=A0=A0=A0=A0=A0=A0 *input =3D m;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return next_triplet;=0A= > > +}=0A= > > +=0A= > > +/* Fills descriptor with data pointers of one block type.=0A= > > + * Returns index of next triplet on success, other value if lengths of= =0A= > > + * output data and processed mbuf do not match.=0A= > > + */=0A= > > +static inline int=0A= > > +acc100_dma_fill_blk_type_out(struct acc100_dma_req_desc *desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_mbuf *output, ui= nt32_t out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t output_len, int ne= xt_triplet, int blk_id)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _pktmbuf_iova_offset(output, out_offset);=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].blen =3D output_len;= =0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].blkid =3D blk_id;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].last =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].dma_ext =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return next_triplet;=0A= > > +}=0A= > > +=0A= > > +static inline int=0A= > > +acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_dma_req_desc = *desc, struct rte_mbuf **input,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_mbuf *output, ui= nt32_t *in_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *out_offset, uint3= 2_t *out_length,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *mbuf_total_left, = uint32_t *seg_total_left)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 int next_triplet =3D 1; /* FCW already done */=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t K, in_length_in_bits, in_length_in_bytes;= =0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_op_ldpc_enc *enc =3D &op->ldpc_enc= ;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word0 =3D ACC100_DMA_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word1 =3D 0; /**< Timestamp could be disabled= */=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word2 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word3 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->numCBs =3D 1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 K =3D (enc->basegraph =3D=3D 1 ? 22 : 10) * enc->z_= c;=0A= > > +=A0=A0=A0=A0=A0=A0 in_length_in_bits =3D K - enc->n_filler;=0A= > > +=A0=A0=A0=A0=A0=A0 if ((enc->op_flags & RTE_BBDEV_LDPC_CRC_24A_ATTACH)= ||=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (en= c->op_flags & RTE_BBDEV_LDPC_CRC_24B_ATTACH))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 in_length_in_bits -=3D 24;= =0A= > > +=A0=A0=A0=A0=A0=A0 in_length_in_bytes =3D in_length_in_bits >> 3;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely((*mbuf_total_left =3D=3D 0) ||=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*m= buf_total_left < in_length_in_bytes))) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Mismatch between mbuf length and included CB sizes:= =0A= > > mbuf len %u, cb len %u",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 *mbuf_total_left, in_length_in_bytes);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet =3D acc100_dma_fill_blk_type_in(desc, = input, in_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 in_= length_in_bytes,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 seg= _total_left, next_triplet);=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(next_triplet < 0)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Mismatch between data to process and mbuf data=0A= > length=0A= > > in bbdev_op: %p",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet - 1].last =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->m2dlen =3D next_triplet;=0A= > > +=A0=A0=A0=A0=A0=A0 *mbuf_total_left -=3D in_length_in_bytes;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Set output length */=0A= > > +=A0=A0=A0=A0=A0=A0 /* Integer round up division by 8 */=0A= > > +=A0=A0=A0=A0=A0=A0 *out_length =3D (enc->cb_params.e + 7) >> 3;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet =3D acc100_dma_fill_blk_type_out(desc,= output, *out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 *ou= t_length, next_triplet, ACC100_DMA_BLKID_OUT_ENC);=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(next_triplet < 0)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Mismatch between data to process and mbuf data=0A= > length=0A= > > in bbdev_op: %p",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 op->ldpc_enc.output.length +=3D *out_length;=0A= > > +=A0=A0=A0=A0=A0=A0 *out_offset +=3D *out_length;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet - 1].last =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet - 1].dma_ext =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->d2mlen =3D next_triplet - desc->m2dlen;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->op_addr =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +}=0A= > > +=0A= > > +static inline int=0A= > > +acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_dma_req_desc = *desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_mbuf **input, st= ruct rte_mbuf *h_output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *in_offset, uint32= _t *h_out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *h_out_length, uin= t32_t *mbuf_total_left,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *seg_total_left,= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_fcw_ld *fcw)= =0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_op_ldpc_dec *dec =3D &op->ldpc_dec= ;=0A= > > +=A0=A0=A0=A0=A0=A0 int next_triplet =3D 1; /* FCW already done */=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t input_length;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t output_length, crc24_overlap =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t sys_cols, K, h_p_size, h_np_size;=0A= > > +=A0=A0=A0=A0=A0=A0 bool h_comp =3D check_bit(dec->op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_HARQ_6BIT_COMPRESSION);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word0 =3D ACC100_DMA_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word1 =3D 0; /**< Timestamp could be disabled= */=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word2 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->word3 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->numCBs =3D 1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_CRC_TYPE_24B_DROP))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 crc24_overlap =3D 24;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Compute some LDPC BG lengths */=0A= > > +=A0=A0=A0=A0=A0=A0 input_length =3D dec->cb_params.e;=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 RTE= _BBDEV_LDPC_LLR_COMPRESSION))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 input_length =3D (input_len= gth * 3 + 3) / 4;=0A= > > +=A0=A0=A0=A0=A0=A0 sys_cols =3D (dec->basegraph =3D=3D 1) ? 22 : 10;= =0A= > > +=A0=A0=A0=A0=A0=A0 K =3D sys_cols * dec->z_c;=0A= > > +=A0=A0=A0=A0=A0=A0 output_length =3D K - dec->n_filler - crc24_overlap= ;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely((*mbuf_total_left =3D=3D 0) ||=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*m= buf_total_left < input_length))) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Mismatch between mbuf length and included CB sizes:= =0A= > > mbuf len %u, cb len %u",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 *mbuf_total_left, input_length);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet =3D acc100_dma_fill_blk_type_in(desc, = input,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 in_= offset, input_length,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 seg= _total_left, next_triplet);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(next_triplet < 0)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Mismatch between data to process and mbuf data=0A= > length=0A= > > in bbdev_op: %p",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_p_size =3D fcw->hcin_size= 0 + fcw->hcin_size1;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (h_comp)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_p= _size =3D (h_p_size * 3 + 3) / 4;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 dec->harq_combined_input.offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].blen =3D h_p_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].blkid =3D=0A= > > ACC100_DMA_BLKID_IN_HARQ;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].dma_ext =3D 1;=0A= > > +#ifndef ACC100_EXT_MEM=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_dma_fill_blk_type_ou= t(=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.harq_combined_input.data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.harq_combined_input.offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 h_p_size,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 next_triplet,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ACC100_DMA_BLKID_IN_HARQ);=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet - 1].last =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->m2dlen =3D next_triplet;=0A= > > +=A0=A0=A0=A0=A0=A0 *mbuf_total_left -=3D input_length;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet =3D acc100_dma_fill_blk_type_out(desc,= h_output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 *h_= out_offset, output_length >> 3, next_triplet,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ACC= 100_DMA_BLKID_OUT_HARD);=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(next_triplet < 0)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Mismatch between data to process and mbuf data=0A= > length=0A= > > in bbdev_op: %p",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Pruned size of the HARQ = */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_p_size =3D fcw->hcout_siz= e0 + fcw->hcout_size1;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Non-Pruned size of the H= ARQ */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_np_size =3D fcw->hcout_of= fset > 0 ?=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 fcw->hcout_offset + fcw->hcout_size1 :=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 h_p_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (h_comp) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_n= p_size =3D (h_np_size * 3 + 3) / 4;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_p= _size =3D (h_p_size * 3 + 3) / 4;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 dec->harq_combined_output.l= ength =3D h_np_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 dec->harq_combined_output.offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].blen =3D h_p_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].blkid =3D=0A= > > ACC100_DMA_BLKID_OUT_HARQ;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].dma_ext =3D 1;=0A= > > +#ifndef ACC100_EXT_MEM=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_dma_fill_blk_type_ou= t(=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 dec->harq_combined_output.data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 dec->harq_combined_output.offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 h_p_size,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 next_triplet,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ACC100_DMA_BLKID_OUT_HARQ);=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 *h_out_length =3D output_length >> 3;=0A= > > +=A0=A0=A0=A0=A0=A0 dec->hard_output.length +=3D *h_out_length;=0A= > > +=A0=A0=A0=A0=A0=A0 *h_out_offset +=3D *h_out_length;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet - 1].last =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->d2mlen =3D next_triplet - desc->m2dlen;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->op_addr =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +}=0A= > > +=0A= > > +static inline void=0A= > > +acc100_dma_desc_ld_update(struct rte_bbdev_dec_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_dma_req_desc = *desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_mbuf *input, str= uct rte_mbuf *h_output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *in_offset, uint32= _t *h_out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t *h_out_length,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 union acc100_harq_layout_da= ta *harq_layout)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 int next_triplet =3D 1; /* FCW already done */=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _pktmbuf_iova_offset(input, *in_offset);=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_op_data hi= =3D op->ldpc_dec.harq_combined_input;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].address =3D hi.offset;=0A= > > +#ifndef ACC100_EXT_MEM=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 rte_pktmbuf_iova_offset(hi.data, hi.offset);=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _pktmbuf_iova_offset(h_output, *h_out_offset);=0A= > > +=A0=A0=A0=A0=A0=A0 *h_out_length =3D desc->data_ptrs[next_triplet].ble= n;=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(op->ldpc_dec.op_flags,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.harq_combined_output.offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Adjust based on previous= operation */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op *pr= ev_op =3D desc->op_addr;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.harq_combined_= output.length =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 prev_op->ldpc_dec.harq_combined_output.length;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int16_t hq_idx =3D op->ldpc= _dec.harq_combined_output.offset /=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ACC100_HARQ_OFFSET;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int16_t prev_hq_idx =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 prev_op->ldpc_dec.harq_combined_output.offset=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 / ACC100_HARQ_OFFSET;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 harq_layout[hq_idx].val =3D= harq_layout[prev_hq_idx].val;=0A= > > +#ifndef ACC100_EXT_MEM=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_op_data ho= =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.harq_combined_output;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->data_ptrs[next_triple= t].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 rte_pktmbuf_iova_offset(ho.data, ho.offset);=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 op->ldpc_dec.hard_output.length +=3D *h_out_length;= =0A= > > +=A0=A0=A0=A0=A0=A0 desc->op_addr =3D op;=0A= > > +}=0A= > > +=0A= > > +=0A= > > +/* Enqueue a number of operations to HW and update software rings */= =0A= > > +static inline void=0A= > > +acc100_dma_enqueue(struct acc100_queue *q, uint16_t n,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_stats *que= ue_stats)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_enqueue_reg_fmt enq_req;=0A= > > +#ifdef RTE_BBDEV_OFFLOAD_COST=0A= > > +=A0=A0=A0=A0=A0=A0 uint64_t start_time =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 queue_stats->acc_offload_cycles =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 RTE_SET_USED(queue_stats);=0A= > > +#else=0A= > > +=A0=A0=A0=A0=A0=A0 RTE_SET_USED(queue_stats);=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 enq_req.val =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 /* Setting offset, 100b for 256 DMA Desc */=0A= > > +=A0=A0=A0=A0=A0=A0 enq_req.addr_offset =3D ACC100_DESC_OFFSET;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Split ops into batches */=0A= > > +=A0=A0=A0=A0=A0=A0 do {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc= ;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t enq_batch_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint64_t offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_iova_t req_elem_addr;= =0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_batch_size =3D RTE_MIN(= n, MAX_ENQ_BATCH_SIZE);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Set flag on last descrip= tor in a batch */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q= ->sw_ring_head + enq_batch_size - 1) &=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 q->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.last_desc_in_batc= h =3D 1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Calculate the 1st descri= ptor's address */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 offset =3D ((q->sw_ring_hea= d & q->sw_ring_wrap_mask) *=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 sizeof(union acc100_dma_desc));=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 req_elem_addr =3D q->ring_a= ddr_phys + offset;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Fill enqueue struct */= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_req.num_elem =3D enq_ba= tch_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* low 6 bits are not neede= d */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_req.req_elem_addr =3D (= uint32_t)(req_elem_addr >> 6);=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "Req sd= one", desc, sizeof(*desc));=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log_debug(=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Enqueue %u reqs (phys %#"PRIx64") to reg %p",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 enq_batch_size,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 req_elem_addr,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 (void *)q->mmio_reg_enqueue);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_wmb();=0A= > > +=0A= > > +#ifdef RTE_BBDEV_OFFLOAD_COST=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Start time measurement f= or enqueue function offload. */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 start_time =3D rte_rdtsc_pr= ecise();=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(DEBUG, "Debug= : MMIO Enqueue");=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 mmio_write(q->mmio_reg_enqu= eue, enq_req.val);=0A= > > +=0A= > > +#ifdef RTE_BBDEV_OFFLOAD_COST=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 queue_stats->acc_offload_cy= cles +=3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 rte_rdtsc_precise() - start_time;=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 q->aq_enqueued++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 q->sw_ring_head +=3D enq_ba= tch_size;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 n -=3D enq_batch_size;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 } while (n);=0A= > > +=0A= > > +=0A= > > +}=0A= > > +=0A= > > +/* Enqueue one encode operations for ACC100 device in CB mode */=0A= > > +static inline int=0A= > > +enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct=0A= > > rte_bbdev_enc_op **ops,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t total_enqueued_cbs= , int16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc =3D NULL;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t out_length;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_mbuf *output_head, *output;=0A= > > +=A0=A0=A0=A0=A0=A0 int i, next_triplet;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t=A0 in_length_in_bytes;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_op_ldpc_enc *enc =3D &ops[0]->ldpc= _enc;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t desc_idx =3D ((q->sw_ring_head + total_enq= ueued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + desc_idx;=0A= > > +=A0=A0=A0=A0=A0=A0 acc100_fcw_le_fill(ops[0], &desc->req.fcw_le, num);= =0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /** This could be done at polling */=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.word0 =3D ACC100_DMA_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.word1 =3D 0; /**< Timestamp could be disa= bled */=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.word2 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.word3 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.numCBs =3D num;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 in_length_in_bytes =3D ops[0]->ldpc_enc.input.data-= >data_len;=0A= > > +=A0=A0=A0=A0=A0=A0 out_length =3D (enc->cb_params.e + 7) >> 3;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.m2dlen =3D 1 + num;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.d2mlen =3D num;=0A= > > +=A0=A0=A0=A0=A0=A0 next_triplet =3D 1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < num; i++) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[next_tr= iplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte= _pktmbuf_iova_offset(ops[i]->ldpc_enc.input.data, 0);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[next_tr= iplet].blen =3D in_length_in_bytes;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[next_tr= iplet].address =3D=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 rte_pktmbuf_iova_offset(=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ops[i]->ldpc_enc.output.data, 0);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[next_tr= iplet].blen =3D out_length;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 next_triplet++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ops[i]->ldpc_enc.output.len= gth =3D out_length;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 output_head =3D output =3D = ops[i]->ldpc_enc.output.data;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 mbuf_append(output_head, ou= tput, out_length);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 output->data_len =3D out_le= ngth;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.op_addr =3D ops[0];=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "FCW", &desc->req.fcw_le,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 siz= eof(desc->req.fcw_le) - 8);=0A= > > +=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc= ));=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* One CB (one op) was successfully prepared to enq= ueue */=0A= > > +=A0=A0=A0=A0=A0=A0 return num;=0A= > > +}=0A= > > +=0A= > > +/* Enqueue one encode operations for ACC100 device in CB mode */=0A= > > +static inline int=0A= > > +enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct=0A= > > rte_bbdev_enc_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t total_enqueued_cbs= )=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc =3D NULL;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t in_offset, out_offset, out_length, mbuf_to= tal_left,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 seg_total_left;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_mbuf *input, *output_head, *output;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t desc_idx =3D ((q->sw_ring_head + total_enq= ueued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + desc_idx;=0A= > > +=A0=A0=A0=A0=A0=A0 acc100_fcw_le_fill(op, &desc->req.fcw_le, 1);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 input =3D op->ldpc_enc.input.data;=0A= > > +=A0=A0=A0=A0=A0=A0 output_head =3D output =3D op->ldpc_enc.output.data= ;=0A= > > +=A0=A0=A0=A0=A0=A0 in_offset =3D op->ldpc_enc.input.offset;=0A= > > +=A0=A0=A0=A0=A0=A0 out_offset =3D op->ldpc_enc.output.offset;=0A= > > +=A0=A0=A0=A0=A0=A0 out_length =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 mbuf_total_left =3D op->ldpc_enc.input.length;=0A= > > +=A0=A0=A0=A0=A0=A0 seg_total_left =3D rte_pktmbuf_data_len(op->ldpc_en= c.input.data)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 - i= n_offset;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 ret =3D acc100_dma_desc_le_fill(op, &desc->req, &in= put, output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &in= _offset, &out_offset, &out_length, &mbuf_total_left,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &se= g_total_left);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(ret < 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return ret;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 mbuf_append(output_head, output, out_length);=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "FCW", &desc->req.fcw_le,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 siz= eof(desc->req.fcw_le) - 8);=0A= > > +=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc= ));=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check if any data left after processing one CB *= /=0A= > > +=A0=A0=A0=A0=A0=A0 if (mbuf_total_left !=3D 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Some date still left after processing one CB:=0A= > > mbuf_total_left =3D %u",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 mbuf_total_left);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -EINVAL;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0 /* One CB (one op) was successfully prepared to enq= ueue */=0A= > > +=A0=A0=A0=A0=A0=A0 return 1;=0A= > > +}=0A= > > +=0A= > > +/** Enqueue one decode operations for ACC100 device in CB mode */=0A= > > +static inline int=0A= > > +enqueue_ldpc_dec_one_op_cb(struct acc100_queue *q, struct=0A= > > rte_bbdev_dec_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t total_enqueued_cbs= , bool same_op)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t desc_idx =3D ((q->sw_ring_head + total_enq= ueued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + desc_idx;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_mbuf *input, *h_output_head, *h_output;= =0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t in_offset, h_out_offset, h_out_length, mbu= f_total_left;=0A= > > +=A0=A0=A0=A0=A0=A0 input =3D op->ldpc_dec.input.data;=0A= > > +=A0=A0=A0=A0=A0=A0 h_output_head =3D h_output =3D op->ldpc_dec.hard_ou= tput.data;=0A= > > +=A0=A0=A0=A0=A0=A0 in_offset =3D op->ldpc_dec.input.offset;=0A= > > +=A0=A0=A0=A0=A0=A0 h_out_offset =3D op->ldpc_dec.hard_output.offset;= =0A= > > +=A0=A0=A0=A0=A0=A0 mbuf_total_left =3D op->ldpc_dec.input.length;=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(input =3D=3D NULL)) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR, "Invalid= mbuf pointer");=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -EFAULT;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_harq_layout_data *harq_layout =3D q->d= ->harq_layout;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (same_op) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *prev= _desc;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc_idx =3D ((q->sw_ring_h= ead + total_enqueued_cbs - 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 & q->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 prev_desc =3D q->ring_addr = + desc_idx;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint8_t *prev_ptr =3D (uint= 8_t *) prev_desc;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint8_t *new_ptr =3D (uint8= _t *) desc;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Copy first 4 words and B= DESCs */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_memcpy(new_ptr, prev_pt= r, 16);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_memcpy(new_ptr + 36, pr= ev_ptr + 36, 40);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.op_addr =3D prev_= desc->req.op_addr;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Copy FCW */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_memcpy(new_ptr + ACC100= _DESC_FCW_OFFSET,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 prev_ptr + ACC100_DESC_FCW_OFFSET,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ACC100_FCW_LD_BLEN);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_dma_desc_ld_update(o= p, &desc->req, input, h_output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &in_offset, &h_out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &h_out_length, harq_layout);=0A= > > +=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_fcw_ld *fcw;= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint32_t seg_total_left;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fcw =3D &desc->req.fcw_ld;= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_fcw_ld_fill(op, fcw,= harq_layout);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Special handling when ov= erusing mbuf */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (fcw->rm_e < MAX_E_MBUF)= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 seg= _total_left =3D rte_pktmbuf_data_len(input)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 - in_offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 seg= _total_left =3D fcw->rm_e;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D acc100_dma_desc_ld_= fill(op, &desc->req, &input, h_output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &in_offset, &h_out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &h_out_length, &mbuf_total_left,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &seg_total_left, fcw);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (unlikely(ret < 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn ret;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Hard output */=0A= > > +=A0=A0=A0=A0=A0=A0 mbuf_append(h_output_head, h_output, h_out_length);= =0A= > > +#ifndef ACC100_EXT_MEM=0A= > > +=A0=A0=A0=A0=A0=A0 if (op->ldpc_dec.harq_combined_output.length > 0) {= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Push the HARQ output int= o host memory */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_mbuf *hq_output_= head, *hq_output;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 hq_output_head =3D op->ldpc= _dec.harq_combined_output.data;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 hq_output =3D op->ldpc_dec.= harq_combined_output.data;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 mbuf_append(hq_output_head,= hq_output,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->ldpc_dec.harq_combined_output.length);=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +#endif=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "FCW", &desc->req.fcw_ld,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 siz= eof(desc->req.fcw_ld) - 8);=0A= > > +=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc= ));=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* One CB (one op) was successfully prepared to enq= ueue */=0A= > > +=A0=A0=A0=A0=A0=A0 return 1;=0A= > > +}=0A= > > +=0A= > > +=0A= > > +/* Enqueue one decode operations for ACC100 device in TB mode */=0A= > > +static inline int=0A= > > +enqueue_ldpc_dec_one_op_tb(struct acc100_queue *q, struct=0A= > > rte_bbdev_dec_op *op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t total_enqueued_cbs= , uint8_t cbs_in_tb)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc =3D NULL;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t r, c;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t in_offset, h_out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_out_length, mbuf_total_le= ft, seg_total_left;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_mbuf *input, *h_output_head, *h_output;= =0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t current_enqueued_cbs =3D 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t desc_idx =3D ((q->sw_ring_head + total_enq= ueued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + desc_idx;=0A= > > +=A0=A0=A0=A0=A0=A0 uint64_t fcw_offset =3D (desc_idx << 8) + ACC100_DE= SC_FCW_OFFSET;=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_harq_layout_data *harq_layout =3D q->d= ->harq_layout;=0A= > > +=A0=A0=A0=A0=A0=A0 acc100_fcw_ld_fill(op, &desc->req.fcw_ld, harq_layo= ut);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 input =3D op->ldpc_dec.input.data;=0A= > > +=A0=A0=A0=A0=A0=A0 h_output_head =3D h_output =3D op->ldpc_dec.hard_ou= tput.data;=0A= > > +=A0=A0=A0=A0=A0=A0 in_offset =3D op->ldpc_dec.input.offset;=0A= > > +=A0=A0=A0=A0=A0=A0 h_out_offset =3D op->ldpc_dec.hard_output.offset;= =0A= > > +=A0=A0=A0=A0=A0=A0 h_out_length =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 mbuf_total_left =3D op->ldpc_dec.input.length;=0A= > > +=A0=A0=A0=A0=A0=A0 c =3D op->ldpc_dec.tb_params.c;=0A= > > +=A0=A0=A0=A0=A0=A0 r =3D op->ldpc_dec.tb_params.r;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 while (mbuf_total_left > 0 && r < c) {=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 seg_total_left =3D rte_pktm= buf_data_len(input) - in_offset;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Set up DMA descriptor */= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q= ->sw_ring_head + total_enqueued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 & q->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].addr= ess =3D q->ring_addr_phys + fcw_offset;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].blen= =3D ACC100_FCW_LD_BLEN;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D acc100_dma_desc_ld_= fill(op, &desc->req, &input,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 h_output, &in_offset, &h_out_offset,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &h_out_length,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &mbuf_total_left, &seg_total_left,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 &desc->req.fcw_ld);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (unlikely(ret < 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn ret;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Hard output */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 mbuf_append(h_output_head, = h_output, h_out_length);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Set total number of CBs = in TB */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.cbs_in_tb =3D cbs= _in_tb;=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "FCW", = &desc->req.fcw_td,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 sizeof(desc->req.fcw_td) - 8);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_memdump(stderr, "Req De= sc.", desc, sizeof(*desc));=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (seg_total_left =3D=3D 0= ) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* = Go to the next mbuf */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 inp= ut =3D input->next;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 in_= offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_o= utput =3D h_output->next;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 h_o= ut_offset =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 total_enqueued_cbs++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 current_enqueued_cbs++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 r++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(desc =3D=3D NULL))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return current_enqueued_cbs= ;=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check if any CBs left for processing */=0A= > > +=A0=A0=A0=A0=A0=A0 if (mbuf_total_left !=3D 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 "Some date still left for processing: mbuf_total_left= =3D=0A= > %u",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 mbuf_total_left);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -EINVAL;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +#endif=0A= > > +=A0=A0=A0=A0=A0=A0 /* Set SDone on last CB descriptor for TB mode */= =0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.sdone_enable =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.irq_enable =3D q->irq_enable;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return current_enqueued_cbs;=0A= > > +}=0A= > > +=0A= > > +=0A= > > +/* Calculates number of CBs in processed encoder TB based on 'r' and i= nput=0A= > > + * length.=0A= > > + */=0A= > > +static inline uint8_t=0A= > > +get_num_cbs_in_tb_enc(struct rte_bbdev_op_turbo_enc *turbo_enc)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t c, c_neg, r, crc24_bits =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t k, k_neg, k_pos;=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t cbs_in_tb =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 int32_t length;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 length =3D turbo_enc->input.length;=0A= > > +=A0=A0=A0=A0=A0=A0 r =3D turbo_enc->tb_params.r;=0A= > > +=A0=A0=A0=A0=A0=A0 c =3D turbo_enc->tb_params.c;=0A= > > +=A0=A0=A0=A0=A0=A0 c_neg =3D turbo_enc->tb_params.c_neg;=0A= > > +=A0=A0=A0=A0=A0=A0 k_neg =3D turbo_enc->tb_params.k_neg;=0A= > > +=A0=A0=A0=A0=A0=A0 k_pos =3D turbo_enc->tb_params.k_pos;=0A= > > +=A0=A0=A0=A0=A0=A0 crc24_bits =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 if (check_bit(turbo_enc->op_flags,=0A= > > RTE_BBDEV_TURBO_CRC_24B_ATTACH))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 crc24_bits =3D 24;=0A= > > +=A0=A0=A0=A0=A0=A0 while (length > 0 && r < c) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 k =3D (r < c_neg) ? k_neg := k_pos;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 length -=3D (k - crc24_bits= ) >> 3;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 r++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cbs_in_tb++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return cbs_in_tb;=0A= > > +}=0A= > > +=0A= > > +/* Calculates number of CBs in processed decoder TB based on 'r' and i= nput=0A= > > + * length.=0A= > > + */=0A= > > +static inline uint16_t=0A= > > +get_num_cbs_in_tb_dec(struct rte_bbdev_op_turbo_dec *turbo_dec)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t c, c_neg, r =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t kw, k, k_neg, k_pos, cbs_in_tb =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 int32_t length;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 length =3D turbo_dec->input.length;=0A= > > +=A0=A0=A0=A0=A0=A0 r =3D turbo_dec->tb_params.r;=0A= > > +=A0=A0=A0=A0=A0=A0 c =3D turbo_dec->tb_params.c;=0A= > > +=A0=A0=A0=A0=A0=A0 c_neg =3D turbo_dec->tb_params.c_neg;=0A= > > +=A0=A0=A0=A0=A0=A0 k_neg =3D turbo_dec->tb_params.k_neg;=0A= > > +=A0=A0=A0=A0=A0=A0 k_pos =3D turbo_dec->tb_params.k_pos;=0A= > > +=A0=A0=A0=A0=A0=A0 while (length > 0 && r < c) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 k =3D (r < c_neg) ? k_neg := k_pos;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 kw =3D RTE_ALIGN_CEIL(k + 4= , 32) * 3;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 length -=3D kw;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 r++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cbs_in_tb++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return cbs_in_tb;=0A= > > +}=0A= > > +=0A= > > +/* Calculates number of CBs in processed decoder TB based on 'r' and i= nput=0A= > > + * length.=0A= > > + */=0A= > > +static inline uint16_t=0A= > > +get_num_cbs_in_tb_ldpc_dec(struct rte_bbdev_op_ldpc_dec *ldpc_dec)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t r, cbs_in_tb =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 int32_t length =3D ldpc_dec->input.length;=0A= > > +=A0=A0=A0=A0=A0=A0 r =3D ldpc_dec->tb_params.r;=0A= > > +=A0=A0=A0=A0=A0=A0 while (length > 0 && r < ldpc_dec->tb_params.c) {= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 length -=3D=A0 (r < ldpc_de= c->tb_params.cab) ?=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ldpc_dec->tb_params.ea :=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ldpc_dec->tb_params.eb;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 r++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cbs_in_tb++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 return cbs_in_tb;=0A= > > +}=0A= > > +=0A= > > +/* Check we can mux encode operations with common FCW */=0A= > > +static inline bool=0A= > > +check_mux(struct rte_bbdev_enc_op **ops, uint16_t num) {=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t i;=0A= > > +=A0=A0=A0=A0=A0=A0 if (num =3D=3D 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return false;=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 1; i < num; ++i) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Only mux compatible code= blocks */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (memcmp((uint8_t *)(&ops= [i]->ldpc_enc) + ENC_OFFSET,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 (uint8_t *)(&ops[0]->ldpc_enc) + ENC_OFFSET,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 CMP_ENC_SIZE) !=3D 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= urn false;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 return true;=0A= > > +}=0A= > > +=0A= > > +/** Enqueue encode operations for ACC100 device in CB mode. */=0A= > > +static inline uint16_t=0A= > > +acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_enc_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct acc100_queue *q =3D q_data->queue_private;= =0A= > > +=A0=A0=A0=A0=A0=A0 int32_t avail =3D q->sw_ring_depth + q->sw_ring_tai= l - q->sw_ring_head;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t i =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret, desc_idx =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 int16_t enq, left =3D num;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 while (left > 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (unlikely(avail - 1 < 0)= )=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 avail--;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq =3D RTE_MIN(left, MUX_5= GDL_DESC);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (check_mux(&ops[i], enq)= ) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= =3D enqueue_ldpc_enc_n_op_cb(q, &ops[i],=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc_idx, enq);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if = (ret < 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 break;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 i += =3D enq;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= =3D enqueue_ldpc_enc_one_op_cb(q, ops[i], desc_idx);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if = (ret < 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 break;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 i++= ;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc_idx++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 left =3D num - i;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(i =3D=3D 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0; /* Nothing to enq= ueue */=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Set SDone in last CB in enqueued ops for CB mode= */=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_head + desc_id= x - 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.sdone_enable =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.irq_enable =3D q->irq_enable;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 acc100_dma_enqueue(q, desc_idx, &q_data->queue_stat= s);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Update stats */=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.enqueued_count +=3D i;=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.enqueue_err_count +=3D num - i;= =0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return i;=0A= > > +}=0A= > > +=0A= > > +/* Enqueue encode operations for ACC100 device. */=0A= > > +static uint16_t=0A= > > +acc100_enqueue_ldpc_enc(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_enc_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(num =3D=3D 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +=A0=A0=A0=A0=A0=A0 return acc100_enqueue_ldpc_enc_cb(q_data, ops, num)= ;=0A= > > +}=0A= > > +=0A= > > +/* Check we can mux encode operations with common FCW */=0A= > > +static inline bool=0A= > > +cmp_ldpc_dec_op(struct rte_bbdev_dec_op **ops) {=0A= > > +=A0=A0=A0=A0=A0=A0 /* Only mux compatible code blocks */=0A= > > +=A0=A0=A0=A0=A0=A0 if (memcmp((uint8_t *)(&ops[0]->ldpc_dec) + DEC_OFF= SET,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (ui= nt8_t *)(&ops[1]->ldpc_dec) +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEC= _OFFSET, CMP_DEC_SIZE) !=3D 0) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return false;=0A= > > +=A0=A0=A0=A0=A0=A0 } else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return true;=0A= > > +}=0A= > > +=0A= > > +=0A= > > +/* Enqueue decode operations for ACC100 device in TB mode */=0A= > > +static uint16_t=0A= > > +acc100_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct acc100_queue *q =3D q_data->queue_private;= =0A= > > +=A0=A0=A0=A0=A0=A0 int32_t avail =3D q->sw_ring_depth + q->sw_ring_tai= l - q->sw_ring_head;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t i, enqueued_cbs =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t cbs_in_tb;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < num; ++i) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cbs_in_tb =3D get_num_cbs_i= n_tb_ldpc_dec(&ops[i]->ldpc_dec);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Check if there are avail= able space for further processing */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (unlikely(avail - cbs_in= _tb < 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 avail -=3D cbs_in_tb;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D enqueue_ldpc_dec_on= e_op_tb(q, ops[i],=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 enqueued_cbs, cbs_in_tb);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ret < 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enqueued_cbs +=3D ret;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 acc100_dma_enqueue(q, enqueued_cbs, &q_data->queue_= stats);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Update stats */=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.enqueued_count +=3D i;=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.enqueue_err_count +=3D num - i;= =0A= > > +=A0=A0=A0=A0=A0=A0 return i;=0A= > > +}=0A= > > +=0A= > > +/* Enqueue decode operations for ACC100 device in CB mode */=0A= > > +static uint16_t=0A= > > +acc100_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct acc100_queue *q =3D q_data->queue_private;= =0A= > > +=A0=A0=A0=A0=A0=A0 int32_t avail =3D q->sw_ring_depth + q->sw_ring_tai= l - q->sw_ring_head;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t i;=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=A0=A0=A0=A0=A0=A0 bool same_op =3D false;=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < num; ++i) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Check if there are avail= able space for further processing */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (unlikely(avail - 1 < 0)= )=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 avail -=3D 1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (i > 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 sam= e_op =3D cmp_ldpc_dec_op(&ops[i-1]);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(INFO, "Op %d = %d %d %d %d %d %d %d %d %d %d=0A= > > %d\n",=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 i, = ops[i]->ldpc_dec.op_flags, ops[i]->ldpc_dec.rv_index,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ops= [i]->ldpc_dec.iter_max, ops[i]->ldpc_dec.iter_count,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ops= [i]->ldpc_dec.basegraph, ops[i]->ldpc_dec.z_c,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ops= [i]->ldpc_dec.n_cb, ops[i]->ldpc_dec.q_m,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ops= [i]->ldpc_dec.n_filler, ops[i]->ldpc_dec.cb_params.e,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 sam= e_op);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D enqueue_ldpc_dec_on= e_op_cb(q, ops[i], i, same_op);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ret < 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(i =3D=3D 0))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0; /* Nothing to enq= ueue */=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Set SDone in last CB in enqueued ops for CB mode= */=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_head + i - 1)= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.sdone_enable =3D 1;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->req.irq_enable =3D q->irq_enable;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 acc100_dma_enqueue(q, i, &q_data->queue_stats);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Update stats */=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.enqueued_count +=3D i;=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.enqueue_err_count +=3D num - i;= =0A= > > +=A0=A0=A0=A0=A0=A0 return i;=0A= > > +}=0A= > > +=0A= > > +/* Enqueue decode operations for ACC100 device. */=0A= > > +static uint16_t=0A= > > +acc100_enqueue_ldpc_dec(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct acc100_queue *q =3D q_data->queue_private;= =0A= > > +=A0=A0=A0=A0=A0=A0 int32_t aq_avail =3D q->aq_depth +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (q-= >aq_dequeued - q->aq_enqueued) / 128;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely((aq_avail =3D=3D 0) || (num =3D=3D 0))= )=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (ops[0]->ldpc_dec.code_block_mode =3D=3D 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return acc100_enqueue_ldpc_= dec_tb(q_data, ops, num);=0A= > > +=A0=A0=A0=A0=A0=A0 else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return acc100_enqueue_ldpc_= dec_cb(q_data, ops, num);=0A= > > +}=0A= > > +=0A= > > +=0A= > > +/* Dequeue one encode operations from ACC100 device in CB mode */=0A= > > +static inline int=0A= > > +dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op= =0A= > > **ref_op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t total_dequeued_cbs= , uint32_t *aq_dequeued)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc, atom_desc;=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_rsp_desc rsp;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_enc_op *op;=0A= > > +=A0=A0=A0=A0=A0=A0 int i;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_tail + total_d= equeued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check fdone bit */=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_FDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 rsp.val =3D atom_desc.rsp.val;=0A= > > +=A0=A0=A0=A0=A0=A0 rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.= val);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Dequeue */=0A= > > +=A0=A0=A0=A0=A0=A0 op =3D desc->req.op_addr;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Clearing status, it will be set based on respons= e */=0A= > > +=A0=A0=A0=A0=A0=A0 op->status =3D 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.input_err)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ? (= 1 << RTE_BBDEV_DATA_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.dma_err) ? (1 << RTE_BBDEV_DR= V_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.fcw_err) ? (1 << RTE_BBDEV_DR= V_ERROR) : 0);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 if (desc->req.last_desc_in_batch) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*aq_dequeued)++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.last_desc_in_batc= h =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.val =3D ACC100_DMA_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_0 =3D 0; /*Reserved bits */=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_1 =3D 0; /*Reserved bits */=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Flag that the muxing cause loss of opaque data *= /=0A= > > +=A0=A0=A0=A0=A0=A0 op->opaque_data =3D (void *)-1;=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 0 ; i < desc->req.numCBs; i++)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ref_op[i] =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* One CB (op) was successfully dequeued */=0A= > > +=A0=A0=A0=A0=A0=A0 return desc->req.numCBs;=0A= > > +}=0A= > > +=0A= > > +/* Dequeue one encode operations from ACC100 device in TB mode */=0A= > > +static inline int=0A= > > +dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op= =0A= > > **ref_op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t total_dequeued_cbs= , uint32_t *aq_dequeued)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc, *last_desc, atom_desc;= =0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_rsp_desc rsp;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_enc_op *op;=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t i =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t current_dequeued_cbs =3D 0, cbs_in_tb;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_tail + total_d= equeued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check fdone bit */=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_FDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Get number of CBs in dequeued TB */=0A= > > +=A0=A0=A0=A0=A0=A0 cbs_in_tb =3D desc->req.cbs_in_tb;=0A= > > +=A0=A0=A0=A0=A0=A0 /* Get last CB */=0A= > > +=A0=A0=A0=A0=A0=A0 last_desc =3D q->ring_addr + ((q->sw_ring_tail=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 + t= otal_dequeued_cbs + cbs_in_tb - 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check if last CB in TB is ready to dequeue (and = thus=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * the whole TB) - checking sdone bit. If not ret= urn.=0A= > > +=A0=A0=A0=A0=A0=A0=A0 */=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= last_desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_SDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Dequeue */=0A= > > +=A0=A0=A0=A0=A0=A0 op =3D desc->req.op_addr;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Clearing status, it will be set based on respons= e */=0A= > > +=A0=A0=A0=A0=A0=A0 op->status =3D 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 while (i < cbs_in_tb) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q= ->sw_ring_tail=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 + total_dequeued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 & q->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __at= omic_load_n((uint64_t *)desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 __ATOMIC_RELAXED);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rsp.val =3D atom_desc.rsp.v= al;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log_debug("Resp. = desc %p: %x", desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 rsp.val);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.input= _err)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ? (1 << RTE_BBDEV_DATA_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.dma_e= rr) ? (1 << RTE_BBDEV_DRV_ERROR) :=0A= > 0);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.fcw_e= rr) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (desc->req.last_desc_in_= batch) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*a= q_dequeued)++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->req.last_desc_in_batch =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->rsp.val =3D ACC100_DM= A_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_0 =3D 0;= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_1 =3D 0;= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 total_dequeued_cbs++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 current_dequeued_cbs++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 i++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 *ref_op =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return current_dequeued_cbs;=0A= > > +}=0A= > > +=0A= > > +/* Dequeue one decode operation from ACC100 device in CB mode */=0A= > > +static inline int=0A= > > +dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_queue *q, str= uct rte_bbdev_dec_op **ref_op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t dequeued_cbs, uint= 32_t *aq_dequeued)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc, atom_desc;=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_rsp_desc rsp;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op *op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_tail + dequeue= d_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check fdone bit */=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_FDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 rsp.val =3D atom_desc.rsp.val;=0A= > > +=A0=A0=A0=A0=A0=A0 rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.= val);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Dequeue */=0A= > > +=A0=A0=A0=A0=A0=A0 op =3D desc->req.op_addr;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Clearing status, it will be set based on respons= e */=0A= > > +=A0=A0=A0=A0=A0=A0 op->status =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.input_err)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ? (= 1 << RTE_BBDEV_DATA_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.dma_err) ? (1 << RTE_BBDEV_DR= V_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.fcw_err) ? (1 << RTE_BBDEV_DR= V_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0 if (op->status !=3D 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 q_data->queue_stats.dequeue= _err_count++;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* CRC invalid if error exists */=0A= > > +=A0=A0=A0=A0=A0=A0 if (!op->status)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D rsp.crc_sta= tus << RTE_BBDEV_CRC_ERROR;=0A= > > +=A0=A0=A0=A0=A0=A0 op->turbo_dec.iter_count =3D (uint8_t) rsp.iter_cnt= / 2;=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check if this is the last desc in batch (Atomic = Queue) */=0A= > > +=A0=A0=A0=A0=A0=A0 if (desc->req.last_desc_in_batch) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*aq_dequeued)++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.last_desc_in_batc= h =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.val =3D ACC100_DMA_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_0 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_1 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 *ref_op =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* One CB (op) was successfully dequeued */=0A= > > +=A0=A0=A0=A0=A0=A0 return 1;=0A= > > +}=0A= > > +=0A= > > +/* Dequeue one decode operations from ACC100 device in CB mode */=0A= > > +static inline int=0A= > > +dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_queue *q, str= uct rte_bbdev_dec_op **ref_op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t dequeued_cbs, uint= 32_t *aq_dequeued)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc, atom_desc;=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_rsp_desc rsp;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op *op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_tail + dequeue= d_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check fdone bit */=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_FDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 rsp.val =3D atom_desc.rsp.val;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Dequeue */=0A= > > +=A0=A0=A0=A0=A0=A0 op =3D desc->req.op_addr;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Clearing status, it will be set based on respons= e */=0A= > > +=A0=A0=A0=A0=A0=A0 op->status =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D rsp.input_err << RTE_BBDEV_DATA_ERR= OR;=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D rsp.dma_err << RTE_BBDEV_DRV_ERROR;= =0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D rsp.fcw_err << RTE_BBDEV_DRV_ERROR;= =0A= > > +=A0=A0=A0=A0=A0=A0 if (op->status !=3D 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 q_data->queue_stats.dequeue= _err_count++;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 op->status |=3D rsp.crc_status << RTE_BBDEV_CRC_ERR= OR;=0A= > > +=A0=A0=A0=A0=A0=A0 if (op->ldpc_dec.hard_output.length > 0 && !rsp.syn= d_ok)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D 1 << RTE_BB= DEV_SYNDROME_ERROR;=0A= > > +=A0=A0=A0=A0=A0=A0 op->ldpc_dec.iter_count =3D (uint8_t) rsp.iter_cnt;= =0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check if this is the last desc in batch (Atomic = Queue) */=0A= > > +=A0=A0=A0=A0=A0=A0 if (desc->req.last_desc_in_batch) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*aq_dequeued)++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.last_desc_in_batc= h =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.val =3D ACC100_DMA_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_0 =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_1 =3D 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 *ref_op =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* One CB (op) was successfully dequeued */=0A= > > +=A0=A0=A0=A0=A0=A0 return 1;=0A= > > +}=0A= > > +=0A= > > +/* Dequeue one decode operations from ACC100 device in TB mode. */=0A= > > +static inline int=0A= > > +dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op= =0A= > > **ref_op,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 uint16_t dequeued_cbs, uint= 32_t *aq_dequeued)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc, *last_desc, atom_desc;= =0A= > > +=A0=A0=A0=A0=A0=A0 union acc100_dma_rsp_desc rsp;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op *op;=0A= > > +=A0=A0=A0=A0=A0=A0 uint8_t cbs_in_tb =3D 1, cb_idx =3D 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q->sw_ring_tail + dequeue= d_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check fdone bit */=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_FDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Dequeue */=0A= > > +=A0=A0=A0=A0=A0=A0 op =3D desc->req.op_addr;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Get number of CBs in dequeued TB */=0A= > > +=A0=A0=A0=A0=A0=A0 cbs_in_tb =3D desc->req.cbs_in_tb;=0A= > > +=A0=A0=A0=A0=A0=A0 /* Get last CB */=0A= > > +=A0=A0=A0=A0=A0=A0 last_desc =3D q->ring_addr + ((q->sw_ring_tail=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 + d= equeued_cbs + cbs_in_tb - 1)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0 /* Check if last CB in TB is ready to dequeue (and = thus=0A= > > +=A0=A0=A0=A0=A0=A0=A0 * the whole TB) - checking sdone bit. If not ret= urn.=0A= > > +=A0=A0=A0=A0=A0=A0=A0 */=0A= > > +=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __atomic_load_n((uint64_t *)= last_desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 __A= TOMIC_RELAXED);=0A= > > +=A0=A0=A0=A0=A0=A0 if (!(atom_desc.rsp.val & ACC100_SDONE))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -1;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Clearing status, it will be set based on respons= e */=0A= > > +=A0=A0=A0=A0=A0=A0 op->status =3D 0;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Read remaining CBs if exists */=0A= > > +=A0=A0=A0=A0=A0=A0 while (cb_idx < cbs_in_tb) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc =3D q->ring_addr + ((q= ->sw_ring_tail + dequeued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 & q->sw_ring_wrap_mask);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 atom_desc.atom_hdr =3D __at= omic_load_n((uint64_t *)desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 __ATOMIC_RELAXED);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rsp.val =3D atom_desc.rsp.v= al;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log_debug("Resp. = desc %p: %x", desc,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 rsp.val);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.input= _err)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ? (1 << RTE_BBDEV_DATA_ERROR) : 0);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.dma_e= rr) ? (1 << RTE_BBDEV_DRV_ERROR) :=0A= > 0);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->status |=3D ((rsp.fcw_e= rr) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* CRC invalid if error exi= sts */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (!op->status)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op-= >status |=3D rsp.crc_status << RTE_BBDEV_CRC_ERROR;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op->turbo_dec.iter_count = =3D RTE_MAX((uint8_t) rsp.iter_cnt,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 op->turbo_dec.iter_count);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Check if this is the las= t desc in batch (Atomic Queue) */=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (desc->req.last_desc_in_= batch) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (*a= q_dequeued)++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 des= c->req.last_desc_in_batch =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->rsp.val =3D ACC100_DM= A_DESC_TYPE;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_0 =3D 0;= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->rsp.add_info_1 =3D 0;= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 dequeued_cbs++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 cb_idx++;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 *ref_op =3D op;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return cb_idx;=0A= > > +}=0A= > > +=0A= > > +/* Dequeue LDPC encode operations from ACC100 device. */=0A= > > +static uint16_t=0A= > > +acc100_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_enc_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct acc100_queue *q =3D q_data->queue_private;= =0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t avail =3D q->sw_ring_head - q->sw_ring_tai= l;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t aq_dequeued =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t dequeue_num, i, dequeued_cbs =3D 0, dequeu= ed_descs =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(ops =3D=3D 0 && q =3D=3D NULL))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 dequeue_num =3D (avail < num) ? avail : num;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < dequeue_num; i++) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D dequeue_enc_one_op_= cb(q, &ops[dequeued_cbs],=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 dequeued_descs, &aq_dequeued);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ret < 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 dequeued_cbs +=3D ret;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 dequeued_descs++;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (dequeued_cbs >=3D num)= =0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 q->aq_dequeued +=3D aq_dequeued;=0A= > > +=A0=A0=A0=A0=A0=A0 q->sw_ring_tail +=3D dequeued_descs;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Update enqueue stats */=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.dequeued_count +=3D dequeued_cb= s;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return dequeued_cbs;=0A= > > +}=0A= > > +=0A= > > +/* Dequeue decode operations from ACC100 device. */=0A= > > +static uint16_t=0A= > > +acc100_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op **o= ps, uint16_t num)=0A= > > +{=0A= > > +=A0=A0=A0=A0=A0=A0 struct acc100_queue *q =3D q_data->queue_private;= =0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t dequeue_num;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t avail =3D q->sw_ring_head - q->sw_ring_tai= l;=0A= > > +=A0=A0=A0=A0=A0=A0 uint32_t aq_dequeued =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t i;=0A= > > +=A0=A0=A0=A0=A0=A0 uint16_t dequeued_cbs =3D 0;=0A= > > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev_dec_op *op;=0A= > > +=A0=A0=A0=A0=A0=A0 int ret;=0A= > > +=0A= > > +#ifdef RTE_LIBRTE_BBDEV_DEBUG=0A= > > +=A0=A0=A0=A0=A0=A0 if (unlikely(ops =3D=3D 0 && q =3D=3D NULL))=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;=0A= > > +#endif=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 dequeue_num =3D (avail < num) ? avail : num;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < dequeue_num; ++i) {=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 op =3D (q->ring_addr + ((q-= >sw_ring_tail + dequeued_cbs)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 & q= ->sw_ring_wrap_mask))->req.op_addr;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (op->ldpc_dec.code_block= _mode =3D=3D 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= =3D dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &aq_dequeued);=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret= =3D dequeue_ldpc_dec_one_op_cb(=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 q_data, q, &ops[i], dequeued_= cbs,=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &aq_dequeued);=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ret < 0)=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bre= ak;=0A= > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 dequeued_cbs +=3D ret;=0A= > > +=A0=A0=A0=A0=A0=A0 }=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 q->aq_dequeued +=3D aq_dequeued;=0A= > > +=A0=A0=A0=A0=A0=A0 q->sw_ring_tail +=3D dequeued_cbs;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 /* Update enqueue stats */=0A= > > +=A0=A0=A0=A0=A0=A0 q_data->queue_stats.dequeued_count +=3D i;=0A= > > +=0A= > > +=A0=A0=A0=A0=A0=A0 return i;=0A= > > +}=0A= > > +=0A= > > =A0/* Initialization Function */=0A= > > =A0static void=0A= > > =A0acc100_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)= =0A= > > @@ -703,6 +2321,10 @@=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 struct rte_pci_device *pci_dev =3D RTE_DEV_TO_= PCI(dev->device);=0A= > >=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 dev->dev_ops =3D &acc100_bbdev_ops;=0A= > > +=A0=A0=A0=A0=A0=A0 dev->enqueue_ldpc_enc_ops =3D acc100_enqueue_ldpc_e= nc;=0A= > > +=A0=A0=A0=A0=A0=A0 dev->enqueue_ldpc_dec_ops =3D acc100_enqueue_ldpc_d= ec;=0A= > > +=A0=A0=A0=A0=A0=A0 dev->dequeue_ldpc_enc_ops =3D acc100_dequeue_ldpc_e= nc;=0A= > > +=A0=A0=A0=A0=A0=A0 dev->dequeue_ldpc_dec_ops =3D acc100_dequeue_ldpc_d= ec;=0A= > >=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 ((struct acc100_device *) dev->data->dev_priva= te)->pf_device =3D=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 !strcmp(drv->driver.name,=0A= > > @@ -815,4 +2437,3 @@ static int acc100_pci_remove(struct rte_pci_device= =0A= > > *pci_dev)=0A= > > =A0RTE_PMD_REGISTER_PCI_TABLE(ACC100PF_DRIVER_NAME,=0A= > > pci_id_acc100_pf_map);=0A= > > =A0RTE_PMD_REGISTER_PCI(ACC100VF_DRIVER_NAME, acc100_pci_vf_driver);=0A= > > =A0RTE_PMD_REGISTER_PCI_TABLE(ACC100VF_DRIVER_NAME,=0A= > > pci_id_acc100_vf_map);=0A= > > -=0A= > > diff --git a/drivers/baseband/acc100/rte_acc100_pmd.h=0A= > > b/drivers/baseband/acc100/rte_acc100_pmd.h=0A= > > index 0e2b79c..78686c1 100644=0A= > > --- a/drivers/baseband/acc100/rte_acc100_pmd.h=0A= > > +++ b/drivers/baseband/acc100/rte_acc100_pmd.h=0A= > > @@ -88,6 +88,8 @@=0A= > > =A0#define TMPL_PRI_3=A0=A0=A0=A0=A0 0x0f0e0d0c=0A= > > =A0#define QUEUE_ENABLE=A0=A0=A0 0x80000000=A0 /* Bit to mark Queue as = Enabled */=0A= > > =A0#define WORDS_IN_ARAM_SIZE (128 * 1024 / 4)=0A= > > +#define ACC100_FDONE=A0=A0=A0 0x80000000=0A= > > +#define ACC100_SDONE=A0=A0=A0 0x40000000=0A= > >=0A= > > =A0#define ACC100_NUM_TMPL=A0 32=0A= > > =A0#define VF_OFFSET_QOS 16 /* offset in Memory Space specific to QoS M= on=0A= > */=0A= > > @@ -398,6 +400,7 @@ struct __rte_packed acc100_dma_req_desc {=0A= > > =A0union acc100_dma_desc {=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_dma_req_desc req;=0A= > > =A0=A0=A0=A0=A0=A0=A0=A0 union acc100_dma_rsp_desc rsp;=0A= > > +=A0=A0=A0=A0=A0=A0 uint64_t atom_hdr;=0A= > > =A0};=0A= > >=0A= > >=0A= > > --=0A= > > 1.8.3.1=