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 B35C1A050B; Thu, 7 Apr 2022 07:31:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7533410DC; Thu, 7 Apr 2022 07:31:26 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) by mails.dpdk.org (Postfix) with ESMTP id F20D24014F for ; Thu, 7 Apr 2022 07:31:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1fllkkvDo7tnfZMYAbZHg3pRIyLEoEygF9kJJkE/6tkhXd46uOezq3Vv8beSIopT7Z9UweJh5LNOCACMg+xef+ePYM6XETgwNukyVRh0hErQhX0A43n2ZchEdYxJMsY0DwWXwQ4gMHYwQ/+e+RdudJ0ZNkxtUa4EGPOZR/qoeVrSxo7z9ZbX5qAcb5txiHpUjUUJGf0SSVbgsRuaM2JSXfuTAInDuLIB32es4/sTrNKpw01ABtNXJVJtqQ+wFn+bR6svC5MI6XaTCYASQoxqp4Cuu8Ptmim+r2SrUeArsepQKjYlqKxZoRUdaR7BpsB2X0Ca5Yi1QRVON04E/MJCQ== 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=jvy9N190YISZZ4GG/MSj/5LL4FBzP/fxsGRJsNhcdyw=; b=F/RNckPJQ0b2y6FV7qBhUbZRylHvO3zE+H5fI6uRHXo95PAYqNFm6Qm+zqEFTzjPYew+tAMjUzPvYi//XHxDdf7GTKRYJmxKeMoEBiCzeLeWJ/qimRO5LVu0MhGlnOtWydiDZ3+AYbFjQM0UM5RoBDN0hLsqKNjDBEg4D6dbILFgukFbu04SVkCMTkYsR3ZZt0xzimXzHefr7hhrc6gf0MB3zvs0e2OQE/PZh0wXYWrFF+7B/8lPKh7EoDXTfg33tskU9SH0T0PNc06TRouZuIwyWsqAy4EIV4SDiraaYpu5gDhxhWq9Byn/7iR5j9i8zCklcrAACyWa6GXNH1FGMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) 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=jvy9N190YISZZ4GG/MSj/5LL4FBzP/fxsGRJsNhcdyw=; b=ABP3Q1Q+I2b61lTM8QBzEsbO+zpmahxebm5Ssz6g/LkW7HkSaqDSZlu186RqP4nsNoVUV3K28leYCoYdX1r42cyNxEHE54rxlg4sok5GScxUE+/Zc5Nteg8Z1XOhWrIQMxjaF6c34Dzoo4Sbh2r3bW4+ZPsIOcb/SRim3IdrSaD7k3m+02Ob/iD4NOtyy6aKcxOe2j0fHAuD8VF52cCumGNztxR5F1ioSQPQSd0IQj1hHecRhtJ4IgFlTGuWjBuwsv6b7viXOFU9nIRi+rac3vHdz7ZNuBCPPdSDFHJG1ve2K7etzrShzzqdI/Q++MnDt2/0ZNBJxYm8liwT3RKDMg== Received: from BN6PR2001CA0009.namprd20.prod.outlook.com (2603:10b6:404:b4::19) by BN8PR12MB3363.namprd12.prod.outlook.com (2603:10b6:408:48::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Thu, 7 Apr 2022 05:31:18 +0000 Received: from BN8NAM11FT062.eop-nam11.prod.protection.outlook.com (2603:10b6:404:b4:cafe::6) by BN6PR2001CA0009.outlook.office365.com (2603:10b6:404:b4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22 via Frontend Transport; Thu, 7 Apr 2022 05:31:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT062.mail.protection.outlook.com (10.13.177.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5144.20 via Frontend Transport; Thu, 7 Apr 2022 05:31:17 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 7 Apr 2022 05:31:16 +0000 Received: from nvidia.com (10.126.230.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, 6 Apr 2022 22:31:12 -0700 From: Xiaoyu Min To: Ori Kam , Thomas Monjalon , "Ferruh Yigit" , Andrew Rybchenko CC: Subject: [RFC 1/2] ethdev: port flags for pre-configuration flow hints Date: Thu, 7 Apr 2022 13:30:46 +0800 Message-ID: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 380d1f06-bceb-4f48-3564-08da1857d6ef X-MS-TrafficTypeDiagnostic: BN8PR12MB3363: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: REHLjqQsFHRUwk8Mr8iJmPvZNeyEine81GlcZmN/X6TP53dYct6mOcLLzlooufJDjemNRlul6JMfSfORElrgUkibUy9C2oe4vUUHUk6KhU3inILytPzd4UzOIv84O5RzOs2gTHCRfQM3Dm0hFgUoU99gfeYDGMU/DjQrNiMEJz/eJjKF1Bm05mOhcgWI2vy7mF6RG+onUVqdVgXH0sCY593pTB+37u+bGBNe+/T39TwzYIx/422SIe1lvU6VJIUCbTuTp49Dv30ADfmlXKr7sE9gNzVDwyzJc1QorDtRraY37qR1YXpDXGGgmFVOYJm/bx9NUpRtznsbxBYqL1c+STwuVNLXRLlUM7wlMOt+DYIGtSRg/oEDUZDY6Q77qv3TNfBPv+ZUTL9o8+V2geUvmvKmxmcYwoS0ISJl0oROXviTJ44rWWlBoKM3h6pIqP95hHVPdcKHM2Mq0Wp/wpaiaov3VQws9duE2JcGBrLCipKrmKJ/nUTJRoVVTh0Oj1797esFXHcvERLRZyVomiJOJ5L2li1DdSWZrttmtqsLGJA1CCNnMxqCBoffzhBkly1GgZ6fK3FbJVOrjxGMLzKIVxuP1oW4tq4yYa7D2iMtdJcHzEDtAYAzqZr/l5bLTqI2fRNvu1FKAzR5D9MJJjA184JRdki9IDY0vMNGdJhygJTorRXpJxZT1YBW92UecTWX9lL6jUroLZASf1z3I6zJhQ== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(36756003)(186003)(55016003)(508600001)(82310400005)(6666004)(8936002)(5660300002)(26005)(2616005)(2906002)(16526019)(81166007)(70586007)(47076005)(4326008)(8676002)(70206006)(426003)(336012)(7696005)(316002)(356005)(40460700003)(6286002)(86362001)(36860700001)(110136005)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2022 05:31:17.1694 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 380d1f06-bceb-4f48-3564-08da1857d6ef 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.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT062.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3363 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 then tranditional one by using hits provided by application in initialization phase. In addition to the current hints we have in port attr, more hints could be proivded by application about it's behaviour. One example is how the application do with the same flow: 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 extanded to cover more situations. Signed-off-by: Xiaoyu Min --- lib/ethdev/rte_flow.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index d8827dd184..578dd837f5 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -4875,6 +4875,17 @@ rte_flow_flex_item_release(uint16_t port_id, const struct rte_flow_item_flex_handle *handle, struct rte_flow_error *error); +/** + * The flags of rte flow port + */ +enum rte_flow_port_flag { + /** + * All flow operations for one specified flow will _strictlly_ happen + * on the same queue (create/destroy/query/update). + */ + RTE_FLOW_PORT_FLAG_STRICT_QUEUE = RTE_BIT32(0), +}; + /** * @warning * @b EXPERIMENTAL: this API may change without prior notice. @@ -4972,6 +4983,11 @@ struct rte_flow_port_attr { * @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; + /** + * Port flags. + * @see enum rte_flow_port_flag + */ + enum rte_flow_port_flag flags; }; /** -- 2.35.1