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 EB8EA45BCC; Wed, 30 Oct 2024 22:41:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AD9D43450; Wed, 30 Oct 2024 22:40:19 +0100 (CET) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id EE463433EC for ; Wed, 30 Oct 2024 22:40:05 +0100 (CET) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02lp2040.outbound.protection.outlook.com [104.47.11.40]) by mx-outbound11-85.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Oct 2024 21:40:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DKOzMAKrEj9KRI03Y1874O6a48Pb4u+Pysw1HkrK4YjZPoTXQlukpMb8nwhZKtJHo9RQQPNlrsiHrCX/eK6phVzn9YqpwZt6Cc3U7sCOR4ZvwLE0J0mzqIHRP3cTcq0yiASEm0HRtQAdjLavXkYblhhB6fXjZ+dTggEL7p/2bpGZ7lYGJqBAzaEN2HpNoEVBSc6yS+nXcafYz5k9qSuHe+umLBS/OaQ/4KRlgbzXQPhaWSXV22/Y4ZTcA4350keV3IGyyY8pbP5nnTG1knS8je6ol/H8FbUFAxq714tbx2Cpxwr4vVNAqyv5SGPARxrQV8/KsutFCcc3ACXqpgf5Mw== 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=x2OtuHV/CjfC8D9R0sKYNF1PiDI846VFhHYkd+z0BaM=; b=S2u4C45OxUhQCkCBBZh/nd0SwJqj5amD8XTgUXUJJzIXu6eeUusbFNWsLmdQlB2kBEsWj99FxkeBenhPjRSvnrDDBM3PwN1LVO6dJi/Olt3H0dcrieam+Kz4QTVmTy9tlqeeHevLTSB925mp2SyYuGQR5KlryB8uCcoRl7rdbJR+jLYVYxoV1KadnUbBZmeJxI3VY6VQaVL0WIJCzPLPu4x62VXLFjLA165KCAshp0Ymc2eeyWXkEjNhxpRqAfloiwXCsgBcwmY18frLBps2elRoMsaw3NU/0M/CxhJNXRdeJH2NoKN6nd6EQWOSgAmqIyLOepV96yLz8QDZo75ykg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x2OtuHV/CjfC8D9R0sKYNF1PiDI846VFhHYkd+z0BaM=; b=JHL69kuHN7H8gzugImNd4Xta2onIab+5Dp1VD7a10FQxBSgMKtL+zl8qAMwW3fZAw7leWHbsby4psGOsv40kCO3fPFZvHHiOtHO53C/czBoy7wXfKxHDGlxryb7mN+6egFY9njMeDJjlINFET1ZWy5K/HhzjoczJw+imXA2ZZDU= Received: from DUZPR01CA0005.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::9) by DBAP190MB0966.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:1a3::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 21:40:01 +0000 Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::63) by DUZPR01CA0005.outlook.office365.com (2603:10a6:10:3c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.23 via Frontend Transport; Wed, 30 Oct 2024 21:40:01 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 21:40:01 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, stephen@networkplumber.org Subject: [PATCH v5 10/80] net/ntnic: add action queue Date: Wed, 30 Oct 2024 22:38:17 +0100 Message-ID: <20241030213940.3470062-11-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241030213940.3470062-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241030213940.3470062-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D13:EE_|DBAP190MB0966:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 49fd9551-8b64-47e1-f30e-08dcf92b68c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-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BhkAjc1vhOdUJFWZ3p5ANQ+KGOYCCxy4PT6/k0rL8S?= =?us-ascii?Q?YJk+PdHuOYKhAG14tYRSOEkNCao/fxbTTocSawAqqzYsLKIOSd57toeh3Xfq?= =?us-ascii?Q?Y4IFCkrMpud3RgdNlz9e4KFf4nyF5nC8ctJ1vjWOR0SkD8aA2+Gh5bdB+VYP?= =?us-ascii?Q?QXN5yvCjFr0FUIgerL7UwL6sh8abXQucvEavO40IOMp0h08zkroSU3Y+JHWc?= =?us-ascii?Q?gTDDGXOYPp7wchwTQmnQVWEnU4gHF3hBzhkfOCjv3v7Et5x3XEo+AZTr1uJD?= =?us-ascii?Q?NtWG7nZnlRruZcJ8VG4H1YpVeA4nHU2WOBrEHhtzdtVtiHw5pPQjnegVJwvB?= =?us-ascii?Q?NkPoXlsJXq7XFvWeEsCDtwdrASdHHeLXWK9DtobhPWqwjtzCXRW8wVEnfTBO?= =?us-ascii?Q?Udby4e8t+bLdn0QHsBaf8FCa71OMZAs07pZoXaOZ7eAu1qBysGdMAqABhlEm?= =?us-ascii?Q?uGnAJqBS8aw6zPtsNnp2uFCXO5X3cqHmnzLKURYMwkp5e7nhecwFDrNxg4I6?= =?us-ascii?Q?ewzvlTIxqimUR/nwsgDksJrEuK6JqYDWdk5dmFzIqHWKg1VfGQ=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: mQmGzEW360s1eZ+9rOwdFJuVnElz0FcxJ5GzN1/b6Z1WtQ6BWeXr0z4Hc6VoeqZtyTiI9QGP8PjMZrYWDHi5z58vyGwMuBCApePByxaPdYfx6/0h6ShYQBLOurH4bwI2QQiWAPy8tzsrN+0zWRm6Azp/GH1ivLtRr1FnHg1ZIK1Y2TeGatMAL7a7JyMEInrsRI9NzJx5D2WguhnTp9r4BToqhePBivy+UD8XGScjmoeHMROC571wBFS6exE0tZpb6jtFP01m/1qfeS4gFNX9SLbNTkavN1o89P14/Gqlo9dsrMP2nNbLTZxW63dHq/T2FefR7V9jKxSSgyPClBtRNqtCxQ+SfdaHyYjJq0GvDfxWlqL6NzgWEptfDtRoXrw96uZyyp/ILBJYlcujHyCw1hrBMKy9hALO2RSkrgDNnWzQ2T6BlcPOi6Xbzwu9qW96fmey5vvgyHLz1agfHhjiJhW2m84T01X3guw4ZlzohGp3YwCCGg78tRbS1zm+X2XRntB4p7Y7Og3s31JNDPycHbdeTL5tzkwX/masCjy8JilhwP0HzDNN/99p25VQTf74X2ysofyAcAebHmp+w3cvpwVJlaA4jSBhFrEFohPYM71e1VOBCnnqwrZwET05FXjSn3XQdiOjMZP2iS3ne4tVwtkgN7UQbIFm1IqDkM8UF3g= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 21:40:01.3955 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49fd9551-8b64-47e1-f30e-08dcf92b68c7 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAP190MB0966 X-BESS-ID: 1730324403-302901-12798-43449-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.11.40 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVsYmpuZAVgZQMDnJJCnFIMnUKD UlJcXS2Mw4zTzFOMkgNSnZICUxycxUqTYWABOtvJ9BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260091 [from cloudscan15-95.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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 Add possibility to use RTE_FLOW_ACTION_TYPE_QUEUE. Signed-off-by: Serhii Iliushyk --- doc/guides/nics/features/ntnic.ini | 1 + doc/guides/nics/ntnic.rst | 4 ++ doc/guides/rel_notes/release_24_11.rst | 1 + .../profile_inline/flow_api_profile_inline.c | 37 +++++++++++++++++++ 4 files changed, 43 insertions(+) diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini index 1c653fd5a0..5b3c26da05 100644 --- a/doc/guides/nics/features/ntnic.ini +++ b/doc/guides/nics/features/ntnic.ini @@ -18,3 +18,4 @@ any = Y [rte_flow actions] port_id = Y +queue = Y diff --git a/doc/guides/nics/ntnic.rst b/doc/guides/nics/ntnic.rst index a6568cba4e..d43706b2ee 100644 --- a/doc/guides/nics/ntnic.rst +++ b/doc/guides/nics/ntnic.rst @@ -42,6 +42,10 @@ Features - Promiscuous mode (Enable only. The device always run promiscuous mode) - Flow API support. - Support for multiple rte_flow groups. +- Multiple TX and RX queues. +- Scattered and gather for TX and RX. +- Jumbo frame support. +- Traffic mirroring. Limitations ~~~~~~~~~~~ diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index a235ce59d1..2cace179b3 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -162,6 +162,7 @@ New Features * Added initialization of FPGA modules related to flow HW offload. * Added basic handling of the virtual queues. * Added flow handling support + * Enable virtual queues * **Added cryptodev queue pair reset support.** diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c index 1b6a01a7d4..f4d4c25176 100644 --- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c +++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c @@ -23,6 +23,15 @@ static void *flm_lrn_queue_arr; +static int rx_queue_idx_to_hw_id(const struct flow_eth_dev *dev, int id) +{ + for (int i = 0; i < dev->num_queues; ++i) + if (dev->rx_queue[i].id == id) + return dev->rx_queue[i].hw_id; + + return -1; +} + struct flm_flow_key_def_s { union { struct { @@ -349,6 +358,34 @@ static int interpret_flow_actions(const struct flow_eth_dev *dev, break; + case RTE_FLOW_ACTION_TYPE_QUEUE: + NT_LOG(DBG, FILTER, "Dev:%p: RTE_FLOW_ACTION_TYPE_QUEUE", dev); + + if (action[aidx].conf) { + struct rte_flow_action_queue queue_tmp; + const struct rte_flow_action_queue *queue = + memcpy_mask_if(&queue_tmp, action[aidx].conf, + action_mask ? action_mask[aidx].conf : NULL, + sizeof(struct rte_flow_action_queue)); + + int hw_id = rx_queue_idx_to_hw_id(dev, queue->index); + + fd->dst_id[fd->dst_num_avail].owning_port_id = dev->port; + fd->dst_id[fd->dst_num_avail].id = hw_id; + fd->dst_id[fd->dst_num_avail].type = PORT_VIRT; + fd->dst_id[fd->dst_num_avail].active = 1; + fd->dst_num_avail++; + + NT_LOG(DBG, FILTER, + "Dev:%p: RTE_FLOW_ACTION_TYPE_QUEUE port %u, queue index: %u, hw id %u", + dev, dev->port, queue->index, hw_id); + + fd->full_offload = 0; + *num_queues += 1; + } + + break; + default: NT_LOG(ERR, FILTER, "Invalid or unsupported flow action received - %i", action[aidx].type); -- 2.45.0