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 D690AA04BF; Thu, 3 Sep 2020 20:54:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B5A81C0B8; Thu, 3 Sep 2020 20:54:01 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 322781C0B6 for ; Thu, 3 Sep 2020 20:53:59 +0200 (CEST) IronPort-SDR: wnnKJDWSpZKNVooxLXJ4EXJzlfuiPRoKZTxOXsHzDO9RKBCZ45eR4VmRm3MO1H40pcN6YSaUTD 0n0jz7x1S0UA== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="155144352" X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="155144352" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2020 11:53:58 -0700 IronPort-SDR: P5zUDl5g1h4Q7v+InsRH3xbnS4C0W7Anzq9+BC3Nksw7hAhuB4DlblOJ0srnR25v0s4Af7Ihlc yHLy85yJcp9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="341907304" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 03 Sep 2020 11:53:57 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 3 Sep 2020 11:53:57 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 3 Sep 2020 11:53:57 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 3 Sep 2020 11:53:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OIBL4F/8RmIYGP71DgrT1sGTuNzYE4Jqj0vB6SLyabAY0OrbiAISf7Yi6ezAf1SfQ6NKomiS3JsQktO/fEBVRShP1CsLEfMPQp05i68ymFuCbLUqsMYhSJuZiiK4PNuPEq6G544c0aUtikpBpN/RXEk5Mx2SEy/o/BeXHDxccnk8Bgr+LDHmcqeZ0VZK1vZZUB7XJL+BIgQQdGuwJqDj1195EfpXDA18pO8Nm6ccfH9IeDRH2z7wNC0NQKVI4bE8kTolwY09iMZsxCBe65V6rovOG0m2E68LbDxD1DOsTm3vuOxeMB6Ajj2Vp/lY2qQrZ3spo/n9/UZrcLNUAsxnEg== 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=s4UsvemCwvRfSzr2nMUG0GeZKjc8Wq3RgGk+12ExbjE=; b=jnWud53rEbmPMIbSK/38j0gScJYc4xnBvy1HafBMQtSnHTzd9ftXkZFJECzw05TyDKRaYdUx7XfZsnSpRAwu4HzmfQRlb3EJzES4lVokiKoBC/lXK5evbMmX0/9aeB7lmsVaEJud9p5WSXJ/BsAsB5H2KLSPXHETUC9enaj8qv917ASf7zch2IS6Su4F3AG4axFF0dGORurGq/8nsoogaBIx6uNhKfK3K5PqDHm7Gb3ecsKidN5W8QT3+hMmQZYOE4NTsmlSLackzQqqm5GqfY2NNda9lmVnN7Pt0NiwOqjQqPqIPOv8bPkRNgh5uoJuFSJLbZM3qBKwe9PwVNEFwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s4UsvemCwvRfSzr2nMUG0GeZKjc8Wq3RgGk+12ExbjE=; b=Gmz1BEc5FZtB1Ea3y6xS46vN+GuEunACjRZzJuM2oxtQZ5wvcfi/C+ko7RZuOGn+IoBlOx1VEc5LEGMKFhIjAUw74bamfweReNuhlYmbEUV4vdmDMc4dDr/pa1xONtEl4VH/3OPWfU2yGdq/+4fdmp8iH5pBgZAm1qezkz+/tg0= Received: from BY5PR11MB4451.namprd11.prod.outlook.com (2603:10b6:a03:1cb::30) by BY5PR11MB4070.namprd11.prod.outlook.com (2603:10b6:a03:181::16) 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 18:53:45 +0000 Received: from BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::4162:97e1:7d04:a508]) by BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::4162:97e1:7d04:a508%7]) with mapi id 15.20.3348.016; Thu, 3 Sep 2020 18:53:45 +0000 From: "Chautru, Nicolas" To: Aidan Goddard , "dev@dpdk.org" , "akhil.goyal@nxp.com" CC: "Richardson, Bruce" , Dave Burley Thread-Topic: [dpdk-dev] [PATCH v3 10/11] baseband/acc100: add configure function Thread-Index: AQHWdb+QpWyjORyF3UG5O5E9anHMzalWyGGAgACMtZA= Date: Thu, 3 Sep 2020 18:53:44 +0000 Message-ID: References: <1597796731-57841-1-git-send-email-nicolas.chautru@intel.com>, <1597796731-57841-11-git-send-email-nicolas.chautru@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: accelercomm.com; dkim=none (message not signed) header.d=none;accelercomm.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [45.28.143.88] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: afa53cee-68ae-40bf-d3d7-08d8503aaf43 x-ms-traffictypediagnostic: BY5PR11MB4070: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8e8qGyk4UnxGvI95ParmS3VcUcctzZuebWX22a8kWwj/J/rpeBDkcNAUiI19M3gHs6VIGbW05Ps8tA5bUaE/pqPqSjd3/0g8cWxtJTOttippPaxhZdvkTcQUK7k+MrmqUcJT9EBKLYzeBQtfbvD/1p1e998ha9Ihiv/OQfctteGq8972K662utfpMePQmfwu+K7tB8eCU9YJq/2t4Tl/PMq37kAaoNIK7jQAOLIjgoNnlrQI9q3vgSyKv+3oeWf6fn9L8lN2swc6RCsF6eSPF2SHX5w4rVOvfvsyEknPRy/Rv+Xf6BqDQXf9PaQX5unN x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4451.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(136003)(376002)(396003)(366004)(110136005)(478600001)(33656002)(86362001)(54906003)(7696005)(316002)(83380400001)(19627235002)(30864003)(55016002)(2906002)(4326008)(186003)(76116006)(66946007)(64756008)(53546011)(8936002)(66446008)(66476007)(26005)(9686003)(8676002)(66556008)(52536014)(71200400001)(5660300002)(6506007)(559001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 9GxJ8ex5oHRR8ySSYSnQ62ssqVW4B+uJgM4cror62zz7C7KP2PACN/E+3xNfs5BVhAviZxYF66KI4igmuXojAT+78IqK86wMHEWyI0/Jjd05oRjX77ltqwEO4pCWx8wz8cytp8w+0IMHP29eZeGvlEyVvwH23fEPI40tHJThjoxjAeOrNWjr61CdwK4Uqq0DOVkpYFR+dU0XLNh7HXoOunPP/Jusai8Ts+qcs5etk6fEVHfcFyLPI5jUqz8xww8U7QVIIU3rVCDAkb2ybOO+dJBwZcg7lPxSgIzVF+vD/b6w4MmrHq4RULsNaG6rEXfpLgpIi5UwSyNziGu9/BWuhJn59OydqSZxUfR+GamXPJKW+Cg3EaVSLPyQXFVczmGd2a0JoJxcUFmpVNLM1J82rheCFsXsj0WonRk7k/QDaLrGkP5q+/pMeUXQJCIE4+O2gDKuFgcBEestM17Sd+rMdgtrLELkNKiKw3Xh90CkdFCuynAeVAbyb9InQwxt4PGVy1mxtPRfIH/mmPcqN2rG/qhmpE9AiZMrNji/pI4sqwP+di50cZ0FOWngmfvFhU6nqMYxgAD2OaxxzjM6hwoDJOF8muvluFqtXNBd5ZXd17Vjs4tVbT0AoSz+eWCps1MjyZnh1m6kSXX8ZdLuw2fpBg== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4451.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: afa53cee-68ae-40bf-d3d7-08d8503aaf43 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2020 18:53:44.9819 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HcbzxLmYuFNsJdplCYuR/QfrFevtFa7fPlNI2BdL6BMa+nj2PhkyD5c2dlQCeimIQzuZ701sCf9NMr9wxbG1/UgB4FeIKhca+MKExpf+ETs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4070 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 10/11] baseband/acc100: add configure function 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" Hi Aidan,=20 > From: Aidan Goddard >=20 > Hi Nic, >=20 > Does the ACC100-specific configuration code have to go into > test_bbdev_perf.c? Would it be better to avoid having this device specifi= c code > in test-bbdev or is there a good reason for doing so? The test-bbdev provides the option to initialize the HW device when running= from PF (-i option from command line) as this HW initialization is require= d to be able run any test on the HW (this has to be run at least once after= boot up or HW reset). The actual implementation of the related function is within each of the BBD= EV PMD directories as you can see below.=20 You can see the patch purely consists in : - defining default input config structure for the test - calling acc100_configure(info->dev_name, &conf); (the actual implementat= ion is not within bbdev-test). This is done the exact same way for existing other BBDEV PMDs and HW varian= ts, so this is kept fairly seamless, self contained and scalable.=20 Once configured all HW devices can be run with the exact same testcases (so= me cases may be skipped in case an HW variant doesn't support a given capab= ility).=20 I expect your BBDEV PMD to follow the same principle but let me know if you= have any concern or suggestion for this. In case somehow your device boots= up self-configured, then nothing would need to be called.=20 Thanks Nic >=20 > Thanks, >=20 > Aidan Goddard >=20 >=20 > From: dev on behalf of Nicolas Chautru > > Sent: 19 August 2020 01:25 > To: dev@dpdk.org ; akhil.goyal@nxp.com > > Cc: bruce.richardson@intel.com ; Nicolas > Chautru > Subject: [dpdk-dev] [PATCH v3 10/11] baseband/acc100: add configure funct= ion >=20 > Add configure function to configure the PF from within the bbdev-test its= elf > without external application configuration the device. >=20 > Signed-off-by: Nicolas Chautru > --- > =A0app/test-bbdev/test_bbdev_perf.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 |=A0 72 +++ > =A0drivers/baseband/acc100/Makefile=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 |=A0=A0 3 + > =A0drivers/baseband/acc100/meson.build=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 |=A0=A0 2 + > =A0drivers/baseband/acc100/rte_acc100_cfg.h=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= |=A0 17 + > =A0drivers/baseband/acc100/rte_acc100_pmd.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= | 505 > +++++++++++++++++++++ > =A0.../acc100/rte_pmd_bbdev_acc100_version.map=A0=A0=A0=A0=A0=A0=A0 |=A0= =A0 7 + > =A06 files changed, 606 insertions(+) >=20 > diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test- > bbdev/test_bbdev_perf.c > index 45c0d62..32f23ff 100644 > --- a/app/test-bbdev/test_bbdev_perf.c > +++ b/app/test-bbdev/test_bbdev_perf.c > @@ -52,6 +52,18 @@ > =A0#define FLR_5G_TIMEOUT 610 > =A0#endif >=20 > +#ifdef RTE_LIBRTE_PMD_BBDEV_ACC100 > +#include > +#define ACC100PF_DRIVER_NAME=A0=A0 ("intel_acc100_pf") #define > +ACC100VF_DRIVER_NAME=A0=A0 ("intel_acc100_vf") #define > ACC100_QMGR_NUM_AQS > +16 #define ACC100_QMGR_NUM_QGS 2 #define ACC100_QMGR_AQ_DEPTH > 5 #define > +ACC100_QMGR_INVALID_IDX -1 #define ACC100_QMGR_RR 1 #define > +ACC100_QOS_GBR 0 #endif > + > =A0#define OPS_CACHE_SIZE 256U > =A0#define OPS_POOL_SIZE_MIN 511U /* 0.5K per queue */ >=20 > @@ -653,6 +665,66 @@ typedef int (test_case_function)(struct active_devic= e > *ad, > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 info->dev_name); > =A0=A0=A0=A0=A0=A0=A0=A0 } > =A0#endif > +#ifdef RTE_LIBRTE_PMD_BBDEV_ACC100 > +=A0=A0=A0=A0=A0=A0 if ((get_init_device() =3D=3D true) && > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (!strcmp(info->drv.driver_nam= e, ACC100PF_DRIVER_NAME))) > +{ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_conf conf; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 unsigned int i; > + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 printf("Configure ACC100 FEC = Driver %s with default > +values\n", > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 info->drv.driver_name); > + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* clear default configuratio= n before initialization */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 memset(&conf, 0, sizeof(struc= t acc100_conf)); > + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Always set in PF mode for = built-in configuration */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.pf_mode_en =3D true; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < RTE_ACC100_= NUM_VFS; ++i) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_dl_4g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_dl_4g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_dl_4g[i].round_robin_weight =3D > +ACC100_QMGR_RR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_ul_4g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_ul_4g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_ul_4g[i].round_robin_weight =3D > +ACC100_QMGR_RR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_dl_5g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_dl_5g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_dl_5g[i].round_robin_weight =3D > +ACC100_QMGR_RR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_ul_5g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_ul_5g[i].gbr_threshold1 =3D > +ACC100_QOS_GBR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.= arb_ul_5g[i].round_robin_weight =3D > +ACC100_QMGR_RR; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.input_pos_llr_1_bit =3D = true; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.output_pos_llr_1_bit =3D= true; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.num_vf_bundles =3D 1; /*= *< Number of VF bundles to > +setup */ > + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_4g.num_qgroups =3D = ACC100_QMGR_NUM_QGS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_4g.first_qgroup_ind= ex =3D > +ACC100_QMGR_INVALID_IDX; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_4g.num_aqs_per_grou= ps =3D ACC100_QMGR_NUM_AQS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_4g.aq_depth_log2 = =3D ACC100_QMGR_AQ_DEPTH; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_4g.num_qgroups =3D = ACC100_QMGR_NUM_QGS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_4g.first_qgroup_ind= ex =3D > +ACC100_QMGR_INVALID_IDX; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_4g.num_aqs_per_grou= ps =3D ACC100_QMGR_NUM_AQS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_4g.aq_depth_log2 = =3D ACC100_QMGR_AQ_DEPTH; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_5g.num_qgroups =3D = ACC100_QMGR_NUM_QGS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_5g.first_qgroup_ind= ex =3D > +ACC100_QMGR_INVALID_IDX; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_5g.num_aqs_per_grou= ps =3D ACC100_QMGR_NUM_AQS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_ul_5g.aq_depth_log2 = =3D ACC100_QMGR_AQ_DEPTH; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_5g.num_qgroups =3D = ACC100_QMGR_NUM_QGS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_5g.first_qgroup_ind= ex =3D > +ACC100_QMGR_INVALID_IDX; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_5g.num_aqs_per_grou= ps =3D ACC100_QMGR_NUM_AQS; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf.q_dl_5g.aq_depth_log2 = =3D ACC100_QMGR_AQ_DEPTH; > + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* setup PF with configuratio= n information */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D acc100_configure(info= ->dev_name, &conf); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 TEST_ASSERT_SUCCESS(ret, > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 "Failed to configure ACC100 PF for bbdev > +%s", > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 info->dev_name); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Let's refresh this now thi= s is configured */ > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 rte_bbdev_info_get(dev_id, info); #endif > + > =A0=A0=A0=A0=A0=A0=A0=A0 nb_queues =3D RTE_MIN(rte_lcore_count(), info->d= rv.max_num_queues); > =A0=A0=A0=A0=A0=A0=A0=A0 nb_queues =3D RTE_MIN(nb_queues, (unsigned int) = MAX_QUEUES); >=20 > diff --git a/drivers/baseband/acc100/Makefile > b/drivers/baseband/acc100/Makefile > index c79e487..37e73af 100644 > --- a/drivers/baseband/acc100/Makefile > +++ b/drivers/baseband/acc100/Makefile > @@ -22,4 +22,7 @@ LIBABIVER :=3D 1 > =A0# library source files > =A0SRCS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_ACC100) +=3D rte_acc100_pmd.c >=20 > +# export include files > +SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_ACC100)-include +=3D > +rte_acc100_cfg.h > + > =A0include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/baseband/acc100/meson.build > b/drivers/baseband/acc100/meson.build > index 8afafc2..7ac44dc 100644 > --- a/drivers/baseband/acc100/meson.build > +++ b/drivers/baseband/acc100/meson.build > @@ -4,3 +4,5 @@ > =A0deps +=3D ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci'] >=20 > =A0sources =3D files('rte_acc100_pmd.c') > + > +install_headers('rte_acc100_cfg.h') > diff --git a/drivers/baseband/acc100/rte_acc100_cfg.h > b/drivers/baseband/acc100/rte_acc100_cfg.h > index 73bbe36..7f523bc 100644 > --- a/drivers/baseband/acc100/rte_acc100_cfg.h > +++ b/drivers/baseband/acc100/rte_acc100_cfg.h > @@ -89,6 +89,23 @@ struct acc100_conf { > =A0=A0=A0=A0=A0=A0=A0=A0 struct rte_arbitration_t arb_dl_5g[RTE_ACC100_NU= M_VFS]; > =A0}; >=20 > +/** > + * Configure a ACC100 device > + * > + * @param dev_name > + *=A0=A0 The name of the device. This is the short form of PCI BDF, e.g.= 00:01.0. > + *=A0=A0 It can also be retrieved for a bbdev device from the dev_name > +field in the > + *=A0=A0 rte_bbdev_info structure returned by rte_bbdev_info_get(). > + * @param conf > + *=A0=A0 Configuration to apply to ACC100 HW. > + * > + * @return > + *=A0=A0 Zero on success, negative value on failure. > + */ > +__rte_experimental > +int > +acc100_configure(const char *dev_name, struct acc100_conf *conf); > + > =A0#ifdef __cplusplus > =A0} > =A0#endif > diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c > b/drivers/baseband/acc100/rte_acc100_pmd.c > index dc14079..43f664b 100644 > --- a/drivers/baseband/acc100/rte_acc100_pmd.c > +++ b/drivers/baseband/acc100/rte_acc100_pmd.c > @@ -85,6 +85,26 @@ >=20 > =A0enum {UL_4G =3D 0, UL_5G, DL_4G, DL_5G, NUM_ACC}; >=20 > +/* Return the accelerator enum for a Queue Group Index */ static inline > +int accFromQgid(int qg_idx, const struct acc100_conf *acc100_conf) { > +=A0=A0=A0=A0=A0=A0 int accQg[ACC100_NUM_QGRPS]; > +=A0=A0=A0=A0=A0=A0 int NumQGroupsPerFn[NUM_ACC]; > +=A0=A0=A0=A0=A0=A0 int acc, qgIdx, qgIndex =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qgIdx =3D 0; qgIdx < ACC100_NUM_QGRPS; qgIdx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 accQg[qgIdx] =3D 0; > +=A0=A0=A0=A0=A0=A0 NumQGroupsPerFn[UL_4G] =3D acc100_conf->q_ul_4g.num_q= groups; > +=A0=A0=A0=A0=A0=A0 NumQGroupsPerFn[UL_5G] =3D acc100_conf->q_ul_5g.num_q= groups; > +=A0=A0=A0=A0=A0=A0 NumQGroupsPerFn[DL_4G] =3D acc100_conf->q_dl_4g.num_q= groups; > +=A0=A0=A0=A0=A0=A0 NumQGroupsPerFn[DL_5G] =3D acc100_conf->q_dl_5g.num_q= groups; > +=A0=A0=A0=A0=A0=A0 for (acc =3D UL_4G;=A0 acc < NUM_ACC; acc++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (qgIdx =3D 0; qgIdx < Num= QGroupsPerFn[acc]; qgIdx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 accQg= [qgIndex++] =3D acc; > +=A0=A0=A0=A0=A0=A0 acc =3D accQg[qg_idx]; > +=A0=A0=A0=A0=A0=A0 return acc; > +} > + > =A0/* Return the queue topology for a Queue Group Index */ > =A0static inline void > =A0qtopFromAcc(struct rte_q_topology_t **qtop, int acc_enum, @@ -113,6 > +133,30 @@ > =A0=A0=A0=A0=A0=A0=A0=A0 *qtop =3D p_qtop; > =A0} >=20 > +/* Return the AQ depth for a Queue Group Index */ static inline int > +aqDepth(int qg_idx, struct acc100_conf *acc100_conf) { > +=A0=A0=A0=A0=A0=A0 struct rte_q_topology_t *q_top =3D NULL; > +=A0=A0=A0=A0=A0=A0 int acc_enum =3D accFromQgid(qg_idx, acc100_conf); > +=A0=A0=A0=A0=A0=A0 qtopFromAcc(&q_top, acc_enum, acc100_conf); > +=A0=A0=A0=A0=A0=A0 if (unlikely(q_top =3D=3D NULL)) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0; > +=A0=A0=A0=A0=A0=A0 return q_top->aq_depth_log2; > +} > + > +/* Return the AQ depth for a Queue Group Index */ static inline int > +aqNum(int qg_idx, struct acc100_conf *acc100_conf) { > +=A0=A0=A0=A0=A0=A0 struct rte_q_topology_t *q_top =3D NULL; > +=A0=A0=A0=A0=A0=A0 int acc_enum =3D accFromQgid(qg_idx, acc100_conf); > +=A0=A0=A0=A0=A0=A0 qtopFromAcc(&q_top, acc_enum, acc100_conf); > +=A0=A0=A0=A0=A0=A0 if (unlikely(q_top =3D=3D NULL)) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0; > +=A0=A0=A0=A0=A0=A0 return q_top->num_aqs_per_groups; } > + > =A0static void > =A0initQTop(struct acc100_conf *acc100_conf) > =A0{ > @@ -4177,3 +4221,464 @@ static int acc100_pci_remove(struct > rte_pci_device *pci_dev) > =A0RTE_PMD_REGISTER_PCI_TABLE(ACC100PF_DRIVER_NAME, > pci_id_acc100_pf_map); > =A0RTE_PMD_REGISTER_PCI(ACC100VF_DRIVER_NAME, acc100_pci_vf_driver); > =A0RTE_PMD_REGISTER_PCI_TABLE(ACC100VF_DRIVER_NAME, > pci_id_acc100_vf_map); > + > +/* > + * Implementation to fix the power on status of some 5GUL engines > + * This requires DMA permission if ported outside DPDK */ static void > +poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d, > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct acc100_conf *conf) { > +=A0=A0=A0=A0=A0=A0 int i, template_idx, qg_idx; > +=A0=A0=A0=A0=A0=A0 uint32_t address, status, payload; > +=A0=A0=A0=A0=A0=A0 printf("Need to clear power-on 5GUL status in interna= l > +memory\n"); > +=A0=A0=A0=A0=A0=A0 /* Reset LDPC Cores */ > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < ACC100_ENGINES_MAX; i++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfFecUl= 5gCntrlReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * i, > +ACC100_RESET_HI); > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < ACC100_ENGINES_MAX; i++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfFecUl= 5gCntrlReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * i, > +ACC100_RESET_LO); > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > +=A0=A0=A0=A0=A0=A0 /* Prepare dummy workload */ > +=A0=A0=A0=A0=A0=A0 alloc_2x64mb_sw_rings_mem(bbdev, d, 0); > +=A0=A0=A0=A0=A0=A0 /* Set base addresses */ > +=A0=A0=A0=A0=A0=A0 uint32_t phys_high =3D (uint32_t)(d->sw_rings_phys >>= 32); > +=A0=A0=A0=A0=A0=A0 uint32_t phys_low=A0 =3D (uint32_t)(d->sw_rings_phys = & > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ~(ACC= 100_SIZE_64MBYTE-1)); > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfDmaFec5GulDescBaseHiRegVf, ph= ys_high); > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfDmaFec5GulDescBaseLoRegVf, ph= ys_low); > + > +=A0=A0=A0=A0=A0=A0 /* Descriptor for a dummy 5GUL code block processing*= / > +=A0=A0=A0=A0=A0=A0 union acc100_dma_desc *desc =3D NULL; > +=A0=A0=A0=A0=A0=A0 desc =3D d->sw_rings; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].address =3D d->sw_rings_phys + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ACC10= 0_DESC_FCW_OFFSET; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].blen =3D ACC100_FCW_LD_BLEN; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].blkid =3D ACC100_DMA_BLKID_FCW= ; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].last =3D 0; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[0].dma_ext =3D 0; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[1].address =3D d->sw_rings_phys += 512; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[1].blkid =3D ACC100_DMA_BLKID_IN; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[1].last =3D 1; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[1].dma_ext =3D 0; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[1].blen =3D 44; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[2].address =3D d->sw_rings_phys += 1024; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[2].blkid =3D ACC100_DMA_BLKID_OUT= _ENC; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[2].last =3D 1; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[2].dma_ext =3D 0; > +=A0=A0=A0=A0=A0=A0 desc->req.data_ptrs[2].blen =3D 5; > +=A0=A0=A0=A0=A0=A0 /* Dummy FCW */ > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.FCWversion =3D ACC100_FCW_VER; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.qm =3D 1; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.nfiller =3D 30; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.BG =3D 2 - 1; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.Zc =3D 7; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.ncb =3D 350; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.rm_e =3D 4; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.itmax =3D 10; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.gain_i =3D 1; > +=A0=A0=A0=A0=A0=A0 desc->req.fcw_ld.gain_h =3D 1; > + > +=A0=A0=A0=A0=A0=A0 int engines_to_restart[SIG_UL_5G_LAST + 1] =3D {0}; > +=A0=A0=A0=A0=A0=A0 int num_failed_engine =3D 0; > +=A0=A0=A0=A0=A0=A0 /* Detect engines in undefined state */ > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_UL_5G; template_idx <=3D SI= G_UL_5G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Check engine power-on stat= us */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HwPfFecUl5gIbDebu= gReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 status =3D (acc100_reg_read(d= , address) >> 4) & 0xF; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (status =3D=3D 0) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 engin= es_to_restart[num_failed_engine] =3D > +template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 num_f= ailed_engine++; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 int numQqsAcc =3D conf->q_ul_5g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 int numQgs =3D conf->q_ul_5g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D numQqsAcc; qg_idx < (numQgs + numQqsA= cc); > +qg_idx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload |=3D (1 << qg_idx); > +=A0=A0=A0=A0=A0=A0 /* Force each engine which is in unspecified state */ > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < num_failed_engine; i++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int failed_engine =3D engines= _to_restart[i]; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 printf("Force engine %d\n", f= ailed_engine); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_UL_= 5G; template_idx <=3D > +SIG_UL_5G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 template_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 addre= ss =3D HWPfQmgrGrpTmplateReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (t= emplate_idx =3D=3D failed_engine) > +=A0=A0=A0=A0=A0=A0=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_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else > +=A0=A0=A0=A0=A0=A0=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_reg_write(d, address, 0); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Reset descriptor header */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.word0 =3D ACC100_DM= A_DESC_TYPE; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.word1 =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.word2 =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.word3 =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.numCBs =3D 1; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.m2dlen =3D 2; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 desc->req.d2mlen =3D 1; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Enqueue the code block for= processing */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 union acc100_enqueue_reg_fmt = enq_req; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_req.val =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_req.addr_offset =3D ACC10= 0_DESC_OFFSET; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_req.num_elem =3D 1; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 enq_req.req_elem_addr =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_wmb(); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfQmgrI= ngressAq + 0x100, > +enq_req.val); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT * 100); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (desc->req.word0 !=3D 2) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 print= f("DMA Response %#"PRIx32"\n", > +desc->req.word0); > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 /* Reset LDPC Cores */ > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < ACC100_ENGINES_MAX; i++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfFecUl= 5gCntrlReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * i, > +ACC100_RESET_HI); > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > +=A0=A0=A0=A0=A0=A0 for (i =3D 0; i < ACC100_ENGINES_MAX; i++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfFecUl= 5gCntrlReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * i, > +ACC100_RESET_LO); > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfHi5GHardResetReg, ACC100_RESE= T_HARD); > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > +=A0=A0=A0=A0=A0=A0 int numEngines =3D 0; > +=A0=A0=A0=A0=A0=A0 /* Check engine power-on status again */ > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_UL_5G; template_idx <=3D SI= G_UL_5G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HwPfFecUl5gIbDebu= gReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 status =3D (acc100_reg_read(d= , address) >> 4) & 0xF; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (status =3D=3D 1) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc10= 0_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 numEn= gines++; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc10= 0_reg_write(d, address, 0); > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 printf("Number of 5GUL engines %d\n", numEngines); > + > +=A0=A0=A0=A0=A0=A0 if (d->sw_rings_base !=3D NULL) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_free(d->sw_rings_base); > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > +} > + > +/* Initial configuration of a ACC100 device prior to running > +configure() */ int acc100_configure(const char *dev_name, struct > +acc100_conf *conf) { > +=A0=A0=A0=A0=A0=A0 rte_bbdev_log(INFO, "acc100_configure"); > +=A0=A0=A0=A0=A0=A0 uint32_t payload, address, status; > +=A0=A0=A0=A0=A0=A0 int qg_idx, template_idx, vf_idx, acc, i; > +=A0=A0=A0=A0=A0=A0 struct rte_bbdev *bbdev =3D rte_bbdev_get_named_dev(d= ev_name); > + > +=A0=A0=A0=A0=A0=A0 /* Compile time checks */ > +=A0=A0=A0=A0=A0=A0 RTE_BUILD_BUG_ON(sizeof(struct acc100_dma_req_desc) != =3D 256); > +=A0=A0=A0=A0=A0=A0 RTE_BUILD_BUG_ON(sizeof(union acc100_dma_desc) !=3D 2= 56); > +=A0=A0=A0=A0=A0=A0 RTE_BUILD_BUG_ON(sizeof(struct acc100_fcw_td) !=3D 24= ); > +=A0=A0=A0=A0=A0=A0 RTE_BUILD_BUG_ON(sizeof(struct acc100_fcw_te) !=3D 32= ); > + > +=A0=A0=A0=A0=A0=A0 if (bbdev =3D=3D NULL) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR, > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "Invalid dev_name (%s), or de= vice is not yet > +initialised", > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 dev_name); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -ENODEV; > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 struct acc100_device *d =3D bbdev->data->dev_private; > + > +=A0=A0=A0=A0=A0=A0 /* Store configuration */ > +=A0=A0=A0=A0=A0=A0 rte_memcpy(&d->acc100_conf, conf, sizeof(d->acc100_co= nf)); > + > +=A0=A0=A0=A0=A0=A0 /* PCIe Bridge configuration */ > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HwPfPcieGpexBridgeControl, > +ACC100_CFG_PCI_BRIDGE); > +=A0=A0=A0=A0=A0=A0 for (i =3D 1; i < 17; i++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, > + > +HwPfPcieGpexAxiAddrMappingWindowPexBaseHigh > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + i * 16, 0); > + > +=A0=A0=A0=A0=A0=A0 /* PCIe Link Trainiing and Status State Machine */ > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HwPfPcieGpexLtssmStateCntrl, 0xDF= C00000); > + > +=A0=A0=A0=A0=A0=A0 /* Prevent blocking AXI read on BRESP for AXI Write *= / > +=A0=A0=A0=A0=A0=A0 address =3D HwPfPcieGpexAxiPioControl; > +=A0=A0=A0=A0=A0=A0 payload =3D ACC100_CFG_PCI_AXI; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* 5GDL PLL phase shift */ > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, HWPfChaDl5gPllPhshft0, 0x1); > + > +=A0=A0=A0=A0=A0=A0 /* Explicitly releasing AXI as this may be stopped af= ter PF > +FLR/BME */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaAxiControl; > +=A0=A0=A0=A0=A0=A0 payload =3D 1; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* DDR Configuration */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDdrBcTim6; > +=A0=A0=A0=A0=A0=A0 payload =3D acc100_reg_read(d, address); > +=A0=A0=A0=A0=A0=A0 payload &=3D 0xFFFFFFFB; /* Bit 2 */ #ifdef ACC100_DD= R_ECC_ENABLE > +=A0=A0=A0=A0=A0=A0 payload |=3D 0x4; > +#endif > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDdrPhyDqsCountNum; #ifdef ACC100_DDR_= ECC_ENABLE > +=A0=A0=A0=A0=A0=A0 payload =3D 9; > +#else > +=A0=A0=A0=A0=A0=A0 payload =3D 8; > +#endif > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Set default descriptor signature */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaDescriptorSignatuture; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Enable the Error Detection in DMA */ > +=A0=A0=A0=A0=A0=A0 payload =3D ACC100_CFG_DMA_ERROR; > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaErrorDetectionEn; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* AXI Cache configuration */ > +=A0=A0=A0=A0=A0=A0 payload =3D ACC100_CFG_AXI_CACHE; > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaAxcacheReg; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Default DMA Configuration (Qmgr Enabled) */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaConfig0Reg; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaQmanen; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Default RLIM/ALEN configuration */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaConfig1Reg; > +=A0=A0=A0=A0=A0=A0 payload =3D (1 << 31) + (23 << 8) + (1 << 6) + 7; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Configure DMA Qmanager addresses */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaQmgrAddrReg; > +=A0=A0=A0=A0=A0=A0 payload =3D HWPfQmgrEgressQueuesTemplate; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* =3D=3D=3D=3D=3D Qmgr Configuration =3D=3D=3D=3D=3D= */ > +=A0=A0=A0=A0=A0=A0 /* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH= _LOG2 for > +UL */ > +=A0=A0=A0=A0=A0=A0 int totalQgs =3D conf->q_ul_4g.num_qgroups + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf-= >q_ul_5g.num_qgroups + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf-= >q_dl_4g.num_qgroups + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conf-= >q_dl_5g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D 0; qg_idx < totalQgs; qg_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrDepthLog2= Grp + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * qg_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D aqDepth(qg_idx, c= onf); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrTholdGrp = + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * qg_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D (1 << 16) + (1 <<= (aqDepth(qg_idx, conf) - > +1)); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 /* Template Priority in incremental order */ > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D 0; template_idx < ACC100_NUM_TM= PL; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg0Indx + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * (template_idx= % 8); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D TMPL_PRI_0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg1Indx + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * (template_idx= % 8); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D TMPL_PRI_1; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg2indx + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * (template_idx= % 8); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D TMPL_PRI_2; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg3Indx + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * (template_idx= % 8); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D TMPL_PRI_3; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpPriority; > +=A0=A0=A0=A0=A0=A0 payload =3D ACC100_CFG_QMGR_HI_P; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Template Configuration */ > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D 0; template_idx < ACC100_NUM_TM= PL; > +template_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 /* 4GUL */ > +=A0=A0=A0=A0=A0=A0 int numQgs =3D conf->q_ul_4g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 int numQqsAcc =3D 0; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D numQqsAcc; qg_idx < (numQgs + numQqsA= cc); > +qg_idx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload |=3D (1 << qg_idx); > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_UL_4G; template_idx <=3D SI= G_UL_4G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD*template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 /* 5GUL */ > +=A0=A0=A0=A0=A0=A0 numQqsAcc +=3D numQgs; > +=A0=A0=A0=A0=A0=A0 numQgs=A0 =3D conf->q_ul_5g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 int numEngines =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D numQqsAcc; qg_idx < (numQgs + numQqsA= cc); > +qg_idx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload |=3D (1 << qg_idx); > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_UL_5G; template_idx <=3D SI= G_UL_5G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Check engine power-on stat= us */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HwPfFecUl5gIbDebu= gReg + > +=A0=A0=A0=A0=A0=A0=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_ENGINE_OFFSET * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 status =3D (acc100_reg_read(d= , address) >> 4) & 0xF; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD * template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (status =3D=3D 1) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc10= 0_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 numEn= gines++; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } else > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc10= 0_reg_write(d, address, 0); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 #if RTE_ACC100_SINGLE_FEC =3D= =3D 1 > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 #endif > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 printf("Number of 5GUL engines %d\n", numEngines); > +=A0=A0=A0=A0=A0=A0 /* 4GDL */ > +=A0=A0=A0=A0=A0=A0 numQqsAcc +=3D numQgs; > +=A0=A0=A0=A0=A0=A0 numQgs=A0 =3D conf->q_dl_4g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D numQqsAcc; qg_idx < (numQgs + numQqsA= cc); > +qg_idx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload |=3D (1 << qg_idx); > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_DL_4G; template_idx <=3D SI= G_DL_4G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD*template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 #if RTE_ACC100_SINGLE_FEC =3D= =3D 1 > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 paylo= ad =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 #endif > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 /* 5GDL */ > +=A0=A0=A0=A0=A0=A0 numQqsAcc +=3D numQgs; > +=A0=A0=A0=A0=A0=A0 numQgs=A0 =3D conf->q_dl_5g.num_qgroups; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D numQqsAcc; qg_idx < (numQgs + numQqsA= cc); > +qg_idx++) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload |=3D (1 << qg_idx); > +=A0=A0=A0=A0=A0=A0 for (template_idx =3D SIG_DL_5G; template_idx <=3D SI= G_DL_5G_LAST; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 templ= ate_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpTmplat= eReg4Indx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 + BYTES_IN_WORD*template_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 #if RTE_ACC100_SINGLE_FEC =3D= =3D 1 > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 #endif > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 /* Queue Group Function mapping */ > +=A0=A0=A0=A0=A0=A0 int qman_func_id[5] =3D {0, 2, 1, 3, 4}; > +=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrGrpFunction0; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D 0; qg_idx < 8; qg_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc =3D accFromQgid(qg_idx, c= onf); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload |=3D qman_func_id[acc= ]<<(qg_idx * 4); > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* Configuration of the Arbitration QGroup depth to 1= */ > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D 0; qg_idx < totalQgs; qg_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfQmgrArbQDepth= Grp + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 BYTES_IN_WORD * qg_idx; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 /* Enabling AQueues through the Queue hierarchy*/ > +=A0=A0=A0=A0=A0=A0 for (vf_idx =3D 0; vf_idx < ACC100_NUM_VFS; vf_idx++)= { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (qg_idx =3D 0; qg_idx < A= CC100_NUM_QGRPS; qg_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 paylo= ad =3D 0; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (v= f_idx < conf->num_vf_bundles && > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 qg_idx < totalQgs) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 payload =3D (1 << aqNum(qg_idx, conf)) - > +1; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 addre= ss =3D HWPfQmgrAqEnableVf > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 + vf_idx * BYTES_IN_WORD; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 paylo= ad +=3D (qg_idx << 16); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc10= 0_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 /* This pointer to ARAM (256kB) is shifted by 2 (4B p= er > +register) */ > +=A0=A0=A0=A0=A0=A0 uint32_t aram_address =3D 0; > +=A0=A0=A0=A0=A0=A0 for (qg_idx =3D 0; qg_idx < totalQgs; qg_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (vf_idx =3D 0; vf_idx < c= onf->num_vf_bundles; > +vf_idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 addre= ss =3D HWPfQmgrVfBaseAddr + vf_idx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * BYTES_IN_WORD + qg_idx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * BYTES_IN_WORD * 64; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 paylo= ad =3D aram_address; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc10= 0_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Of= fset ARAM Address for next memory bank > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * = - increment of 4B > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 */ > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 aram_= address +=3D aqNum(qg_idx, conf) * > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=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 << aqDepth(qg_idx, conf)); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 if (aram_address > WORDS_IN_ARAM_SIZE) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rte_bbdev_log(ERR, "ARAM Conf= iguration not fitting %d > +%d\n", > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 aram_address, WORDS_IN_ARAM_SIZE); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -EINVAL; > +=A0=A0=A0=A0=A0=A0 } > + > +=A0=A0=A0=A0=A0=A0 /* =3D=3D=3D=3D HI Configuration =3D=3D=3D=3D */ > + > +=A0=A0=A0=A0=A0=A0 /* Prevent Block on Transmit Error */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfHiBlockTransmitOnErrorEn; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0 /* Prevents to drop MSI */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfHiMsiDropEnableReg; > +=A0=A0=A0=A0=A0=A0 payload =3D 0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0 /* Set the PF Mode register */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfHiPfMode; > +=A0=A0=A0=A0=A0=A0 payload =3D (conf->pf_mode_en) ? 2 : 0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0 /* Enable Error Detection in HW */ > +=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaErrorDetectionEn; > +=A0=A0=A0=A0=A0=A0 payload =3D 0x3D7; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* QoS overflow init */ > +=A0=A0=A0=A0=A0=A0 payload =3D 1; > +=A0=A0=A0=A0=A0=A0 address =3D HWPfQosmonAEvalOverflow0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > +=A0=A0=A0=A0=A0=A0 address =3D HWPfQosmonBEvalOverflow0; > +=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, payload); > + > +=A0=A0=A0=A0=A0=A0 /* HARQ DDR Configuration */ > +=A0=A0=A0=A0=A0=A0 unsigned int ddrSizeInMb =3D 512; /* Fixed to 512 MB = per VF for > +now */ > +=A0=A0=A0=A0=A0=A0 for (vf_idx =3D 0; vf_idx < conf->num_vf_bundles; vf_= idx++) { > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 address =3D HWPfDmaVfDdrBaseR= w + vf_idx > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 * 0x10; > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 payload =3D ((vf_idx * (ddrSi= zeInMb / 64)) << 16) + > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 (ddrSizeInMb - 1); > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acc100_reg_write(d, address, = payload); > +=A0=A0=A0=A0=A0=A0 } > +=A0=A0=A0=A0=A0=A0 usleep(LONG_WAIT); > + > +=A0=A0=A0=A0=A0=A0 if (numEngines < (SIG_UL_5G_LAST + 1)) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 poweron_cleanup(bbdev, d, con= f); > + > +=A0=A0=A0=A0=A0=A0 rte_bbdev_log_debug("PF Tip configuration complete fo= r %s", > +dev_name); > +=A0=A0=A0=A0=A0=A0 return 0; > +} > diff --git a/drivers/baseband/acc100/rte_pmd_bbdev_acc100_version.map > b/drivers/baseband/acc100/rte_pmd_bbdev_acc100_version.map > index 4a76d1d..91c234d 100644 > --- a/drivers/baseband/acc100/rte_pmd_bbdev_acc100_version.map > +++ b/drivers/baseband/acc100/rte_pmd_bbdev_acc100_version.map > @@ -1,3 +1,10 @@ > =A0DPDK_21 { > =A0=A0=A0=A0=A0=A0=A0=A0 local: *; > =A0}; > + > +EXPERIMENTAL { > +=A0=A0=A0=A0=A0=A0 global: > + > +=A0=A0=A0=A0=A0=A0 acc100_configure; > + > +}; > -- > 1.8.3.1