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 C112945843 for ; Fri, 23 Aug 2024 09:33:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBBC34300B; Fri, 23 Aug 2024 09:33:07 +0200 (CEST) Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011011.outbound.protection.outlook.com [52.101.70.11]) by mails.dpdk.org (Postfix) with ESMTP id B5EAA42FFD; Fri, 23 Aug 2024 09:33:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kQiPm7yaxyA3cUQyUYUch2LcrWFKC1KQ7TCucgz4GLWkHAFNl2WR5SYw+Cz8I6boAWZY0C3ZVbFMwjbsaoK08JfRub4A2ZBQ8Gice91qn1WB8xhif9bHC8b7fev5VDj64SZBlMmkHrMo2CcLWbDsnoqNCDQT6TDKtPs9GmDqnnsyUBjYI8hFOMvZIovqjlq3DDeurY0WU7B8UmJugDeMdgTXcu9tafaUejjWs6KxyK4WHvze1t57qY11I/KX1pOOxsKLxDKvXXSXbm8tGsjQj2MV2LvIuOo5z48gti1oGDCUcVydJ3E5qGA00iGMGbofmUIfBLC1k6JSsWbxJ2IjsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mHG/HdPGrGqhGeXVZaM45nATFaQaOD0h+yGd8ip7NTE=; b=j5J4dWOxb4SN/Ag2pg9m7pylBqiczfvA9fplXsCtSYxOGtvu3AkewC7cy6t+L0DQ2OJhh3+VI35yKBgexuZDgnlb1Nz0V5n6v0XBEFsD/ajIoGXtELHZmSmwBr49MFH4EoF3KU/Gum0H+ocQnU/NIppBMiPzEH35dipKBNmp0wXIz1O1KXa06107za3pT764htJjh2o42L0BgaZaJx1vSOZ3hYaAnAvp2wN+Cp6x/+2rgSOOJ8RSOVmNEqENiVkErJz88oig7c158BW26tDRLZC/97nZfeudCwKVVxjvtqiqkewjBHmPmV0TCsYE1iP27wyppK04UUhccTjMzJPkCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mHG/HdPGrGqhGeXVZaM45nATFaQaOD0h+yGd8ip7NTE=; b=S5H0vraoT4dCYwfOKmBA/9XDLOM0/9U784RB4yS2SlTyLLrNZ3+00Y3BzsVrTrSSb5J1MA+jNUbUxUG/qbsH3sl5txTy/qoRL8q18BHv1dIK2SsHUb3NpQ0YH0qaK/o9MqyeboGvO4XQk0yvuzzZMDm/X7PjswSr8YoFYRBfTyfF7lwmIzFqT6lAc9nkbXHosUr6PLYk4kFsCTsatHXoJUkW/gBrjPNYv8tkp7ZjOwM6gCKnkQ/tTZKLCum+DwyBRH89mzdnb8d3y2kQJBvhARJLHWxlHiudRRI/2I0gm7cmjFSA3gAIR070kkmoHWCLJCTuxGf/Ubw+YnXWNfbrcA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DBBPR04MB7547.eurprd04.prod.outlook.com (2603:10a6:10:208::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Fri, 23 Aug 2024 07:33:02 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7875.019; Fri, 23 Aug 2024 07:33:02 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Subject: [PATCH v2 03/18] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Date: Fri, 23 Aug 2024 13:02:25 +0530 Message-Id: <20240823073240.3708320-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240823073240.3708320-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240823073240.3708320-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DBBPR04MB7547:EE_ X-MS-Office365-Filtering-Correlation-Id: 60b9590d-5585-4480-75a4-08dcc345d1f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?THZfPBjEZa4lND1s7sD8XY2OjGoHGRbWmQkGmvgzr+SUHDvRyiSIWldQvY3M?= =?us-ascii?Q?kcJCWojnuTKEyORWVXDi8lN2Yo1QrJqnXz3DDWxDjGnvQiLSeRrW+CtvrlbB?= =?us-ascii?Q?vbYkPhJ/stHIaD3PYc/21Tqgor8Nk8BzD2WwIbyIhVuPo7R0B8UAhW/5h7Aw?= =?us-ascii?Q?UVdARl8pJKO4Q6TqhM4gNLXWdR4xT9NVpz0NYB67UIKqLNNgZJta6yDKPHQq?= =?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BL75rHhn6Tuw+6Wm?= =?us-ascii?Q?GWTJUOetqQcH0SSJumkIpRJyo9Gj+Yswtxv4bLVdZIWUTDOssUF0xvANIP7H?= =?us-ascii?Q?NxJ6LI/6OntU2T5dIJJT/n2phsxE+DSCTp830gezJwudbI/xKr3pUIuH69MI?= =?us-ascii?Q?qx/kXJPeZ6a++2CqgfL+75WGT8m6gj8TATSJnt4dBkQi+I0IHqCBsx87Kmtm?= =?us-ascii?Q?s13zDOJSPFyoPk+xpsJqzyM6U3tuZAPcBC9Za9RHyoURtKvAQJgX+eHdDitk?= =?us-ascii?Q?J4Onvmfi1mwB40LK9aJZNSmAuPFsRGjQabKhswD2PDVv+AfoTA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bjz1gr75xl77YuQjO1kTX2MjSKEq1FtBSCPAawQh9GiVLMzkTySUi5I4YZmF?= =?us-ascii?Q?28exXh8IgvF5N3JbWw2mTKpX9icp+ayGTiO3FucO0YUHVpMW8BFiXcNfY7sM?= =?us-ascii?Q?IlILyvaD3xi0wAivuB3vkFghp6owJehtjjP6baOuOjxOpGCexpB+yMzR+vf2?= =?us-ascii?Q?c83T8J8QUwFtzwI5iaiJinHascZaEakIDGsDu/sXsJ2jQntUBVCbiIjWBf+h?= =?us-ascii?Q?mw+Un1alaZ2PqlkQRvoeG2rAmm6H+/sqe07Yxhmll7egv3FnyIlG7/aQQWtm?= =?us-ascii?Q?H7RMp8wGn8x/3hPWUbrX9TU8HIYhBULUBt6Q7zqQjttZs88A/7DAq1jn/B9g?= =?us-ascii?Q?Vh3TVQJqGDvGanWB88q527e3fb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ii?Q?XNx4Qvui+KUDQ/cNAOgXZk05P9RriuELVAO0cIze6pPJTgED6zXAMNFto1Iz?= =?us-ascii?Q?yRveE0FGZiy0PAdaCawF3h1R06Wx6YkebMw0OgAzU30Bx/bCygVLAyBsZxt+?= =?us-ascii?Q?BVEJ66whWyve7Lx/b0gizbj+Ppp6Sfyj5DnzunvIHx8CDOvxNrc/fZ6QXW0x?= =?us-ascii?Q?j8AyUBUF8fPah74a0HdKdBpta9GU1udJ6elaBg7No8pqengQ4L2+KIDSBnhe?= =?us-ascii?Q?paC4b3CgoFlclxk5LBbnN1lb73pPwaG+fQXOLhuAwz3T3m58ezT4culHEPG7?= =?us-ascii?Q?deCjIknrKbIO5+pUhxBa1Aa1esTahR5Fppwzgf4VyaPdcLcSGI3EEd1elMDr?= =?us-ascii?Q?iA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60b9590d-5585-4480-75a4-08dcc345d1f0 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 07:33:02.3761 (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: CfGEiUEIOFl59LeA0fJE7VgDKKZBofVK3FeD69rtEsx0CT7amIcSp2sjn75LUijAYgS/h7Xb8mcjXQ9Vd/hJzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7547 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org No need to classify interface separately for 1G and 10G Note that VSP or Virtual storage profile are DPAA equivalent for SRIOV config to logically divide a physical ports in virtual ports. Fixes: e0718bb2ca95 ("bus/dpaa: add virtual storage profile port init") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index 41195eb0a7..beeb03dbf2 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -153,7 +153,7 @@ static void fman_if_vsp_init(struct __fman_if *__if) size_t lenp; const uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1}; - if (__if->__if.mac_type == fman_mac_1g) { + if (__if->__if.mac_idx <= 8) { for_each_compatible_node(dev, NULL, "fsl,fman-port-1g-rx-extended-args") { prop = of_get_property(dev, "cell-index", &lenp); @@ -176,7 +176,32 @@ static void fman_if_vsp_init(struct __fman_if *__if) } } } - } else if (__if->__if.mac_type == fman_mac_10g) { + + for_each_compatible_node(dev, NULL, + "fsl,fman-port-op-extended-args") { + prop = of_get_property(dev, "cell-index", &lenp); + + if (prop) { + cell_index = of_read_number(&prop[0], + lenp / sizeof(phandle)); + + if (cell_index == __if->__if.mac_idx) { + prop = of_get_property(dev, + "vsp-window", + &lenp); + + if (prop) { + __if->__if.num_profiles = + of_read_number(&prop[0], + 1); + __if->__if.base_profile_id = + of_read_number(&prop[1], + 1); + } + } + } + } + } else { for_each_compatible_node(dev, NULL, "fsl,fman-port-10g-rx-extended-args") { prop = of_get_property(dev, "cell-index", &lenp); -- 2.25.1