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 57C89A0547; Wed, 1 Jun 2022 09:39:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 497F740E09; Wed, 1 Jun 2022 09:39:46 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2070.outbound.protection.outlook.com [40.107.92.70]) by mails.dpdk.org (Postfix) with ESMTP id C6BF740DF7 for ; Wed, 1 Jun 2022 09:39:44 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a9VyBDpHpc/s0ZgxuxQXcfJFULfXsZFHpWIHgjA0AInbHMhoz4CyyDlDwFTzZ8K2RdgAlgIqCCkiW3TaVrpJQV/4XmfmBib24aWIEt8cpxe7WbnzDl6ytdKtkMz1+Vcr/u0BQFv2oj5Ki0qElEuQ9Qs0vYP98Z4j2yodOO6UMtuJC3B47q+ZDGuzq0RSheZhzWlD9aJzck6E60vp7PsYgcFb/c2dgd2ehfm99z0BAeNJEcaovGG3H2pHRQyi29jzKplcUp9rU/vJ2RuDdWlLaFmVgui4wzvv/KBHFwboNqbubblqBMhAqxRcgoX2NumqCtZInYbJWwRGfDbIE7z/4Q== 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=aSiegVonyL7LN/41aBNoQvqCvRYU2P36bBXMLvFi3eM=; b=R+FdQ2R0YbsIis4CV7EuI4ZsyTi+glKfh1wiWs3cnVry4Z4gG/ZxHe7GAnKysCRDFfN31P0pnT79T4dPOz9NvhWFONrepWq159ddAFlldbi0iYlVg5hGyMoVPhqxC6FWb4icqatSAP5LdS2XzBCoF/24Nc4qT6vBf7Gb5Vee/gVef7qekJOTblx5YGsNz5vzmSVv/LCOk5IYzmWy3p6Aa6Xxl+uZWSDKC+smiL7xEse0TmbN2HVQrlBiyQrt7yODcskiyj60y1Dco+GRUClZj3kj7o1fBvpbobeWRH2jnon7+zOVlx+tkejONXsUlhnaJ8ZG8nz9qh7cxqswK3FyDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=oktetlabs.ru 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=aSiegVonyL7LN/41aBNoQvqCvRYU2P36bBXMLvFi3eM=; b=EOmLgu5NRTcDn4zHhmgQSwARms9RWre3E9Q7Yk4z34EHjXfKhTw/Tx1qvgXGLGHfJyI3LVPK+Npq7Ho59XBaomWE/1zeredprU82ArgBaNUBlEI26gyvGRBvL3q0qwilWfpnwk2LL8l+JtxOkz+Q66yVT6XOfTj8M8gzrsaxl90HpY74gEk8IuAlQHKRUtCdCSlnYY5SmgSlr+StkoQTfAazMDO8JjOvh7z1iM9Ee2tty0kP9+v7EIi06zz14C/NvoLaeIkBZkn0/urC6neCBxNrkGUrQNUkmXYHrt7AmdAkyeTDGxeNzPHRhUFsy0+hHO3hWzteip3TtfzuyBzkDg== Received: from MWHPR10CA0015.namprd10.prod.outlook.com (2603:10b6:301::25) by DM4PR12MB6589.namprd12.prod.outlook.com (2603:10b6:8:b4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Wed, 1 Jun 2022 07:39:43 +0000 Received: from CO1NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:301:0:cafe::1b) by MWHPR10CA0015.outlook.office365.com (2603:10b6:301::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12 via Frontend Transport; Wed, 1 Jun 2022 07:39:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT055.mail.protection.outlook.com (10.13.175.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5314.12 via Frontend Transport; Wed, 1 Jun 2022 07:39:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 1 Jun 2022 07:39:40 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 1 Jun 2022 00:39:38 -0700 From: Xiaoyu Min To: , Ori Kam , Ferruh Yigit , Andrew Rybchenko CC: Subject: [RFC v2 1/2] ethdev: port flags for pre-configuration flow hints Date: Wed, 1 Jun 2022 15:39:18 +0800 Message-ID: <608febf8d5d3c434a1eddb2e56f425ebbd6ff0b4.1654063912.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd585039-46b8-4992-d288-08da43a1e3a5 X-MS-TrafficTypeDiagnostic: DM4PR12MB6589:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pcogULH+40tE7mBxGPFSMvnUxznJCQjz2r6r4YgyEsoarxNTssyhXvkVfmVPzRpKmQjzz6iwvJsqiaig/rQNz4x+Q/+f3jd6Hupf06dpILhC72q4hYPDqg8iM/DWZTMlZdZO1f3YQOvB+01YfcjMW1feq1Zg4v9M9CRdv+qeGD+rXBEl0WPtQQSAtjgYbvVkQBe5MrzthK67Q6JrD0ui+F2Y4AUvY5oYB7k+p8RhTTBRCmHmnQ6DCxiI4fzqgr4FGYmsEejVFCSSLpcmLkZ9SmwAdbNv0CcbP4PRp3c+oN3Tz7sVdFrua7ioDNUY+iqRHLcW0pqbvkfRgVAd7iohM7k130TZOJ0+bwTHK6DBfQsZsjoUCGRzFxVp0UrrXaja30tMQcF80dLbN8OX+VPxWOX4F1kunaZLQS8qjC+tyVtp4iueQ7uUcLoW9rCpHJJlOL1v6G2ZV3fyZ6SU7P+SiE5b7ULehgchL8P9Q6ba43mlIY8yAipsBGLQDVcPnHN9OvyQkCYPV7T07BEBZdPG8xSL4Z7D93YiLVtrga4cHu9VRBCXPm4SCfsZmdRd4Jfz2XmcBvwMiUvTbxo67QxBGlZ5ICdyIjDC6513swB3995O0zpbpDCxWXSOLXGGyA68Ccl3k3V4ma9pdhAZRbcjg+7t3i/VEk+OxfsY2RolyzSjX96xsvrYctkNhDYR8fmco12TqO2artoNt6SowDxiJg== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(36860700001)(83380400001)(6666004)(7696005)(82310400005)(26005)(316002)(186003)(16526019)(6286002)(47076005)(426003)(336012)(508600001)(36756003)(8676002)(55016003)(2616005)(110136005)(40460700003)(5660300002)(8936002)(86362001)(70586007)(356005)(70206006)(81166007)(4326008)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 07:39:41.3187 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd585039-46b8-4992-d288-08da43a1e3a5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6589 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: Xiaoyu Min --- lib/ethdev/rte_flow.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index d8827dd184..38439fcd1d 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -4948,6 +4948,12 @@ rte_flow_info_get(uint16_t port_id, struct rte_flow_queue_info *queue_info, 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. @@ -4972,6 +4978,11 @@ struct rte_flow_port_attr { * @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; + /** + * Port flags. + * @see RTE_FLOW_PORT_FLAG_STRICT_QUEUE + */ + uint32_t flags; }; /** -- 2.36.1