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 3759645A68; Mon, 30 Sep 2024 14:16:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5562F40611; Mon, 30 Sep 2024 14:16:14 +0200 (CEST) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2080.outbound.protection.outlook.com [40.107.241.80]) by mails.dpdk.org (Postfix) with ESMTP id B400D402EF; Mon, 30 Sep 2024 14:16:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HppnjDVeRqXI7xZt6l2rmORJNOnMCIUsTgW/OFYjd7dXlm0eH00xOp4rRvbMkBrc0V0N88SpLs7x6P7LfiyPS0KT7pD+F8VKQH+46F9eGnkANTxzHksG4S0ncm983MvC7hZXuRsF8fk5UaTS+/61yHDF481RqE5w1VyO1s5RDARX7fApQhfuioQZbj5LTg20SQq8hSrTQf3Eh7HsdOoIHwvjCslw5S2FcERe0sO1IV8MuRD9OQFhuoEOoXYvUKrt7EtU5ROatjcgMWiPyyZ2GYG9pH1B+x7ZWg9hymtZfraNr6lmvRuznsqSjZEZs5SpoHgHSpNvROLlntKew+pcUw== 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=t5vqZTh449WFtWnHAdD0qUunXYEo2KAtnLyRsd2VvjSN8QBbVHc1mR8xrxaJya0rr2NmIKXnyrsgFc1GlmbJPt0yKKIoqZ9iU15UFOd8pnPMkSLrpdychp2efGAgdxPaiORZ7AR6MJwykO3ipGA+kOMMwFzsiFSSDQYnfiE1K3I3lbr9Hydrait+B59BkrzbbZRxfN1rfHPsA9WOvEu4DvSlav22Yfi4gkbeT/cPbNLEfVOWLAUdcecjBX8G5Zrrm7cudtASVXl9Hd2m1GEkVe9jOIKvyjFuElF0FPSbCIffvWO9m9mmzEWKowpL/NL2Xt9FKWLM1Am6L7uXckGLhw== 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=OLQYyw0O3l7fzHoqgLv3pGAfPhyvf7M8admI20JBC/8vYv8K4hYHl2vkJ5HItRaHmH10kPFy1WvkSpjiiR6ToIlIV7JhywE/N0XPZU0iVpeWl28z8WIYrN3OExJnJeT4XGTeESse5Oand52Sd5R711SsLQzvlnSyWpMgZq4VQfibYV4k8c3saBk8BnRfs2AoLo9DqKXYL9OzNKeZiw73fOLwUON4MDmgAMT+7H8cjXWvl102wecKQHWYC0YeqGoD/ZtQqb0Krk0EV2uJizCKR3KzzXoD80sUGhTRJ5Hy4fhMj3qfaW1jlcYLB6FIANww8oAJ7qtCklTtllUi6aJCJQ== 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 PAXPR04MB8334.eurprd04.prod.outlook.com (2603:10a6:102:1cc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 12:16:10 +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.8005.026; Mon, 30 Sep 2024 12:16:10 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, stable@dpdk.org Subject: [PATCH v4 03/18] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Date: Mon, 30 Sep 2024 17:45:10 +0530 Message-Id: <20240930121525.3452847-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240930121525.3452847-1-hemant.agrawal@nxp.com> References: <20240823073240.3708320-1-hemant.agrawal@nxp.com> <20240930121525.3452847-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0124.apcprd01.prod.exchangelabs.com (2603:1096:4:40::28) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|PAXPR04MB8334:EE_ X-MS-Office365-Filtering-Correlation-Id: 5607ab1d-f7c8-49e8-b166-08dce149ab66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?4U384q1IvyqLpU/LBhwnl05S73C0ios/s1KOSj3mlJgC4af/ee1LCDvkq/hg?= =?us-ascii?Q?PzU50g+emOY2WBHb9nZGHm2KuZDXwRjbQMM2EQ7C2votBU770BPhuZYUZ/Hr?= =?us-ascii?Q?UQeQzaJdSCSqgSzFZX+JB9kF93l+o5xtHmyI3GMV073MTLeZsx7PMpwx5yMR?= =?us-ascii?Q?jCfpaCySgDkbbKavrMz0ZRHhep9tB6W1tHjQszwV8yYMQPJeWTL3zMJGCGtV?= =?us-ascii?Q?NGlz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1/NlDwWSmfgzhbgLA5qj?= =?us-ascii?Q?BIBN79tcVYXAjLZS/UPu0+mt+doLegRWFp8Nsm+YZ++yvaCbGrrAnCnqXXnu?= =?us-ascii?Q?toQ7tQ0wzH7CmM+7oLPKAYhZKZmkNh4iD8JDbAjvgyK6GxubB0S5XwVxjoaZ?= =?us-ascii?Q?nYpmcQvykznIgPReZsvfkHYVAoGiz1luNZy70AnSrMTMqI7kiHACAP4oivYt?= =?us-ascii?Q?6T0hXPKTFxDcUHWDz3H0VjuncdLSadjo+7y7gf/SWMpOZQ=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)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IG0S1GG6FB69FRI2aRJDcS7R3zXJvGb9LybrUP/jnmm4k4Na7E10CE7xgQKk?= =?us-ascii?Q?Lf0e6mNpOCmutGBmZBM+MNoXerkNv/ZZZDi2ee7H9FbaadaIqXOOJe/gFX22?= =?us-ascii?Q?pKPhXk8BlDWHd5GTBm7P8g6bKBsH0o9lZXnM9Wiab52zGBWfUHspsY+7e9Nx?= =?us-ascii?Q?X/vh9Aw2/lsmzDFwGvpcc5rCrPHXbOQQRvdi7Gxd6iIBTZxehXX+KtroVAQT?= =?us-ascii?Q?hXn9YpS2DqqoDlTV9bN/a4l7ytcM3nTsq9aok/2hOEThQzm2YklHc2RGtqAJ?= =?us-ascii?Q?hue6z6LHKnmvttPmyx8+PbWXaoiQTJ+gDfYo35ec93WwijIIsBxusulZvig3?= =?us-ascii?Q?nR42EifneHiPDhPbw7bD/6BEadr0A01RKvcvSiypmQHeGRJgFGfidOC3RKix?= =?us-ascii?Q?M3yV/RQNo1u15RgU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Ul?= =?us-ascii?Q?yJTPfKWUS6vhXPIKLlfj5fdlZ1qb//55yTTKI2KDwcj8E7umYbqkPKf+tYJ6?= =?us-ascii?Q?snCFsa0bHwkwKC/DW5VWH10Wf8MC+Nvcyc+vjioeAR4zBTtSocC8rTNVUj0H?= =?us-ascii?Q?+r6KvgkeO5mzMLSQxGmLn2zMTlePJAcQjGEqzljFUHbjZGhqr4MEIus7duPM?= =?us-ascii?Q?hUrlMExFXVHUipauOc3CXBsLYH74ElI4ylQXl0k1DdFzw8MhnMSFYq0t3DoT?= =?us-ascii?Q?eASKm2oIvuPj9bDF00NTlL4mCrjPMZwBEQ4JqMrr/RAZGxuNM8q9vjCIk23b?= =?us-ascii?Q?IA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5607ab1d-f7c8-49e8-b166-08dce149ab66 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 12:16:10.5930 (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: tvkzqQ2U844/n/UZoArSgrzS1oqiAnvcQ7l7paQEqpGMJdOPZOYYreNQfuK6KNlgpow6SSUEmbnHa9M1kKb5aQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8334 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 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