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 0558743A35; Thu, 1 Feb 2024 11:02:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C403042D97; Thu, 1 Feb 2024 11:02:28 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 595DA40275 for ; Thu, 1 Feb 2024 11:02:27 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4117L9uT026965 for ; Thu, 1 Feb 2024 02:02:26 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=pfpt0220; bh=JTXqj6pCMWMHf32yKkGWg ulVu78r2GdpDDsuPXdXzNk=; b=lQcnfbKsaKCGshW1S3mNZKa7wX+d/El18pNO+ FDsyknkw6J/wF1UO0FNYWECKCiiocrKLF/6/4l4SprRjUo16zba4yYWY6mbXTO/y Y+OaPHUH7QPZ9c8hoOYyxSAqiP5m9dpRU/ikTaU8Im7J70R9JqsdWTdbglCFN/iY tmydFrW3Es18r6IaBbWK4Hx3M2xIan8MuMgjP0CldS/YLM6C3Eu0tQQPtblrTE5G hR/qSotwuPn9PNGHoh7vMszqZRnW20U9n5gjoxbHa7NuBgc2arLHEw5MU/I5LX/f 3vaRgGZOWDcDg95+YBa1yBDB2evNmGT8FC8ulLdSF2ORSGH7Q== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3w06u8gf0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 01 Feb 2024 02:02:26 -0800 (PST) Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 1 Feb 2024 02:02:24 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 1 Feb 2024 02:02:24 -0800 Received: from localhost.localdomain (unknown [10.29.52.211]) by maili.marvell.com (Postfix) with ESMTP id 942003F7044; Thu, 1 Feb 2024 02:02:23 -0800 (PST) From: Harman Kalra To: CC: , Harman Kalra Subject: [PATCH v5 0/2] multiple representors in one device Date: Thu, 1 Feb 2024 15:32:17 +0530 Message-ID: <20240201100219.26677-1-hkalra@marvell.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240111064432.193119-1-hkalra@marvell.com> References: <20240111064432.193119-1-hkalra@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: 6BXgTYLhKozh1sUnJ5ONB8G5loHtoDcb X-Proofpoint-ORIG-GUID: 6BXgTYLhKozh1sUnJ5ONB8G5loHtoDcb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-31_10,2024-01-31_01,2023-05-22_02 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 Following series adds support to enable creation of multiple representors under one base device. There may be scenarios where port representors for multiple PFs or VFs under PF are required and all these representor ports created under a single pci device. Marvell CNXK port representor solution is designed around this scenario where all representors are backed by a single switch device. Earlier this change was implemented as part of the Marvell CNXK port representor series but after suggestions from Thomas we would like to propose these changes in common code. https://patches.dpdk.org/project/dpdk/patch/20231219174003.72901-25-hkalra@marvell.com/#166785 V5: - Added test cases to demonstrate valid and invalid cases - changed the tokenizing logic to address all valid cases V4: - Used MT safe strtok_r in place of strtok - Reworded some comments V3: - Fix duplicate representor devarg key handling logic V2: - Updated the multiple representor devarg pattern to list i.e. representor=[pf[0-1],pf2vf[1,2-3],[4-5]] - Introduced size of array as third argument to rte_eth_devargs_parse() to avoid array corruption - Squashed separate document patch Harman Kalra (2): ethdev: parsing multiple representor devargs string test/devargs: add eth devargs parse cases app/test/test_devargs.c | 107 +++++++++++ doc/guides/prog_guide/poll_mode_drv.rst | 4 +- .../prog_guide/switch_representation.rst | 1 + drivers/net/bnxt/bnxt_ethdev.c | 4 +- drivers/net/enic/enic_ethdev.c | 4 +- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/ice/ice_dcf_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/mlx5/linux/mlx5_os.c | 8 +- .../net/nfp/flower/nfp_flower_representor.c | 4 +- drivers/net/sfc/sfc_ethdev.c | 4 +- lib/ethdev/ethdev_driver.c | 175 ++++++++++++++++-- lib/ethdev/ethdev_driver.h | 9 +- 13 files changed, 296 insertions(+), 36 deletions(-) -- 2.18.0