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 1C709A06CC; Wed, 19 Oct 2022 16:49:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BE2242C00; Wed, 19 Oct 2022 16:49:37 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2082.outbound.protection.outlook.com [40.107.243.82]) by mails.dpdk.org (Postfix) with ESMTP id 7260D42BF7 for ; Wed, 19 Oct 2022 16:49:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B8fJq7PapuAR72UfbfQEm4SXMJb3xWx6msVQRDt3m72Ehzhp047kzZtVf0h6cObJaYQ7R9W30ZDXjOVju05YA5thiB4v7dT/nKqZSJ4UAwVIqHZ1jcmnzcnZ7kcE5tkQo6f0ewTR0rNllEHTfil8YJjSyp/+V4CYc1nVAWPA6fRIBL4L74SffXXKOvmNchMXXnNExT4cDxbBNZBKK6nRwt+MyQ/Wi7Q72G+mSRfvjImX/7lZWZ7l+UKM39l1FXhDGgdF48eVOeWW4jsvEfXk8woHbpvR9DQey1QBVcqB/iR2g0D5V5KK3i6ueANdoRH4oApgpxzMkyNhaqokqAHjGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=KV5zFZXV6hY80WaISQMBgvkIsNdjUwOcOZusMJMYrTY=; b=SjZCwZNKvbVJ7S9qrm/KgRlgve1Z2diTXl2EBJwjSFpyocwaSqk8cG9YkJxfT2vS4rQWrCnN1hpgjW/7U9kF74QZxNvcPuuntAfL+r3B+MHF9QBfieKUGWr3tv40BKU0/Y70u9MARm1L07+Ib3rp/ERhT9RuPs20I7Lu1qHFoMtFoaNqIOX9XgXNCpTIzKBjW0q8ujNl/YNoUnEMHjCt9xzJbNV+zvF4iIZm6vW1hBc4oesXgAQFIYFSinjYI8i1aFawtY7mpU/l2jmAR330D5kOLDV+lspJtAQoFrcj1Q6MiICF16Ix1OV/g/RHfZHD330ox7wH/y3boZzPRTc4hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KV5zFZXV6hY80WaISQMBgvkIsNdjUwOcOZusMJMYrTY=; b=sunjqpkNQ9hP8ce+2aLKajxBuBqpYaEzkVOAWEGvmisM0JzgaONMYHYmxU9IXaFCMzuUMsdB78Bwxz2rzhMQ+2VkV+sv1RzqDuguV03s4XEBcu0WurGMu6R6zJZ8BFPCsL5J36UYj/w10RIw6CG8EyBasehnp410l9Wdcv8jHWgrbV5XCX63Eqfqx36EMxbaqOMeeUW6Vt+0w0ACFqFvg9NJVftmbCZ2J7ccNiIBdH4QkuoG+IrATX5jnxe49KNgCGMQQ/wUU1JYU6qEosk4E3EyUeoyEHKR5L0IQ48qJRVp68FfxHoIeXWrU/zUZ3tBq8mh9nsBpCRGiNTHzK27og== Received: from BN9PR03CA0343.namprd03.prod.outlook.com (2603:10b6:408:f6::18) by PH7PR12MB6933.namprd12.prod.outlook.com (2603:10b6:510:1b7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20; Wed, 19 Oct 2022 14:49:33 +0000 Received: from BN8NAM11FT103.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f6:cafe::17) by BN9PR03CA0343.outlook.office365.com (2603:10b6:408:f6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34 via Frontend Transport; Wed, 19 Oct 2022 14:49:33 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=nvidia.com; Received-SPF: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT103.mail.protection.outlook.com (10.13.176.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Wed, 19 Oct 2022 14:49:33 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 19 Oct 2022 07:49:14 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 19 Oct 2022 07:49:13 -0700 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29 via Frontend Transport; Wed, 19 Oct 2022 07:49:12 -0700 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , "Ori Kam" Subject: [PATCH v3 1/3] ethdev: add strict queue to pre-configuration flow hints Date: Wed, 19 Oct 2022 17:49:02 +0300 Message-ID: <20221019144904.2543586-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221019144904.2543586-1-michaelba@nvidia.com> References: <20221019131228.2538941-1-michaelba@nvidia.com> <20221019144904.2543586-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT103:EE_|PH7PR12MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: 09c2cf12-f614-4ea2-06e9-08dab1e122c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x5ED2GpIWaLcppvTEAG6BRs5vuXjjeLQNgj6+pUeB3EqLyTaIGr1IFOl1wY7Yv4AFw9HRradnsTHA9kiT1OTd6pilJD82P5beh6dpJpmLUmvd44COaKMoJwYw3G8taLPr3UP9SoyNuBRGZWQCLZPLv75k5zgBymegvFBAAOeUctloXpy3lw8+VTH6aU1vIWqunnEIzvmxnTH2SpZNFjQOwQBavO9oKjRNx+kpAnsp1CjLaJb3DGk4fULu6i5RM+nLc7HKxXPx4mVuKQkH7LQJJXcN6ziQ1JwJ9x/v5gcC7YM6nKREShG5PCX503O2QwSU5YJNCgo0TpgpKYy3qhUZRWb/T7qKm3hVewZXmHeuHkJSDdpOx8XRkWR7NUiiHa7tvLbw7L542rPfQsMbt18FD0vdNGL8r7Zk+lJCbSTtgoYre78q2M+Vt/4G1aiDuGZqNoD6OpkyR1alSwZ8U0t0c/xHzsCnza4hzsQXQmMNn1jxbL7W2xwn4eKdjpxKISrJxJlEFah4Ve9UlBxF/f9wjhYc3Fm61BOowIGPib6sgOl9iDS9LpTbXhH75O79iGGyD9/oo54v1sFGJhQ8PU3Evb+yP4w99k/OV3TZR9AVM7ubLNXJUXTIT64MNMBeTyhbVlWftKHHfLD5RUYJd9S3i3+Sv3cGN9FmqbrlGciCrae9LK+jpjwUJiXzkIRCxAL9IzRiNCWPmJGthA0hEGml9YSz7qzHT21CTzMafUrw5z+vUROqRGCCQC1YKZdKTczK3HCfFzFq+yGiofAFVN/DQ== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(39860400002)(376002)(346002)(136003)(451199015)(46966006)(40470700004)(36840700001)(316002)(26005)(2616005)(36860700001)(8936002)(6286002)(4326008)(8676002)(55016003)(36756003)(40480700001)(5660300002)(70206006)(336012)(6666004)(107886003)(70586007)(41300700001)(2906002)(186003)(7696005)(40460700003)(86362001)(1076003)(83380400001)(6916009)(82740400003)(54906003)(82310400005)(478600001)(356005)(47076005)(7636003)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2022 14:49:33.3164 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09c2cf12-f614-4ea2-06e9-08dab1e122c6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT103.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6933 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 The data-path focused flow rule management can manage flow rules in more optimized way than traditional one by using hints provided by application in initialization phase. In addition to the current hints we have in port attr, more hints could be provided by application about its behaviour. One example is how the application do with the same flow rule ? A. create/destroy flow on same queue but query flow on different queue or queue-less way (i.e, counter query) B. All flow operations will be exactly on the same queue, by which PMD could be in more optimized way then A because resource could be isolated and access based on queue, without lock, for example. This patch add flag about above situation and could be extended to cover more situations. Signed-off-by: Michael Baum Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++-- lib/ethdev/rte_flow.h | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 810dfb9854..59829371d4 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -226,6 +226,7 @@ enum index { CONFIG_AGING_OBJECTS_NUMBER, CONFIG_METERS_NUMBER, CONFIG_CONN_TRACK_NUMBER, + CONFIG_FLAGS, /* Indirect action arguments */ INDIRECT_ACTION_CREATE, @@ -1092,6 +1093,7 @@ static const enum index next_config_attr[] = { CONFIG_AGING_OBJECTS_NUMBER, CONFIG_METERS_NUMBER, CONFIG_CONN_TRACK_NUMBER, + CONFIG_FLAGS, END, ZERO, }; @@ -2692,6 +2694,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_conn_tracks)), }, + [CONFIG_FLAGS] = { + .name = "flags", + .help = "configuration flags", + .next = NEXT(next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.flags)), + }, /* Top-level command. */ [PATTERN_TEMPLATE] = { .name = "pattern_template", diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index b3f31df69a..a8b99c8c19 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -2891,7 +2891,7 @@ following sections. [queues_number {number}] [queues_size {size}] [counters_number {number}] [aging_counters_number {number}] - [meters_number {number}] + [meters_number {number}] [flags {number}] - Create a pattern template:: flow pattern_template {port_id} create [pattern_template_id {id}] @@ -3042,7 +3042,7 @@ for asynchronous flow creation/destruction operations. It is bound to [queues_number {number}] [queues_size {size}] [counters_number {number}] [aging_counters_number {number}] - [meters_number {number}] + [meters_number {number}] [flags {number}] If successful, it will show:: diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index cddbe74c33..a93ec796cb 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -4741,6 +4741,12 @@ rte_flow_flex_item_release(uint16_t port_id, const struct rte_flow_item_flex_handle *handle, struct rte_flow_error *error); +/** + * Indicate all operations for a given flow rule will _strictly_ + * happen on the same queue (create/destroy/query/update). + */ +#define RTE_FLOW_PORT_FLAG_STRICT_QUEUE RTE_BIT32(0) + /** * @warning * @b EXPERIMENTAL: this API may change without prior notice. @@ -4774,6 +4780,10 @@ struct rte_flow_port_info { * @see RTE_FLOW_ACTION_TYPE_CONNTRACK */ uint32_t max_nb_conn_tracks; + /** + * Port supported flags (RTE_FLOW_PORT_FLAG_*). + */ + uint32_t supported_flags; }; /** @@ -4848,6 +4858,10 @@ struct rte_flow_port_attr { * @see RTE_FLOW_ACTION_TYPE_CONNTRACK */ uint32_t nb_conn_tracks; + /** + * Port flags (RTE_FLOW_PORT_FLAG_*). + */ + uint32_t flags; }; /** -- 2.25.1