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 B45AFA0562; Wed, 14 Apr 2021 14:10:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94162161A0C; Wed, 14 Apr 2021 14:10:40 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) by mails.dpdk.org (Postfix) with ESMTP id 19EB7161A0A for ; Wed, 14 Apr 2021 14:10:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=daTYBlw1DSkI8xyX7Lk+ZBX2zILmuRRBlqBwFgHHphUS8LboX3leh+td+jcropdY+FHyHSkhBBnqMF+oU8qzEv77wPa5gZVqVuQseU/fdsP3SsjhhkHIQ68NXM2FPIdTxg+l7+jbcaBple9/QF3JDE4awFOHk4hrxd0l8TfeyUEFezcKF6SEgFHGqVt+vZagUV5BqPo0VeAgvbfigHiw7JOTzR7XyMU1/6EwmZzNhQ5/nV6XkubSenBBl1NE9Xe5vLGsaM8vXmH6CIB+qYBEX5gWmqWu/4FTOVEUoi5IUeUmxCSajzFU2CWujgySZzEazO2+OR4suSA6d43Az0+zQQ== 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=FyqOup+h7oT8/Jc7oNJTZSMjgm21ZDsBQaCWWbzDDgI=; b=iuVQuzAavcSPx8atMokfxlevaQXngP42TP+RU+GeaI44LyQM1HWN6V91iWAH/wg9YrdTGGbGpgVTy5s47amOnMYyRSv2OqQilXM6izaYWxDkMpXs3/k/xuGPtO25Sgdm3EMu7XHTYq8vVPixUtJ8U0YrQ31YFMbvkSgWwriv0x0N1FeKgjIA0XUmBWIfkit2XPOeYxLRGlYv7xY3wMBn+KXT6gOkB/mZwTthH2CmSYoeJOt2BRRSvk586WDDqkbW8QOwiX4H28YGfZm6pl8v7krBbU8WD9w+zkZbtJrgqckVZjvaU/+xmNWTbJ+aR0oos5AvfTagRwr5ebOMO3be0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FyqOup+h7oT8/Jc7oNJTZSMjgm21ZDsBQaCWWbzDDgI=; b=JeWx5nkxG/yDVVYx4QZu54B1L09sY8iK4Y9LcPry7q/v7akj2qsNDO4COvJNwIbzr4CUk2hOi7Ot7rNFK5SJ0cqTq/SffhUnNSwX7clvZ/1E06vvcvirFDX0q2WYkUYD6+YAfVuA07NudNL1IZRB4w+u+nhU/RbKco6Qa5ciVYc= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM5PR0401MB2451.eurprd04.prod.outlook.com (2603:10a6:203:36::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Wed, 14 Apr 2021 12:10:37 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%7]) with mapi id 15.20.4020.022; Wed, 14 Apr 2021 12:10:37 +0000 To: "Chautru, Nicolas" , Hemant Agrawal , "dev@dpdk.org" , "gakhil@marvell.com" Cc: "david.marchand@redhat.com" References: <20210410170252.4587-1-hemant.agrawal@nxp.com> <20210413051715.26430-1-hemant.agrawal@nxp.com> <20210413051715.26430-4-hemant.agrawal@nxp.com> From: Hemant Agrawal Message-ID: <569cef56-05ed-43e3-b15b-47cc7a7c2cec@oss.nxp.com> Date: Wed, 14 Apr 2021 17:40:25 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [223.178.219.73] X-ClientProxiedBy: HK2PR02CA0158.apcprd02.prod.outlook.com (2603:1096:201:1f::18) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.2] (223.178.219.73) by HK2PR02CA0158.apcprd02.prod.outlook.com (2603:1096:201:1f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Wed, 14 Apr 2021 12:10:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a512a159-1d33-41be-24be-08d8ff3e4ff2 X-MS-TrafficTypeDiagnostic: AM5PR0401MB2451: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mJvViJ5xa2/3KBp9J6CoPO4CsNQFIGbbth+JZm8NWYQe9SxckRkEEj1Yciizn4Z9kwdwM818iqTPIOiojsHBXM/urwSuzoHMC8+AVhwZx376o19gVPPWVMnKhR9/FLVQ/WSPHoaj/QMHajsbLjrxDgp17TrgORLALyVBx7xiavUIe+r1R1GSADm0HmdJM0NJSoiqa239Xw7ze82h3FuoSTOPWkIeSYr+ru5yCluPehdutDRCxsHxS9EXUCIzjvMpqIt2UWUAVw0EGvW7jG+O/9b0UJ6OuuNSOPz1sTl6Sph9LsBwsiYsCy1A0G/XbgODI977rkuzpmta8tt+x0SIHcAWupKDiUuluNPKl5LFFsNW+yYsIFSOYybGTcD1Jbxecji6zmYyyMxt5Cb1P3bA3ds5cmS5SZfEt1vnjImnJ58ycRO6tO9gpruRSKpRrfSM5h5o27XO4IzPxE7SeCgTnJsADk1ecxF6cRYTF1RweDzeZHwid+n5JSn8hsrxaYLIvGOGgeyCzlcINsRhEw2bC02K/WogDt+ktQ3JpV94asZd8SUvf4IPczxbKgfpd8F+I4hl2Zv2PCEx1S6/PpnsqeJuOlByhwM9Hm8ys5hyXYeTS7+GaNHFgxpPSkjygL21A7m0/OrGruPtD9CTfr23Qvd69bcmMPr6BQuT6Ygwzoe90+9XVIcJp8vcCpgj9LoCraybBaBq4qmK9BaiNvdiBB96sRg8SuZfne23VAUA+rc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39860400002)(366004)(396003)(136003)(376002)(38350700002)(38100700002)(478600001)(44832011)(86362001)(316002)(16576012)(2616005)(5660300002)(956004)(26005)(31696002)(16526019)(2906002)(66476007)(6486002)(6666004)(31686004)(186003)(83380400001)(8936002)(66946007)(52116002)(66556008)(4326008)(110136005)(8676002)(53546011)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?bllwR0wzQ3pxYVZqbVJuUTluUjErdU42M1hJRVBZeFBTcmppKzFrTXlrMWhP?= =?utf-8?B?YXdFMGFiQXp6REtyQTNpZCtQdW5sb2tZdU0ydjF1TFNSN1czM0pHZFhranVN?= =?utf-8?B?R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change-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2021 12:10:37.0967 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ra3B8IiQcKFOYckCkr2SV7cAgaxyJmDgnmjSCZ7NC2+zaPqxHjt6iZ133JvLY0rJqaSw18vk8B8LgQaplFc6HA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0401MB2451 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: , Reply-To: hemant.agrawal@nxp.com Errors-To: dev-bounces@dpdk.org Sender: "dev" On 4/14/2021 5:32 AM, Chautru, Nicolas wrote: >> -----Original Message----- >> From: Hemant Agrawal >> Sent: Monday, April 12, 2021 10:17 PM >> >> This patch add support for multiple modems by assigning a modem id as dev >> args in vdev creation. >> >> 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 >> >> 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 >> >> #include >> +#include >> +#include >> >> #define DRIVER_NAME baseband_la12xx >> >> @@ -22,18 +24,18 @@ RTE_LOG_REGISTER(bbdev_la12xx_logtype, >> pmd.bb.la12xx, NOTICE); >> /* Initialisation params structure that can be used by LA12xx BBDEV driver >> */ struct bbdev_la12xx_params { >> uint8_t queues_num; /*< LA12xx BBDEV queues number */ >> + int8_t modem_id; /*< LA12xx modem instance id */ >> }; >> >> #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. ok > >> static const char * const bbdev_la12xx_valid_params[] = { >> BBDEV_LA12XX_MAX_NB_QUEUES_ARG, >> + BBDEV_LA12XX_VDEV_MODEM_ID_ARG, >> }; >> >> -/* 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; >> } >> >> +/* 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 = 0; >> + >> + i = strtol(value, &end, 10); >> + if (*end != 0 || errno != 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) = 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; >> >> + ret = rte_kvargs_process(kvlist, >> + bbdev_la12xx_valid_params[1], >> + &parse_integer_arg, >> + ¶ms->modem_id); >> + >> + if (params->modem_id >= LA12XX_MAX_MODEM) { >> + BBDEV_LA12XX_PMD_ERR("Invalid modem id, must >> be < %u", >> + LA12XX_MAX_MODEM); >> + goto exit; >> + } >> } >> >> exit: >> @@ -88,6 +122,7 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev, { >> struct rte_bbdev *bbdev; >> const char *name = rte_vdev_device_name(vdev); >> + struct bbdev_la12xx_private *priv; >> >> PMD_INIT_FUNC_TRACE(); >> >> @@ -103,6 +138,20 @@ la12xx_bbdev_create(struct rte_vdev_device >> *vdev, >> return -ENOMEM; >> } >> >> + priv = bbdev->data->dev_private; >> + priv->modem_id = init_params->modem_id; >> + /* if modem id is not configured */ >> + if (priv->modem_id == -1) >> + priv->modem_id = bbdev->data->dev_id; >> + >> + /* Reset Global variables */ >> + priv->num_ldpc_enc_queues = 0; >> + priv->num_ldpc_dec_queues = 0; >> + priv->num_valid_queues = 0; >> + priv->max_nb_queues = init_params->queues_num; >> + >> + BBDEV_LA12XX_PMD_INFO("Setting Up %s: DevId=%d, >> ModemId=%d", >> + name, bbdev->data->dev_id, priv- >>> modem_id); >> bbdev->dev_ops = NULL; >> bbdev->device = &vdev->device; >> bbdev->data->socket_id = 0; >> @@ -174,4 +223,5 @@ static struct rte_vdev_driver bbdev_la12xx_pmd_drv >> = { >> >> RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv); >> RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME, >> - BBDEV_LA12XX_MAX_NB_QUEUES_ARG"="); >> + BBDEV_LA12XX_MAX_NB_QUEUES_ARG"=" >> + BBDEV_LA12XX_VDEV_MODEM_ID_ARG "= "); >> 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 distingish with 4G. > Same comment as above from prefix No, I disagree IPC has nothing to do with LDPC. It is abstract. It can be used of LDPC, Polar etc. We will add prefix as suggested. >> + >> +#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. Ya, we need to do some manual work w.r.t phy to virt conversions etc. So this is needed. > >> + >> +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