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 4617D41C27; Tue, 7 Feb 2023 03:58:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5D2C40F18; Tue, 7 Feb 2023 03:58:03 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2075.outbound.protection.outlook.com [40.107.237.75]) by mails.dpdk.org (Postfix) with ESMTP id 02CB940ED9 for ; Tue, 7 Feb 2023 03:58:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aXKxgXzg0KiPhrGorWFHqAXqkdQi+qSQJ9IhZS5ExLMIzqAoN7VwHZic0ehPuiiV7ZSEuYAa5rg/BWE54rkSRo3hYwdls2gv9H1j4aq9kNtoBTOVTcQo9AYOr0hl1WZaUk/kJNoO0S1cG/R7urD4nU0Abes6HxOHPxO9aLk/48qlmhIAr4aay1VkUnx0ED+xM2pBmMmHLDSCQseOAkw4Bnn8cBUhJrkzdJi0Px5A7uCFLIN4YyqLsqJqFriJyvSa53jtMbsiGAw8v4iVd4Y80zjUTo9UdNvKTskxzdrujkKVKQpJJTSYRb8JDw+Q2l2FTV7ZJGJvpcxrllsCXQ4JIg== 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=vaBvBGFXOBLbFnCdAKx8gjCBxqyBrozEtLMsxLeqbP8=; b=EA+TvDLL0CzCzsxJdfgdZPSZMqTUGFMp+TCSNR6idV7pGBkd+ibNWy+NBnk2q5Z3RCYnFd6H/LFrRAC3nhg7boPjvct4DeWBTZU50KUm4ICsEnF+YqGQqBBbEQEclytjb4OBvd/BPfFbYgECAuKLs/kf7reyyYd+2KMh8rB15zVPf2N394hL/1w+KZNhDdez0siRFcpy3n5E34XXb1MQYQdSdpjTd4iUBZaQ3sJgxmP1p2VocSsP1A4s+Y8oBYmfMqH1dWgXLClNSeOZKtO6OGzK9d8b+QzK/mG0y43IWyg6X60MWHGdCfXQcCe0LnYkusZACXKHTgQzfB0I66h4TA== 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=vaBvBGFXOBLbFnCdAKx8gjCBxqyBrozEtLMsxLeqbP8=; b=I2Z1s7z0i4hDi79jMGr0GCDWu2JPbPCCtCwpMsO7YyhkHKqZSJw7WMPM4asHyEg+ubuFnNVaGxFQevsvep3xDMUydGbh7zaZBeTOqGyyP0jnGc2CAldRQRCLJXWAFYKuk6GcyChLDpUXC7fKxOIWxEmxS0kAB2QTWmnJ3oxq4ud/On9qq/qnLKq/mZecEOXaq+YA3rsjaj1R0ki6mxJfGahNj+Gy+UeRn7yYXOX19ryK8BPVfqB7g5s/ibyQaCBwyNiFqfZB6RcW/nA39K0wc7dLCwZ8kCVxv/rJt4LhXipFn9iXJhm/OnSk2Bd3AFLLvV2rwTdoxvtDAkfh7YxvJQ== Received: from BN9PR03CA0414.namprd03.prod.outlook.com (2603:10b6:408:111::29) by DS7PR12MB5741.namprd12.prod.outlook.com (2603:10b6:8:70::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Tue, 7 Feb 2023 02:57:59 +0000 Received: from BN8NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:408:111:cafe::1) by BN9PR03CA0414.outlook.office365.com (2603:10b6:408:111::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.35 via Frontend Transport; Tue, 7 Feb 2023 02:57:59 +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 BN8NAM11FT032.mail.protection.outlook.com (10.13.177.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.32 via Frontend Transport; Tue, 7 Feb 2023 02:57:59 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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.36; Mon, 6 Feb 2023 18:57:47 -0800 Received: from nvidia.com (10.126.231.37) 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.36; Mon, 6 Feb 2023 18:57:44 -0800 From: Rongwei Liu To: , , , , CC: , Ferruh Yigit , "Andrew Rybchenko" Subject: [PATCH v5] ethdev: add flow rule group description Date: Tue, 7 Feb 2023 04:57:32 +0200 Message-ID: <20230207025732.2890157-1-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230118154447.595231-2-rongweil@nvidia.com> References: <20230118154447.595231-2-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT032:EE_|DS7PR12MB5741:EE_ X-MS-Office365-Filtering-Correlation-Id: aafcaf5e-20a1-456d-846c-08db08b71edc X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eq2du6W4YuPprZlhsthvipxjmRK+Y4o5NaSPnyFEjsRtXNYbceeR3oSnShE6fTbHews5qVLYEVCoZW8znNKmEKXdcyr+mHqipPQBzTJVYTb1dGiccVn0iekixvm9477AiepwgBjW2jH7WLQr7lzdvIZ8aY3fI036PC03pVaY2oBz0FlfvVUxZLQpni0sDbNoclQA4+q5H+R+5Gz1oi/szNiDcXb3XTaFPIuqqI8DAvhqpiqAF93DxV76zKhrdyuL0L09FAZe2Hj/6+g9Le8AfUuJ0vhQCi7dk7WymPg9f2aBc614EWuM7ebABPLQoeUFsudP4ns6SZ21QNkOX+49qGbrZNc6bFVglctPs5SsnydNItqgC+UyXiGAaW/yzoxqeqYWkYXFzZ4FGBne9E2naAUULdmYhF3h8b070lBA4Utb3v3LRGB3X1lIwQuQojXGcLslvNsPmfCoMmx0/fKbewIoPZkU4JiWlkTQtlEdewKsHu0EOTs8/a2iDWVWNWmK8Sk0ikPCnYeCZ3Rgcu1fbypXb0x+P3kFCuQbkKdonff2wLG1DbagqfeM6vVTQcqsNgq27OOeHldxS67sWaTvuAp4P6WwTVPNLuwU8wbvBcAuWX6Hc/V+8d15nznOLAKOOzjYIdPgbineT8Yc6Fl01maZLkCPVDnaAGnNNlbjyG1dndOb9ovEYcHnvjWwVGXC8+1lumT2xQBEiR8jYQR16w== 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:(13230025)(4636009)(396003)(39860400002)(136003)(346002)(376002)(451199018)(46966006)(36840700001)(40470700004)(36756003)(40460700003)(41300700001)(7696005)(316002)(54906003)(1076003)(8676002)(6666004)(110136005)(478600001)(5660300002)(2906002)(70586007)(70206006)(8936002)(4326008)(36860700001)(356005)(26005)(82740400003)(7636003)(6286002)(55016003)(83380400001)(40480700001)(86362001)(426003)(16526019)(186003)(2616005)(336012)(47076005)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2023 02:57:59.0831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aafcaf5e-20a1-456d-846c-08db08b71edc 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: BN8NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5741 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 more sentences to describe the group concepts and define group 0 as root group for traffic to search a hit rule. Signed-off-by: Rongwei Liu Acked-by: Ori Kam --- lib/ethdev/rte_flow.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index b60987db4b..e71ac0c199 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -86,7 +86,18 @@ extern "C" { * but may be valid in a few cases. */ struct rte_flow_attr { - uint32_t group; /**< Priority group. */ + /** + * A group is a superset of multiple rules. + * The default group is 0 and is processed for all packets. + * The group 0 of bifurcated drivers is shared with the kernel. + * Rules in other groups are processed only if the group is chained + * by a jump action from a previously matched rule. + * It means the group hierarchy is made by the flow rules, + * and the group 0 is the hierarchy root. + * Note there is no automatic dead loop protection. + * @see rte_flow_action_jump + */ + uint32_t group; uint32_t priority; /**< Rule priority level within group. */ /** * The rule in question applies to ingress traffic (non-"transfer"). -- 2.27.0