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 3EE1345A79 for ; Tue, 1 Oct 2024 13:03:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA22C40676; Tue, 1 Oct 2024 13:03:49 +0200 (CEST) Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010045.outbound.protection.outlook.com [52.101.69.45]) by mails.dpdk.org (Postfix) with ESMTP id 7EF7B4027C; Tue, 1 Oct 2024 13:03:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JL8J+JwbPmWRvLJ+jJETOSi1yY7mlN30hzcyJSr7sjlKiSeybZB+Lky4HJqA0ywoU4gw1NkeykNwfxHf/pnhOSo1Y4B9Ga/0PR7VXSWeyhQFlgT556eqyZR3q/oXfMqt6BiHv3bTapfqXdx7RhZ6ywMWYIXbhOvQ0YsPo7i0npvD6kZyCfkBSJ78VwG93xR89qse/66G1FoVj2A6UNokgKbRKnShNK4B5NSLJrukrEqymzHzXBftd7TIMi91RXuH1VvJUD6dcjO8yO+acPWC30lRvLRdcSDUarazSCX6ARlndNX45m/Wo2ae/TAZ00NO2H4has3LW1Se86NGGO7htg== 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=YdggqEpUz1kg696ENbJAwjSBsdI1GddLVx7ag5SsblEQh31t9vWhbI7fLhUmjFNSL8+KizCCaa//r7So9/+I9vNz5fBUOpImZT9rvVQpVjEQvr/ut24/BwPELNSd8lyvEigdKSHDqB65TdSd+oqI+F/5Xkyab0ryoVYZ4CRVnKXNSWwE3+dF4yQED+cUpHwC8DMUnwGkQ4JhcN/RYShURrQl2H4R7IAln33CC97i+xeC3D0UJ4KbeA8Hy7EyVPFo+CFSkdL1I3b6JRriZELaJqXv9qYtUmyGqyLhpxqdXIVNTABIDTO2+VvNcEenCNjKCku7ik1OMEdMkqp9lJ1I6Q== 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=OBg6bis6zSfV2TBdnxGo5yJlGsd8PM289vsbNrRms/ar512/cmnPX2FfOsaK3Nxeu39t+eTHNwH3eAo48LPm80f4POYekuqtqMup7ZIWz46Lpin8JR1OP9bTJjIXoDIonvV7M77rVhq2RGtmuO8+ltjgTpGrAGUJwjS/1Lcw87ejXdMVTSpk+QoJZlNlexnmmMAHvkCbZwLa5vz4S543IKZ0XtgHfBc2n/3Wm4jONRyGNVO84LbNfKY36Toktem9+zrwJWirmD8yYjq1pel/yJer0wYtZqBfc+Db/vBEt86BYxurKq6OXaLg9iI5k5PwDt66XX8Xg4/x/J6XLEKAoA== 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 DBBPR04MB7724.eurprd04.prod.outlook.com (2603:10a6:10:209::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.27; Tue, 1 Oct 2024 11:03:46 +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; Tue, 1 Oct 2024 11:03:46 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, stable@dpdk.org Subject: [PATCH v5 03/18] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Date: Tue, 1 Oct 2024 16:33:10 +0530 Message-Id: <20241001110325.4173762-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241001110325.4173762-1-hemant.agrawal@nxp.com> References: <20240930121525.3452847-1-hemant.agrawal@nxp.com> <20241001110325.4173762-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0086.apcprd02.prod.outlook.com (2603:1096:4:90::26) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DBBPR04MB7724:EE_ X-MS-Office365-Filtering-Correlation-Id: 51624aef-cfcc-42c3-a79c-08dce208b876 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?F6J3GjgLyMnOBwsd7LEdWWY2KhrDjUvJYn6ebrbDdjtMxxS9tePdbGV1eVa8?= =?us-ascii?Q?nMgwBcvFyMLoffZdgdkKsAbvIRhCD5UJ5zgdCmgiIZFf7tLNXObZ1nTz+/1p?= =?us-ascii?Q?/2OJTscx9NhCG3nwm9l4Xlq/p1kDiRORnkX9QzvSoHlR/mZLJKx4A1GLezE/?= =?us-ascii?Q?tr8+BnE21PQkfhShk9Jlw4i95tqaU1iegZ5SKomSHjE5WDVDiF3jnPGzs/0G?= =?us-ascii?Q?0w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HlS6HSU?= =?us-ascii?Q?61SgKmpgXCfKLUdm6EpRuzCFvaGLCgFfgj9I6C/VN2LZBV5EbAKbbJknkBU+?= =?us-ascii?Q?/IvNQ7xT0Clm72QYeuuyrTWUsl1jlDOMRvkMao1sluqfXJNyoJxVBcb5E3aC?= =?us-ascii?Q?5yRZE8gaXkcuWaNOYLFhyfZ+erBhrXs8WzKsWnA8KZHgllV2oHmuZs5C52Q4?= =?us-ascii?Q?m1IDP4BbY6YpuGhUqWEQlxaMo9rSuuezBg7BAOQBqQGS2w=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?cqr6pdJsyr8CkUl4QTkpUyTRvhojTd4jUeU7mPnQQTjyU8hucGjz/xsKKLCr?= =?us-ascii?Q?NyvxIVME7+NW4VMbYWZQrS8hLrwnDJgi4MMbkW/O+55Q7aUn51kp70jZdLu/?= =?us-ascii?Q?9P0/XOsNzoairSqjEH6WrrwdIErp+nbxSCcYT5h1wDUNwg7PcKJwzC7udQn2?= =?us-ascii?Q?8ryNgZD/yPYB0fdVvwtKVuu1OlAZpxTxzMFiu0e4SsSfx1mgS2RiZYiKsWdx?= =?us-ascii?Q?qKi+aaAtpI2Nz1iXp5proojBKA/txq2S81somjTAstPLfpCBgcfzBE1UymcY?= =?us-ascii?Q?pCr582oZIcdNqxBEKt74DONh5LcoXfDanObMMhHSVVBVdAxDMFy7FYOIgO1s?= =?us-ascii?Q?YDHSo3cZJrll6HddB51dMkE+KCsyBTImRgXZ3jy9TFZ00NgmGvLOREWCUYDs?= =?us-ascii?Q?+Ilq+YHd0NgCmBzSzyJGM9Q4Q2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Hln?= =?us-ascii?Q?HuDm8WkSfVYWwFqeQ8VpVYVhKOliYdvKi7DnhtkAImMRDv/aDfa8JAjk7TT5?= =?us-ascii?Q?S3S2nK9940b/wioX2WIRZ1ZAr+G5WWqyoTVptGNbauNn29a2E7w38LEM7LdD?= =?us-ascii?Q?NYxjJmcOKKF4rt5CNujcPBS3TyYa7LkkBSDBkkQEwvWKxrms5coP2YcuuqP3?= =?us-ascii?Q?nnqVsCzewto49Z9VjBM7ONPikW+aWql9caVD/vD+lWpDcH/hgFCDJLJTyv/I?= =?us-ascii?Q?yVQEG2UmYFjD1QzNwq2iueWa1ZQKHr77ffQZjQ+3aOucWdIv5D5c76jlG6ot?= =?us-ascii?Q?Rw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51624aef-cfcc-42c3-a79c-08dce208b876 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2024 11:03:46.3979 (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: FkNbL8lsQEia/28/0SCzYxX2UvwL6JOLDWqH/0L3QSdkM2vwlsGr2dmM3CN4zUR5qK0RV76uW1vw2kfW5ZFyOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7724 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