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 B400345748; Tue, 6 Aug 2024 10:42:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAA7940E4F; Tue, 6 Aug 2024 10:42:04 +0200 (CEST) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2079.outbound.protection.outlook.com [40.107.241.79]) by mails.dpdk.org (Postfix) with ESMTP id 1EF9040E49 for ; Tue, 6 Aug 2024 10:42:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eMlQKaQ9XFi2J94jJV6ua4VBvcLZOUm+VA0DpsJMEK+S4aP7838bQKggWXuMMHPflN9zvrZx2WKsInyeOfCuY70qBTmQ9fGWTWVpOEkMF6n5fajvwkt/B7KHvYy46MRuZHJ9yhOaEMr45o6KP7ysZIg/P4pcHBnbSwnn0m3RQJHm1IYJLR78xWBG1rGJLBeFiwgenbXvHjLr5ksahWnRWLxq12PLT1LTCXwA+a78Bfeukl2kfw0/KImXOFdvbJoy+8chUQ8kB6+cHDa2bh6vVwrB3+K5IA7DC+qtn5dVRqd4RB0Xm0gL9V7UdPVyyAqHwNmZ0OUk2cYlc0X/V8c43A== 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=xGiK7sT5uYpQkq/r62awx7p8eU5X0pEBgtHxPeFC6tA=; b=MFaz9UCEoN443oiLLc/tfXGOSc0g0dxUYWS9jJdKaoS92wWBYa2VJF1mSp1ilZcsNIIOLtKBVBjuFV3Xx6Ur7MvXMj9ulCQUtkHFCkpdW0H8qSQMWQ3gIbUDkBiOBlibzZR+qN/VFvbX3jZPQWjpUGRf12SCnCTbPDMUQuAga9GdNLfl5IylWNYfZDW36Oc1YECOMs1oMLJuwlJfM4tZ7M+CA4Bbb1irKxT6GtbxLgCZbbjcAaoFa9uydOgMlD4lVftp+Oc39nFo9pmGVILWr1oYpO3ilTca8USNMJzynL8fja3aPykrrEz8eREuHGBLWDMrfluCet5c5PxoQF9P0Q== 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=xGiK7sT5uYpQkq/r62awx7p8eU5X0pEBgtHxPeFC6tA=; b=KJPHmsU6CnNfCcQITx8x74w9epQyEM/UczKOWTwAJW+qpnK3NliI54gLJXSF7T3sxOyaejViBF+/t1HUUY0LPJyt1AgwmUG6QEEKDHp9/J8fMn1h23hCsApZRjnBrBy8zd+6gY8pJ/v7lOTssm868xEq+1230kUjoxHaSkIgDyeUT9cdfs1baioIWZeTWoXgliBqw1do2ky4A+E5xDq4ZXCFUc4JFCSvynf2hOYfaCVaNeoZgYwfVxrSrcIUQHyysbXQQd8WCg1H21K3V/yEm7CIQjY8ZMidc4RuggTC7SX0FoZ+tONlJV6Y3Oq8kkArNfvOvjQw2cuooLq6TcDazA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) by PR3PR04MB7210.eurprd04.prod.outlook.com (2603:10a6:102:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Tue, 6 Aug 2024 08:42:02 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%7]) with mapi id 15.20.7828.023; Tue, 6 Aug 2024 08:42:02 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Cc: Jun Yang Subject: [v1 5/7] net/dpaa2: support FLC stashing API Date: Tue, 6 Aug 2024 14:11:34 +0530 Message-Id: <20240806084136.3212615-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806084136.3212615-1-g.singh@nxp.com> References: <20240806084136.3212615-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0041.apcprd01.prod.exchangelabs.com (2603:1096:4:193::15) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PR3PR04MB7210:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d52a077-fc06-4060-8b42-08dcb5f3a493 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?NohyurqqWBWyOTuPkLP/X18YydjMW2sf2Ot2myvBrm0R8cJD868dFpSs0hdU?= =?us-ascii?Q?BHL2vNj9NCzVrQ8BGOlyqRx/SphFQGsdc1riNevFAZWGNerasmS/RCSnLBqP?= =?us-ascii?Q?bWWXOuXyA9jQn9eDyLAAZBOFvyc+JFiaosGXDnixDXQxt5bV+EicRzOx0ngo?= =?us-ascii?Q?3wuVBKQYcfr8UpwWBLElWZJrKuclfgh2CzKIgQ4Q3gqZnsYn5N528DC6Ow+K?= =?us-ascii?Q?NcOHPxhDKVLZqabvMXDR/qc3FnOIYI2z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?R6Dbhcu2noGu+YIzR9CSaEMt6r6XEAcB8IEmjbDwx3cYXUFhMzCo+WjSA1Yk?= =?us-ascii?Q?GiHWpdMYl8Il69Prqd8jlIW4+cusBFNTj8PeJxOTUG6RdNn9QTSDZ/O91Inj?= =?us-ascii?Q?4oc0bJglbX5FcwO2lYP17s+uwMkkILB/AsbBv7dQeJBqPd3IBbq/znBxsqa7?= =?us-ascii?Q?dXh68ToIrvlVLqzK5E/wyskphuPi6nh5bIW1Q0huWr5o15ZLFTb9VYAp2LFH?= =?us-ascii?Q?b8BiqcLAjU59lutab4NTvfaPGJUIYUcW9tqKHkOJWuKDfzJmcA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8SPR01MB0024.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?UEiiZ7rRk4y+RUr1NAEPf0k1nzlEFTyprSwH/Brus/N9s4Nrme4Qf2WqeNmm?= =?us-ascii?Q?McbSb0wNxCKlM1vJW1QEnZ1zGKi1i9l9q3F1wUGC6pYlDSi0mVG+Q6lPo2B1?= =?us-ascii?Q?TKHOMDMd+2Crx3VVMRvD1OT0eLCUvq9WQ0jL4hU2LMQIGopdh23thGU4HCwJ?= =?us-ascii?Q?7SJrc7JFGe1E7a0V+E1RQqga3uw7pSadulaOvKBwBc/AI5s2EH6I48d3ilr4?= =?us-ascii?Q?obQQedzZmmWAhAE2nLFlqB32kCyOqbjumR96F1gvAkMsaYQ14RTKF1xX2IrK?= =?us-ascii?Q?QRQsIwmnNguSPh2Ft0Up6bt5mgxj2DMxzyLpIESvr8R6LOu9Ij0qYJ2smvGI?= =?us-ascii?Q?sSdKcXBsZCy9OWA1Z8ISRtOy17jQw98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yWTd/zh+?= =?us-ascii?Q?Vfu5PmL0qRwrmiFZ30tXRHR4kqAGvh5jnZiknVE3N9CDtzjE1is43jnBAFk9?= =?us-ascii?Q?lufM6WduM/DI9KzWZFM8F3ay64YndUwpZb6CvALRAZa8kPvrBFXdLXRezifA?= =?us-ascii?Q?oQjkAN5ZwKzflSP/TExMR9KM70le31q30ep8dFZAozWEeLPfZX8863Y3/syW?= =?us-ascii?Q?rLFxwo9Rd4ZJfX4Y5fjCE2xT9vMrcJsZpnl+pYBrUUqLa1SA4d0lSlkOZ+pT?= =?us-ascii?Q?2c8mQCe+L8NA/AVmlCjYPXdexAkUffSdMivReYBrfaxcQlOTH5+/gcKT1fen?= =?us-ascii?Q?MApTWYzecCmK2IIkwMjU9VpPL3HIVyIrizhBO0u8?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d52a077-fc06-4060-8b42-08dcb5f3a493 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 08:42:02.4439 (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: Anm1ga5iMD8tzI+P8g4yijtcqsNR7NF/XvNy21Fwv/vqLqLl/wY0ACJlyUXlPkf9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7210 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 From: Jun Yang Configure flow steering action with FLC enabled to align stashing setting with RSS configuration. Signed-off-by: Jun Yang Acked-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 44 +++++++++++++++++++++++++ drivers/net/dpaa2/dpaa2_ethdev.c | 25 +++++++------- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 169c7917ea..4c30e6db18 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -179,6 +179,7 @@ struct __rte_cache_aligned dpaa2_queue { uint16_t resv; uint64_t offloads; uint64_t lpbk_cntx; + uint8_t data_stashing_off; }; struct swp_active_dqs { @@ -463,6 +464,49 @@ struct qbman_result *get_swp_active_dqs(uint16_t dpio_index) return rte_global_active_dqs_list[dpio_index].global_active_dqs; } +/* 00 00 00 - last 6 bit represent data, annotation, + * context stashing setting 01 01 00 (0x14) + * (in following order ->DS AS CS) + * to enable 1 line data, 1 line annotation. + * For LX2, this setting should be 01 00 00 (0x10) + */ +#define DPAA2_FLC_STASHING_MAX_BIT_SIZE 2 +#define DPAA2_FLC_STASHING_MAX_CACHE_LINE \ + ((1ULL << DPAA2_FLC_STASHING_MAX_BIT_SIZE) - 1) + +enum dpaa2_flc_stashing_type { + DPAA2_FLC_CNTX_STASHING = 0, + DPAA2_FLC_ANNO_STASHING = + DPAA2_FLC_CNTX_STASHING + DPAA2_FLC_STASHING_MAX_BIT_SIZE, + DPAA2_FLC_DATA_STASHING = + DPAA2_FLC_ANNO_STASHING + DPAA2_FLC_STASHING_MAX_BIT_SIZE, + DPAA2_FLC_END_STASHING = + DPAA2_FLC_DATA_STASHING + DPAA2_FLC_STASHING_MAX_BIT_SIZE +}; + +#define DPAA2_STASHING_ALIGN_SIZE (1 << DPAA2_FLC_END_STASHING) + +static inline void +dpaa2_flc_stashing_set(enum dpaa2_flc_stashing_type type, + uint8_t cache_line, uint64_t *flc) +{ + RTE_ASSERT(cache_line <= DPAA2_FLC_STASHING_MAX_CACHE_LINE); + RTE_ASSERT(type == DPAA2_FLC_CNTX_STASHING || + type == DPAA2_FLC_ANNO_STASHING || + type == DPAA2_FLC_DATA_STASHING); + + (*flc) &= ~(DPAA2_FLC_STASHING_MAX_CACHE_LINE << type); + (*flc) |= (cache_line << type); +} + +static inline void +dpaa2_flc_stashing_clear_all(uint64_t *flc) +{ + dpaa2_flc_stashing_set(DPAA2_FLC_CNTX_STASHING, 0, flc); + dpaa2_flc_stashing_set(DPAA2_FLC_ANNO_STASHING, 0, flc); + dpaa2_flc_stashing_set(DPAA2_FLC_DATA_STASHING, 0, flc); +} + static inline void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs) { diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 449bbda7ca..726bc0cf3e 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -786,17 +786,20 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, if ((dpaa2_svr_family & 0xffff0000) != SVR_LS2080A) { options |= DPNI_QUEUE_OPT_FLC; cfg.flc.stash_control = true; - cfg.flc.value &= 0xFFFFFFFFFFFFFFC0; - /* 00 00 00 - last 6 bit represent annotation, context stashing, - * data stashing setting 01 01 00 (0x14) - * (in following order ->DS AS CS) - * to enable 1 line data, 1 line annotation. - * For LX2, this setting should be 01 00 00 (0x10) - */ - if ((dpaa2_svr_family & 0xffff0000) == SVR_LX2160A) - cfg.flc.value |= 0x10; - else - cfg.flc.value |= 0x14; + dpaa2_flc_stashing_clear_all(&cfg.flc.value); + if (getenv("DPAA2_DATA_STASHING_OFF")) { + dpaa2_flc_stashing_set(DPAA2_FLC_DATA_STASHING, 0, + &cfg.flc.value); + dpaa2_q->data_stashing_off = 1; + } else { + dpaa2_flc_stashing_set(DPAA2_FLC_DATA_STASHING, 1, + &cfg.flc.value); + dpaa2_q->data_stashing_off = 0; + } + if ((dpaa2_svr_family & 0xffff0000) != SVR_LX2160A) { + dpaa2_flc_stashing_set(DPAA2_FLC_ANNO_STASHING, 1, + &cfg.flc.value); + } } ret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_RX, dpaa2_q->tc_index, flow_id, options, &cfg); -- 2.25.1