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 09540A0A0C; Fri, 2 Jul 2021 10:35:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E940A4135D; Fri, 2 Jul 2021 10:35:32 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by mails.dpdk.org (Postfix) with ESMTP id 9BD1B41354; Fri, 2 Jul 2021 10:35:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BkmJD8erVEj51+hhXkcACHykmCrSJ5YfiF4VFeVtce0WWnXFBjVmLCiPIVnLlAL2NahF+LLw3XsvextpeDoTNry+C5MV8ljB4jnTWVrTI53EfrqjgchhHwiTpbpRMsQASrcdV4HDwT7HcU0pbJS6T2oLweP9yZmxjWsmCMkZ/EqUPZCDAoULHX6cjh+IRTJKr0UW7Go2Bi86KR6lvigYTtcMqBNBfd/BEIdaIWvgS3DNi2v+O+RlGEXk2cau3qyMCVAWUbPaoL9pABNbtzN8nDzOmkx1Z/pntojCvKWeei6Im2iRaT6eNbu7yKoRKiNUn7R5fVsf4+XIrh49zJBT0w== 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-SenderADCheck; bh=7V8q2flM/l+lVf90T0m3493v3gZgA6NzrJBfcsyxXJA=; b=izmiUFASDNODAT1iB2yNFzexEA1lUAfh2bIbWY9Gx6V93XQZ3SJOaGglEJASbnQQ/9k7bb8PFowzvwSab5yCDbkfV74CBLqwqwSk82CHizQvWZvFeftEumK3sND/9EYl/0UlSZAd+UIHJQSE/gWy7ED7pXRK1g3MS9+OJgbHIJAeIxGPZfwMm9lsKQOo0ugm5JSKLXxDCOgaG9ZvoDEzREhoaMwDgjz2Gh0s9frlhFuXfLqUqSJMFQEjNTRKlzuGC3dm3CXSm4oFOQXJZ5yNJXIv3lxNBJQS1o1xGAUclWJLdt7+0jQtwGxOYNugfb816FlAIEKIszMscxOjNBKRjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=7V8q2flM/l+lVf90T0m3493v3gZgA6NzrJBfcsyxXJA=; b=RPorl70WtGfisTtbGM/buSxjjI9ayCMgeGVHylPqtk4sjvPMrGXIQ5wnyGyOVDQ/oPp6fCbyzSQX/Km6K6VOMCb+4nzvpgLv8IIoLewmnf8cPmU3BGQhumI91jRrdZWGksb6ngyZ5hcp/zA8N3O4d6wUV8RLTuLEWXcFU1uKmsu+bgKRsGZIjuHa2P1AwJiv5Ole1K2unS7TOt9cXrVhka/GJtmauhI1ICR7ois6MQvyPWWxP9ULimvCoTn3MVqn1/W75BOd9snB43DOSlKzW75VL1W7DaGXkaGJ3SV2a7Z9CMMRKhK/n/KSjsqskfLl32AOlRQEF6SPIoZGG/69bA== Received: from MW3PR05CA0002.namprd05.prod.outlook.com (2603:10b6:303:2b::7) by MN2PR12MB4782.namprd12.prod.outlook.com (2603:10b6:208:a3::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Fri, 2 Jul 2021 08:35:25 +0000 Received: from CO1NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2b:cafe::3e) by MW3PR05CA0002.outlook.office365.com (2603:10b6:303:2b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.8 via Frontend Transport; Fri, 2 Jul 2021 08:35:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT019.mail.protection.outlook.com (10.13.175.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4287.22 via Frontend Transport; Fri, 2 Jul 2021 08:35:24 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 2 Jul 2021 08:35:11 +0000 From: Xiaoyu Min To: Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Nelio Laranjeiro , Yongseok Koh CC: , Date: Fri, 2 Jul 2021 16:34:47 +0800 Message-ID: <241761cd8c3ec04b8b777aedc623c2b838d5ffd0.1625213344.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0746477-3da1-4f59-a8a1-08d93d345676 X-MS-TrafficTypeDiagnostic: MN2PR12MB4782: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wSZ8iRHHq50hTwAs+XqsQaLLrVya+EZi8I/krK6I3jcw12issIXIhH38raW0K1c7f4EhTxLkXdoV8qW047t0flZy3eS8iMQMqixMuO1KWZgsDjy2dMySsAozpvJ+/CYnZ9r3zLU+Ffa1QpAqSshPJ8z1DdlKZ8O0AqABVvopESe2GhSMnSYVmQlnF611LgLrOw2Wienx66ilJjs/cjJG20kjWn23uDAznYR4l09NIgPxWISOj7Pw/syukkFGXKYvv+S1r2wmlA+Iz51WaFunRTHzbA2aNUT4A5qMbpAoDoHlGVkjpntsQOPnn48LczNhopGJbVbZSFpiTOOYphA1DA86attsXD2wa/Cf1O01mMb5zmTOewzhiNZtHPLjnPMQg2kTbWi/JCEPEaq64nnoyzhvsO+FP73W/bunLpc/6whZCby89m9wQS/ihrzYwMb5RTMrifRS3p2Ap94v69ESJCouIuj2KuFld/W/0nhyo+PjMlUDuVqmqXzt65ObgQ0WFw9uY7BhyiMG9dJRzM35LVWz9gqVdKsq3tij+prrbag5q2QJJAwN9//UK/xuKmP5YTjxwUL07qkLgYmxUOX++NOUQgV5wy3d8ZDNGIluN2BXkXGtvgEquHFTAByidbINl2k4eCLPte7DPbpNqfiQqqX8B6Wp/rXREIA0LGP81TXdgOKo3kCdlvWP9hRkzvR7WDd4/5FefPcc0GZriXElVQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(46966006)(36840700001)(478600001)(5660300002)(336012)(4326008)(83380400001)(26005)(8676002)(82740400003)(2616005)(86362001)(8936002)(7636003)(16526019)(316002)(186003)(36756003)(47076005)(70586007)(70206006)(6286002)(110136005)(6666004)(54906003)(36860700001)(2906002)(55016002)(82310400003)(7696005)(426003)(36906005)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2021 08:35:24.6737 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0746477-3da1-4f59-a8a1-08d93d345676 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4782 Subject: [dpdk-dev] [PATCH 2/3] net/mlx5: fix MPLS RSS expansion 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 Sender: "dev" MPLSoUDP and MPLSoGRE are supported by PMD from rte flow point of view. RSS expansion doesn't support above but, instead, supports normal MPLS over L2, which actually will be rejected by PMD. This patch removes RSS expansion support of the MPLS over L2 and adds support of MPLSoUDP and MPLSoGRE. In addition to above, support for eth over MPLS expansion is added too. Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min --- drivers/net/mlx5/mlx5_flow.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 21032a29a3..a13b89e3a7 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -131,6 +131,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item) case RTE_FLOW_ITEM_TYPE_NVGRE: case RTE_FLOW_ITEM_TYPE_GRE: case RTE_FLOW_ITEM_TYPE_GENEVE: + case RTE_FLOW_ITEM_TYPE_MPLS: return true; default: break; @@ -474,8 +475,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { }, [MLX5_EXPANSION_OUTER_ETH] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_OUTER_IPV4, - MLX5_EXPANSION_OUTER_IPV6, - MLX5_EXPANSION_MPLS), + MLX5_EXPANSION_OUTER_IPV6), .type = RTE_FLOW_ITEM_TYPE_ETH, .rss_types = 0, }, @@ -503,7 +503,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { }, [MLX5_EXPANSION_OUTER_IPV4_UDP] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN, - MLX5_EXPANSION_VXLAN_GPE), + MLX5_EXPANSION_VXLAN_GPE, + MLX5_EXPANSION_MPLS), .type = RTE_FLOW_ITEM_TYPE_UDP, .rss_types = ETH_RSS_NONFRAG_IPV4_UDP, }, @@ -525,7 +526,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { }, [MLX5_EXPANSION_OUTER_IPV6_UDP] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN, - MLX5_EXPANSION_VXLAN_GPE), + MLX5_EXPANSION_VXLAN_GPE, + MLX5_EXPANSION_MPLS), .type = RTE_FLOW_ITEM_TYPE_UDP, .rss_types = ETH_RSS_NONFRAG_IPV6_UDP, }, @@ -548,12 +550,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { [MLX5_EXPANSION_GRE] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4, MLX5_EXPANSION_IPV6, - MLX5_EXPANSION_GRE_KEY), + MLX5_EXPANSION_GRE_KEY, + MLX5_EXPANSION_MPLS), .type = RTE_FLOW_ITEM_TYPE_GRE, }, [MLX5_EXPANSION_GRE_KEY] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4, - MLX5_EXPANSION_IPV6), + MLX5_EXPANSION_IPV6, + MLX5_EXPANSION_MPLS), .type = RTE_FLOW_ITEM_TYPE_GRE_KEY, .optional = 1, }, @@ -563,7 +567,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { }, [MLX5_EXPANSION_MPLS] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4, - MLX5_EXPANSION_IPV6), + MLX5_EXPANSION_IPV6, + MLX5_EXPANSION_ETH), .type = RTE_FLOW_ITEM_TYPE_MPLS, }, [MLX5_EXPANSION_ETH] = { -- 2.32.0