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 B2F5745A67; Mon, 30 Sep 2024 12:30:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 418194060F; Mon, 30 Sep 2024 12:30:18 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2072.outbound.protection.outlook.com [40.107.20.72]) by mails.dpdk.org (Postfix) with ESMTP id BD741402BE; Mon, 30 Sep 2024 12:30:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wd1bl0bJdvySroxp6BbQENNgWu+TQ27NxOWe8ZyNkuvfXWfIDa+nN2A9MPXNLjMAkzFSBQpWZk2HxX+d5eHeFAACV9ovW4HbxrmbjeVxfpbnxN/NSRf2EgkjPKuywDL137lu1PQ8N2WsksLHo+j/H/N7ZT6q6S5G123+eQhsIowm+sLllzay/GxrqEdDNA1lWukW/ChqDJkskECVRGWoxKAkt06aDlKOqEi5+RfP+hn+tVQsDrrsB9dNcJvA2OOWHbXL4Z3x9N9JWaYesHV3Ozri56kpwHhIh+jaGPO6JyDDa1RWEy6tA5SxV8vzDkVu7vOq8AowNTjJXaxdkIvVvg== 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=jLIA/5WQ7FukT9Uu9dr9o8kXeYuK0rXUYfTYopbentufFOzVmh/tdBhrOaMtJVpikBT8CVSRf+CaN6MVgqDN3UtdhwShQ7Fqxi6aL28Uumi8jNAhkNnVNkPv3WnYA+0j9lBGcLt+F7gKpaT6sVx+hFaf3fFb7QagD9HBBYR0wAh80wqIZP3X+RZHaX7g89rFehBxTinKh9G3C2/v+og07Efe3dih648mlJqrG5mKL+NNJUvKC7I5hhzialVQFxpvjiQ2cBiiza26NlDVXXN97mKn9nzBI82hWGcxMoCzpQjVnz7GezfAcCjnfxvvJ81bOqEPbyPXib2Cx5pO5vx4EQ== 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=Z/YDCIPIeBOE4siCyLOV5x3sKlAQGalnoXb7rTEhHwJqrBA9YnEsvoSzbecSlUhgRa4ORSvzIaEAeJPMVJR1ztB6QNJ4aLWSJUCpR9CXn3VpVOp90GNAuvdA71eOrxyev5FjCbxlwKn3DEe7j9iduMu0i7ibTbk+PP/muQwwG2suBvTTlH0T/S8F+T8PzFAxuwVrRb1L3FiqE6I+BFoxACltsUEdc0WjEk3bvcPijPJO5Cc6xlcxeMG2yOZvQO+ACoY5wu85t3g4M1TIEpnTnh23pgKXMccpo6Q67j94fERhmRFXRUzupDfALLCY/SqpDsZ8mQn8k274v6CooREDtw== 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 VI0PR04MB10161.eurprd04.prod.outlook.com (2603:10a6:800:242::6) 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 10:30:06 +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 10:30:06 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, stable@dpdk.org Subject: [PATCH v3 03/18] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Date: Mon, 30 Sep 2024 15:59:31 +0530 Message-Id: <20240930102946.3236998-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240930102946.3236998-1-hemant.agrawal@nxp.com> References: <20240823073240.3708320-1-hemant.agrawal@nxp.com> <20240930102946.3236998-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0027.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|VI0PR04MB10161:EE_ X-MS-Office365-Filtering-Correlation-Id: bf44b7b8-1edb-42ac-0f46-08dce13ada3a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8Rnz2I7HJkzSBcuPI0r8mXJwbMvqqRFoRqCKoyCpsRYLkkupkZ2D76l8XkZA?= =?us-ascii?Q?LEXKulYzKBY9kb6YKI1IGS6qOzRzuPzAH/4nl2/FKVXBLFScz1V8cJZ5q546?= =?us-ascii?Q?4dH4BO9cRBqaiLIt3ZREdek6QWNKWWnCGdgYPDzxdHch7lTW3AkVCht7X+Q7?= =?us-ascii?Q?yxIeBp0OHceQGOH9ce8/W4ZewNyaE2gBX9Pd4ugmyHjaNEId9GvV1UnGUqvL?= =?us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4Rn3mxxLDcHDrFajEdpd1LO/hEfrNCbW?= =?us-ascii?Q?w04Pi7SRwv7PO4rhyVlWDiXerKmf89+NTHIFJWPB3Zcq+qjJr0aKAaAyhL5/?= =?us-ascii?Q?730eJZBHhpv+dnqqyGMp4MQ38Orejlkg581vGN7dR3rvWEjXEl8yGF6Zhaac?= =?us-ascii?Q?SYgoxngwq99oRrJHoAP6SJssGOYvEvTcW6Ofh6JwKI6Zf/iss9xmcUBpJ3fg?= =?us-ascii?Q?jTtI8moLCoCRv6ep3XPbckR6qyO1PQrQ3dBNZGZtnI4dYA=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)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1rJ+otERqtiw6d3taK+qjv/H40zMUMSRmfI6cMXEYXl+5bOfUYJcaC1ya9wG?= =?us-ascii?Q?BDI1PLcBfpgQH0s1auY6evqAn1q5831NC9RGYkYgIso3xJZMIuw5kQweeGG+?= =?us-ascii?Q?Wmu1Os5ni3BsmES9npxNtD/rNAvoMS6iX9GwMMMohLnJPAc9/FasqP1JDGj+?= =?us-ascii?Q?oxeWA7BA0usEF3LJ05cCxPEIH8J6dkmXbRjELgMmRVNvw4RBjJJ5UG2NYEuc?= =?us-ascii?Q?0D8Io3hDz4W0/4Jgea2oq+DJ98ZcyAVCkplok66qFDxPaLd94SRUD8kCqeeF?= =?us-ascii?Q?EHWYxKMuXpAhMcA1norAHvoxmls0TfdUhfYyde1VpuUn/ZsKnhHksdTGAZQl?= =?us-ascii?Q?vtyqAkatVd8VzJmkH1cAOFNWLvy3HldaYzphrRlzkeQ7fMP7XPdrHCoH6a9x?= =?us-ascii?Q?Q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K9VZGmdZEAHMUniM6eVt/twNA?= =?us-ascii?Q?jKeE1yXcEj+rY6YDkaxEI+UYQe0FIdzWtsLM8badzrmrkoegyW4cqo77Ndyn?= =?us-ascii?Q?PSOL0MpK1oO3X32SdpAulR92d/QfozBZvan0/E+z4/mqj6eesRI384SR/KsN?= =?us-ascii?Q?/8gmIObBNltYRyAr/7D+vikf1ITKH1NA652+8TaCV2TUx0TH4LQ/xHyFuble?= =?us-ascii?Q?n3eHsQ/a6IxqdkdSF91QUO3Vwy/sEfkdh/g6eQqGwgm721sG3Sgj111gQPnT?= =?us-ascii?Q?EyA4QnLm+6yECsN2sSa7E9IV++QfmkjcgpL6WbS1ZY5VglAUBvglCqp5rTB8?= =?us-ascii?Q?5g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf44b7b8-1edb-42ac-0f46-08dce13ada3a X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 10:30:06.6533 (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: RpF8eA5AZexHb2TnXrYXdU/MWgXkjuJEEdDkhGCaSCgn0KA3W9jiRLxSp25CSly2vR40meu7MDWxyl+7MDWBiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10161 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