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 EE89DA00C3; Wed, 21 Sep 2022 16:54:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0847E4281B; Wed, 21 Sep 2022 16:54:33 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2045.outbound.protection.outlook.com [40.107.220.45]) by mails.dpdk.org (Postfix) with ESMTP id 813BB40E0F for ; Wed, 21 Sep 2022 16:54:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RfX8O2BkJBKh0Lli40kP0qFg83p9xH7n2cCmHsrGjiiDeWtYT2JS0IwVnq7DDGQKPQ/B2Bbqon3DJrgKLvw5Uf/ZSFGtUVRekuDoFnOKbjaJNaONq+bA5RYB5Y49Mc9XDNXFKJ/iDVWv8my5evlm+MVfqUMZVfIX5WB/fe53VLv1cozcj7eKtwxEvlC5L36/hSIoWMVUr4AgRPn1wbguiHW58n4KEHs9m3/7KApaRMeQrsKu6IvKQHuItbTKhM0n4afwf7tVdmbygS8CPKWpwkd7eWHRU+EIRvSObnOZIq5WMCUZu6o7v4H+JU2Aa6VuGYBi72bH0Q6ZNam6ShPHVA== 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=jySY3qp+QiV+eHnaqeGHCCNRrU8PI5G769GuEDSnsr4=; b=Exr56JADR/SdhLKNNTkz6KBkUsV+QVO+9B26NQ2XCitDVMiVry1mcpPDce6pPO0L2E6w9WOn8DaTond0qzEwwp6148pWYfi49UETRCuFnzlT9ZU+OKCg+6sPQZUYLeMpy2qTLddy4zGAD5dQajBrvBFrfh+PJwulPxZNyc1KTDr+juSOgi7VAt0yGeMU1e271d2ii7D0hgY4GWp2vno3hCB71qlhgncxK54ZzFEutCpPcqAeIo50kg9iQhJlURYl6wBJOwAyjKdCAangRYgOEPFoGdxy6T8A8saU+l+lS2RAV0F7Gwl/vWNlm6gk3xWucee2my0JJ44svhP9gIQJFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none 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=jySY3qp+QiV+eHnaqeGHCCNRrU8PI5G769GuEDSnsr4=; b=iyOV7pGYOGZbtfWCq3LPdG4ElMp80wlWkZO/q1UysFp/Z+S2a/qUozApD1+00OId+KxgyMw9D7Svh74E1sbpu9zArcXdHUqRbk3NHgpS4MPrlFQo1N1LvYQ5ZD3wjjqOtckGmTGbUm7wX6SK7co0A5qrKkg5S+Tx8493jZc4G1dre9cS0jFvF3uMBRM/zu3W3zgrpEhyZ2lCdr8G7pAVmjNCXEJApn2U684+D7939bmwXJJEtqKfSm/Vtoe0bjrbpt+CBK0Oar/uHP8wa3rErhST4MXFalv9l4R+YVGxJMVhDmopJdPTT9mBg9nUWa546sFqBqd+B5ybUD4ePbeUGw== Received: from MW4PR04CA0122.namprd04.prod.outlook.com (2603:10b6:303:84::7) by SN7PR12MB7226.namprd12.prod.outlook.com (2603:10b6:806:2a9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.18; Wed, 21 Sep 2022 14:54:28 +0000 Received: from CO1NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:303:84:cafe::a8) by MW4PR04CA0122.outlook.office365.com (2603:10b6:303:84::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Wed, 21 Sep 2022 14:54:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1NAM11FT054.mail.protection.outlook.com (10.13.174.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Wed, 21 Sep 2022 14:54:28 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 21 Sep 2022 07:54:17 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 21 Sep 2022 07:54:17 -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, 21 Sep 2022 07:54:15 -0700 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , "Ori Kam" Subject: [PATCH 1/3] ethdev: add strict queue to pre-configuration flow hints Date: Wed, 21 Sep 2022 17:54:07 +0300 Message-ID: <20220921145409.511328-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220921145409.511328-1-michaelba@nvidia.com> References: <20220921145409.511328-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: CO1NAM11FT054:EE_|SN7PR12MB7226:EE_ X-MS-Office365-Filtering-Correlation-Id: ef893d07-aa99-49e3-f652-08da9be12ee4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tebzQiS77XvtX1jX5VC8V0XhrDE/CcIW2TE2+vbZNrEA5BaWCWdrthBbWb6WidBPZ2IjBOGJ2ol77FikFrWaazns2pjCt1/bkJxHZzWCwuxoVFPvzBYt8tc8bCAUGhU0ZiPM2NYgpGcp2cBNJRCUu5Dyq35zBDCC3Myx+1fyktfXq5JaGvRFh4DTaSOyLAWj7VN3ag/9n0op2LDVUIfdKfBW7YHjMmeldyhTjL4uKg2ba0V9bZK+dDOhynPG/NU2HXZ3QKl8MHfRjqkPB45RWwg2+EdPDr8kqAi1WMThPorPyvkM2guu1Bx7Jl6HV+1zqTIFlJOvAvdQclUUIApWVhGxnFhch8UXAslKfEz1e8DJ/EgOzHaMZfs63XVDuhSCwUtZpsbnOxSlG7uVbhJoxBgv+cuTJNZ+bEkI1kUQ10Ektywo0SLnTWM2sby5br8pGsCP7otGygRC91F+wMsxVQRpzmGUekT8tMb7X/mPMKpxxiiiywu69lfMuCpXAPK0DfkGrmVdyqZHPTdjU3MKx3EwyZ8Cq7ea/P5Lp+V1cwzjJzOJKBmxr6yfrSOn2Ig0XTWeey7uxPWlTG463uSzDVZXBaiNMnqePvD8BC/crMlasEUwktwpoDhsJx0TvBKHWOjOtaZUk60wI+VzasFWbnGrrbcPYh2kueiXHznLavHMJndAVziqd3VtWasISHQz7sfuBivd6OhAP0uzY7obpw/nm64td0+hFubcFL/QEPeEbjEwMqgeWV5VHdbjOm7logKIELly83ZIzYfRmVvA6A== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199015)(36840700001)(46966006)(40470700004)(2616005)(107886003)(86362001)(6666004)(7696005)(82310400005)(8936002)(41300700001)(26005)(356005)(7636003)(36756003)(6916009)(478600001)(55016003)(70206006)(54906003)(70586007)(1076003)(186003)(316002)(336012)(6286002)(2906002)(8676002)(82740400003)(47076005)(426003)(5660300002)(40460700003)(40480700001)(83380400001)(4326008)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2022 14:54:28.1956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef893d07-aa99-49e3-f652-08da9be12ee4 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7226 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 --- 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 7f50028eb7..a982083d27 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -219,6 +219,7 @@ enum index { CONFIG_COUNTERS_NUMBER, CONFIG_AGING_OBJECTS_NUMBER, CONFIG_METERS_NUMBER, + CONFIG_FLAGS, /* Indirect action arguments */ INDIRECT_ACTION_CREATE, @@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = { CONFIG_COUNTERS_NUMBER, CONFIG_AGING_OBJECTS_NUMBER, CONFIG_METERS_NUMBER, + CONFIG_FLAGS, END, ZERO, }; @@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [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 330e34427d..6c12e0286c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3082,7 +3082,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}] @@ -3233,7 +3233,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 a79f1e7ef0..c552771472 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -4874,6 +4874,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. @@ -4902,6 +4908,10 @@ struct rte_flow_port_info { * @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; + /** + * Port supported flags (RTE_FLOW_PORT_FLAG_*). + */ + uint32_t supported_flags; }; /** @@ -4971,6 +4981,10 @@ struct rte_flow_port_attr { * @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; + /** + * Port flags (RTE_FLOW_PORT_FLAG_*). + */ + uint32_t flags; }; /** -- 2.25.1