From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22C4EA0524; Wed, 14 Apr 2021 02:02:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F4721613FD; Wed, 14 Apr 2021 02:02:22 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 8E7AB1613FC for ; Wed, 14 Apr 2021 02:02:21 +0200 (CEST) IronPort-SDR: StjhYnz4lWzd/vAyIdzn2Rzt+aV0rORv6qtXGUXXAINHBQRKqDID808qB0TJsGoZunIols5GfH qD3zQT5JF+EQ== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="279838256" X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="279838256" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 17:02:20 -0700 IronPort-SDR: kepnFGaRuRFEL4ErBJpeTw8JwxHif2rii9Lh6JhrNqh/sug7DzI/dwoBCVOsO/tO3WkIF5+dsq 1Aw6SVs+85vA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="389205897" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga007.fm.intel.com with ESMTP; 13 Apr 2021 17:02:20 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 13 Apr 2021 17:02:19 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 13 Apr 2021 17:02:19 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.59) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 13 Apr 2021 17:02:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hh5ILxDMh0i+9QVKtaS8vXcP953tbAJ7mFeL/SJJ3SbTlOqnRZCjDxzZAyABsP/3NF8fSRXwdsDf+y5BfUDALGVVDwqaoENuzWWkAbJiumFIwi953YhvmeXP5PprPvcdbEL4JZhhvOpiJ8DcZBrEVXsHstkrcGNVZwRidKvWFOCDLNKYlTAVX1UWo8TdGEmDFjTipcE3UICK0jKWeRvaHUqaV7W/1Gsafe4M4fMNp1diZ7P70TBcxXvWoDCbNTL1/9Qz6jFcGXgmXGK7/p+YtKaLNtricZGuZCPDYkwbdnIhV/yXzy45mUg6HYgCFMGaRfJiTO3LDXg7sj8Xfl9OjA== 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=AL0exrA6Y/N169uzvfGR7GTuN1fgMEkHZ3Ohs+G9lM8=; b=H406zr7BEBpReb+1tCsixKfyghIhbYjGPs93hvGSWqYEOrAISftOZkWfzMnOOim7elznb0b3Z+Y41HRnAIi1ANRlR+Q4kNxSlFQLsf4RBH1Y8rmQbL9zgNe13P7zCSQXuz8KTWhPKs9eHoqYCtEr9FOKMUDnCLu7ggLomMm88a9reTgzT4NjKBi1wiH5pGxgWDGMd20SM4MY2vNzzBKrazv3Rn+ELcQGlcZ2F0IYVUmkHBsQAl/ul3RZB4Mqhva/EIbX2KWd+GTJ/YZVCf/SBmzBZ0yvxSfY+fgoDJjJ83Y8XUxxz8PL+VvTOgp2JPm8xvmAhOdx6z87xAyXcX0ngA== 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=AL0exrA6Y/N169uzvfGR7GTuN1fgMEkHZ3Ohs+G9lM8=; b=D3WO1bqg3nEcebHtXC3xDoVGQgC+mup9rAsvrBNOwrJOcqTMk2ae6kZxZAUCz1WqAZeNCFiymrXmnFKznsFVZQ2Y0PacKj7PGdmfASgqrrS+v/qSqXm6tN6pxJmtYB5muFNB+TIGJejxx4My1ALP75tHVjkN1jZm26vdsrQFolo= Received: from BY5PR11MB4451.namprd11.prod.outlook.com (2603:10b6:a03:1cb::30) by BYAPR11MB3701.namprd11.prod.outlook.com (2603:10b6:a03:fc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21; Wed, 14 Apr 2021 00:02:18 +0000 Received: from BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::756a:2aef:40b1:11c8]) by BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::756a:2aef:40b1:11c8%5]) with mapi id 15.20.4020.022; Wed, 14 Apr 2021 00:02:18 +0000 From: "Chautru, Nicolas" To: Hemant Agrawal , "dev@dpdk.org" , "gakhil@marvell.com" CC: "david.marchand@redhat.com" Thread-Topic: [PATCH v3 3/8] baseband/la12xx: add support for multiple modems Thread-Index: AQHXMCSBzbcxYwBjGUKKO87l9OtsGaqzInQw Date: Wed, 14 Apr 2021 00:02:18 +0000 Message-ID: References: <20210410170252.4587-1-hemant.agrawal@nxp.com> <20210413051715.26430-1-hemant.agrawal@nxp.com> <20210413051715.26430-4-hemant.agrawal@nxp.com> In-Reply-To: <20210413051715.26430-4-hemant.agrawal@nxp.com> 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: nxp.com; dkim=none (message not signed) header.d=none;nxp.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: def1b91d-d4ee-43a3-6b65-08d8fed891b5 x-ms-traffictypediagnostic: BYAPR11MB3701: 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: gx2Xw9HayJd+qe7p2/swGfvJHc9DJlyfkAxovAVSlZBHIAvG8XA7aK3hQfgQwCV7oHyMTsfjzq4vsHTi7b8tp6SSOegNn1ag8KFgM7Vjy5+sj5fBAlAHN/LC4OJTwmPkDUi732cSkQTh1HVe9WNxiWyXRYqKago8646d5CXjc6RuMS22OhjlciYs0/Y/AP49fvSuG/PSNfA7jrDOfjyPT2m7HgqMWS1Ty2BnGYIcezCgSzwrxi+Nhc4ogk/36Uczwv6+ysCU/GDAKFFhQBnqfQTonBiFGS5pT3KVT/uvvTm92MbepUH5SCLNRvc5RxWO37XZPTpzqO6ClZR1Fh8Rj0LhZt9d5y07Am6S/jLnW0WoyykH3AS8pKUPd0i2JIc4vjjm3oWBbEWgg28Q74K4W6Sgyx189KFLrLi8agI01ZpT1J5tsF3NvZtjPgGta6krt5qw4JUh9dYgtV1yUF6rebl1TRhZBdyBT4XZV27SdbJzJBCiFQi7Q/LZ9SH6cqbmb/X3vWtr5veaDmx7l1uIAy6HpOnHmolRwp1y9Hg27AaXpKiMKwz3JOYxXifL95HO+94nxEhN4fDmDP/TceWHTpcPDA5tSS8zXlHhMyZYpdk= 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:(346002)(366004)(396003)(39860400002)(136003)(376002)(8676002)(71200400001)(8936002)(9686003)(5660300002)(2906002)(66446008)(66946007)(66556008)(76116006)(478600001)(64756008)(7696005)(52536014)(83380400001)(66476007)(186003)(38100700002)(86362001)(4326008)(55016002)(6506007)(26005)(110136005)(33656002)(316002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Y9/F6Ba8z9+VhEcsXopx7rjRR4Otqdv0BW/k+UlMWBXbGVwaQnIM9M96z0ps?= =?us-ascii?Q?B3Ban7RG1cw1xxDLoPoVJ8CJB9VQPmPuAx4CJv1l6P+ukPDjGPNjOi1RsAf+?= =?us-ascii?Q?mli7hlyeqjlyvduXxzQN6twxtwlSQv8HesJA/yUpxQxL96KSZjE0al2V3DRJ?= =?us-ascii?Q?iDJnl023eDWAxwKTs2SoDxzgW+Dos9IQOrz49qJzJSuUchv85tQxa0Jf/Q6g?= =?us-ascii?Q?tYQdPbA52Eu2OjK2E29uldnJa69ngECR86lq26Fy5BZD3YM/ZIFqcHpzL1xN?= =?us-ascii?Q?x8Jiw5Qu7MjMirF2vMUQdnX1tjWECKwl61mCf+iW9n9q3mgV0OjqP478mYaX?= =?us-ascii?Q?U1h/TahGJZBLqVKSECxXVPIhVR/LCNxBz/31u1m48+uiXGnfMWtfaUN8+h9V?= =?us-ascii?Q?lFbBZwAwXHtWB6fua0hGBYqkEsKXdFmZ3RmOIP2yXSSe4A4JfCraU3yXTBOi?= =?us-ascii?Q?N5W7vwxXFZT6j7Ct/n0a42dV1YURyc1+Y0g+q27Yyv2je7Km0++klmvq3zEq?= =?us-ascii?Q?EPfquo+0/E1wiTWlXUkvw1GpYeUR7tfP7miTOwdulYuLzQVoKQfKXj3woDJL?= =?us-ascii?Q?OZPscJJ/EuMl+1bOnjhuXRYb1n60V3+r0pz0ERrK8Zg/gzhxLYsBMIVA03fx?= =?us-ascii?Q?HmoCOdTfJ9pGO5+Opq/C0X+YT9Ql6/4KaiEmDY2pEI62Uv6cBLt1HFey8Jm9?= =?us-ascii?Q?snrhkmQQYk1syNDofo4OcHQXTItGGK3bBcSpbO2L6CQUfSdM1tmCcOnY5oix?= =?us-ascii?Q?JGh/Ku8S1Pbkef4Mr4X0XijfB/myb7VN2PL36dbsbwI5NOKyUG5tF/jQRwMB?= =?us-ascii?Q?sA4omP4Rt0JFL9RdEel672W476/NqrF/BixbSN0+gumQZFmKQoq9JIikHJ86?= =?us-ascii?Q?t+NMEVsR0qJlJrc8qiUE4q26DXE/wMobHxSP1xRp3AjxCVnf+dAU2oLK9Z3F?= =?us-ascii?Q?kIEcZxrKltx2gka7VSOX8jis4b8m/8wV5H8b5pFbykkf+lOPoGX6V8xpsoQB?= =?us-ascii?Q?Hrxljy++7Q/1MfrcqwfoCg3PJkSrSp372PetI37FlYBImPRA+6TUjWJnXvfm?= =?us-ascii?Q?ajZzG9eMmNFJKP6uBqyHs5m3aTF6XvKyQLa1QH8E1uHX2nU1i3YcgfXLm9+s?= =?us-ascii?Q?6ZDB8JdtljR1CZsj8fZwBpxa2MYufDm1/L5kgi7wF1qGf6Qfdg5h0XvIzYOy?= =?us-ascii?Q?fkYHluEtx+vDr1dj+3qnsFmGdUQuMkIb6Wn3XxRF+VICUkk3FXV3TMJTBhtO?= =?us-ascii?Q?uDkIHgb3VBeoLXlVL3mz7e1gnvN/94IxJV9F6Ydtf3hb81EVeZJtNyRT++eE?= =?us-ascii?Q?Gk/DBIZSq/p8Pb/4aoeReS6j?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4451.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: def1b91d-d4ee-43a3-6b65-08d8fed891b5 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 00:02:18.2342 (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: DwLvpPF537/nk7lzmRHdf5SPZDP39tVHLa6SeT7l5ppO0IKS+QUOvktOotd9hgLHoGSJgABhQQztrpv9m5rxLRrmKSQ7NvF9BFK4LsU2UYc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3701 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/8] baseband/la12xx: add support for multiple modems X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: Hemant Agrawal > Sent: Monday, April 12, 2021 10:17 PM >=20 > This patch add support for multiple modems by assigning a modem id as dev > args in vdev creation. >=20 > Signed-off-by: Hemant Agrawal > --- > drivers/baseband/la12xx/bbdev_la12xx.c | 60 ++++++++++++++++++++-- > drivers/baseband/la12xx/bbdev_la12xx.h | 56 ++++++++++++++++++++ > drivers/baseband/la12xx/bbdev_la12xx_ipc.h | 20 ++++++++ > 3 files changed, 131 insertions(+), 5 deletions(-) create mode 100644 > drivers/baseband/la12xx/bbdev_la12xx.h > create mode 100644 drivers/baseband/la12xx/bbdev_la12xx_ipc.h >=20 > diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c > b/drivers/baseband/la12xx/bbdev_la12xx.c > index 8d3041ce28..7e9be74bb4 100644 > --- a/drivers/baseband/la12xx/bbdev_la12xx.c > +++ b/drivers/baseband/la12xx/bbdev_la12xx.c > @@ -14,6 +14,8 @@ > #include >=20 > #include > +#include > +#include >=20 > #define DRIVER_NAME baseband_la12xx >=20 > @@ -22,18 +24,18 @@ RTE_LOG_REGISTER(bbdev_la12xx_logtype, > pmd.bb.la12xx, NOTICE); > /* Initialisation params structure that can be used by LA12xx BBDEV dri= ver > */ struct bbdev_la12xx_params { > uint8_t queues_num; /*< LA12xx BBDEV queues number */ > + int8_t modem_id; /*< LA12xx modem instance id */ > }; >=20 > #define BBDEV_LA12XX_MAX_NB_QUEUES_ARG "max_nb_queues" > +#define BBDEV_LA12XX_VDEV_MODEM_ID_ARG "modem" > +#define LA12XX_MAX_MODEM 4 Minor : best to be consistent with prefix used throught the PMD. A bit of a= mix and match. >=20 > static const char * const bbdev_la12xx_valid_params[] =3D { > BBDEV_LA12XX_MAX_NB_QUEUES_ARG, > + BBDEV_LA12XX_VDEV_MODEM_ID_ARG, > }; >=20 > -/* private data structure */ > -struct bbdev_la12xx_private { > - unsigned int max_nb_queues; /**< Max number of queues */ > -}; > static inline int > parse_u16_arg(const char *key, const char *value, void *extra_args) { @= @ - > 52,6 +54,28 @@ parse_u16_arg(const char *key, const char *value, void > *extra_args) > return 0; > } >=20 > +/* Parse integer from integer argument */ static int > +parse_integer_arg(const char *key __rte_unused, > + const char *value, void *extra_args) > +{ > + int i; > + char *end; > + > + errno =3D 0; > + > + i =3D strtol(value, &end, 10); > + if (*end !=3D 0 || errno !=3D 0 || i < 0 || i > LA12XX_MAX_MODEM) { > + BBDEV_LA12XX_PMD_ERR("Supported Port IDS are 0 to %d", > + LA12XX_MAX_MODEM - 1); > + return -EINVAL; > + } > + > + *((uint32_t *)extra_args) =3D i; > + > + return 0; > +} > + > /* Parse parameters used to create device */ static int > parse_bbdev_la12xx_params(struct bbdev_la12xx_params *params, @@ - > 73,6 +97,16 @@ parse_bbdev_la12xx_params(struct bbdev_la12xx_params > *params, > if (ret < 0) > goto exit; >=20 > + ret =3D rte_kvargs_process(kvlist, > + bbdev_la12xx_valid_params[1], > + &parse_integer_arg, > + ¶ms->modem_id); > + > + if (params->modem_id >=3D LA12XX_MAX_MODEM) { > + BBDEV_LA12XX_PMD_ERR("Invalid modem id, must > be < %u", > + LA12XX_MAX_MODEM); > + goto exit; > + } > } >=20 > exit: > @@ -88,6 +122,7 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev, { > struct rte_bbdev *bbdev; > const char *name =3D rte_vdev_device_name(vdev); > + struct bbdev_la12xx_private *priv; >=20 > PMD_INIT_FUNC_TRACE(); >=20 > @@ -103,6 +138,20 @@ la12xx_bbdev_create(struct rte_vdev_device > *vdev, > return -ENOMEM; > } >=20 > + priv =3D bbdev->data->dev_private; > + priv->modem_id =3D init_params->modem_id; > + /* if modem id is not configured */ > + if (priv->modem_id =3D=3D -1) > + priv->modem_id =3D bbdev->data->dev_id; > + > + /* Reset Global variables */ > + priv->num_ldpc_enc_queues =3D 0; > + priv->num_ldpc_dec_queues =3D 0; > + priv->num_valid_queues =3D 0; > + priv->max_nb_queues =3D init_params->queues_num; > + > + BBDEV_LA12XX_PMD_INFO("Setting Up %s: DevId=3D%d, > ModemId=3D%d", > + name, bbdev->data->dev_id, priv- > >modem_id); > bbdev->dev_ops =3D NULL; > bbdev->device =3D &vdev->device; > bbdev->data->socket_id =3D 0; > @@ -174,4 +223,5 @@ static struct rte_vdev_driver bbdev_la12xx_pmd_drv > =3D { >=20 > RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv); > RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME, > - BBDEV_LA12XX_MAX_NB_QUEUES_ARG"=3D"); > + BBDEV_LA12XX_MAX_NB_QUEUES_ARG"=3D" > + BBDEV_LA12XX_VDEV_MODEM_ID_ARG "=3D "); > diff --git a/drivers/baseband/la12xx/bbdev_la12xx.h > b/drivers/baseband/la12xx/bbdev_la12xx.h > new file mode 100644 > index 0000000000..5228502331 > --- /dev/null > +++ b/drivers/baseband/la12xx/bbdev_la12xx.h > @@ -0,0 +1,56 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright 2020-2021 NXP > + */ > + > +#ifndef __BBDEV_LA12XX_H__ > +#define __BBDEV_LA12XX_H__ > + > +#define BBDEV_IPC_ENC_OP_TYPE 1 > +#define BBDEV_IPC_DEC_OP_TYPE 2 > + > +#define MAX_LDPC_ENC_FECA_QUEUES 4 > +#define MAX_LDPC_DEC_FECA_QUEUES 4 Minor: What does FECA refers to through the serie? FEC accerator? For consistency I would rename _ENC_OP_TYPE to _LDPC_ENC_OP_TYPE to disting= ish with 4G. Same comment as above from prefix > + > +#define MAX_CHANNEL_DEPTH 16 > +/* private data structure */ > +struct bbdev_la12xx_private { > + void *ipc_priv; > + uint8_t num_valid_queues; > + uint8_t max_nb_queues; > + uint8_t num_ldpc_enc_queues; > + uint8_t num_ldpc_dec_queues; > + int8_t modem_id; > + struct bbdev_la12xx_q_priv *queues_priv[32]; }; > + > +struct hugepage_info { > + void *vaddr; > + phys_addr_t paddr; > + size_t len; > +}; This should be in the next commit I believe. Notably as this hugepage_info usage is a bit odd. > + > +struct bbdev_la12xx_q_priv { > + struct bbdev_la12xx_private *bbdev_priv; > + uint32_t q_id; /**< Channel ID */ > + uint32_t feca_blk_id; /** FECA block ID for processing */ > + uint32_t feca_blk_id_be32; /**< FECA Block ID for this queue */ > + uint8_t en_napi; /* 0: napi disabled, 1: napi enabled */ > + uint16_t queue_size; /**< Queue depth */ > + int32_t eventfd; /**< Event FD value */ > + enum rte_bbdev_op_type op_type; /**< Operation type */ > + uint32_t la12xx_core_id; > + /* LA12xx core ID on which this will be scheduled */ > + struct rte_mempool *mp; /**< Pool from where buffers would be > cut */ > + void *bbdev_op[MAX_CHANNEL_DEPTH]; > + /**< Stores bbdev op for each index */ > + void *msg_ch_vaddr[MAX_CHANNEL_DEPTH]; > + /**< Stores msg channel addr for modem->host */ > + uint32_t host_pi; /**< Producer_Index for HOST->MODEM */ > + uint32_t host_ci; /**< Consumer Index for MODEM->HOST */ > + host_ipc_params_t *host_params; /**< Host parameters */ }; > + > +#define lower_32_bits(x) ((uint32_t)((uint64_t)x)) #define > +upper_32_bits(x) ((uint32_t)(((uint64_t)(x) >> 16) >> 16)) > + > +#endif > diff --git a/drivers/baseband/la12xx/bbdev_la12xx_ipc.h > b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h > new file mode 100644 > index 0000000000..9aa5562981 > --- /dev/null > +++ b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h > @@ -0,0 +1,20 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright 2020-2021 NXP > + */ > +#ifndef __BBDEV_LA12XX_IPC_H__ > +#define __BBDEV_LA12XX_IPC_H__ > + > +/** No. of max channel per instance */ > +#define IPC_MAX_DEPTH (16) > + > +/* This shared memory would be on the host side which have copy of some > + * of the parameters which are also part of Shared BD ring. Read access > + * of these parameters from the host side would not be over PCI. > + */ > +typedef struct host_ipc_params { > + volatile uint32_t pi; > + volatile uint32_t ci; > + volatile uint32_t modem_ptr[IPC_MAX_DEPTH]; } __rte_packed > +host_ipc_params_t; > + > +#endif > -- > 2.17.1