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 19F20A0093 for ; Fri, 17 Jun 2022 07:23:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09C1940689; Fri, 17 Jun 2022 07:23:04 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2079.outbound.protection.outlook.com [40.107.94.79]) by mails.dpdk.org (Postfix) with ESMTP id DBC8440689; Fri, 17 Jun 2022 07:23:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DmrvGfzUIjNn/n6uDdsEhUpqFHJQ8yLPybyqB+Ku6nlElmcB1zDrJJQqjWFSwpTeZLyNfmLR7ePULFMnjg6bS+bwxA3no/c3AwlKHqsBr4n31EyVEH3XH5P4cPU5TPBl5rNhWLxm8gdAi35oq0Tf479QtR0Db1fM/k9Q4AOYWk472e1bveRi4/DW/m4msZYbdVTp9ZLBskWpya1p4ZHpMfnxlUds30tHun9Ae9+ugUV8KlRRJdyGBepCYkmbEzxyK4mAmqnicCciw77dlnAfphEc0qVbcTVhuv/M0PuC5GG5UEb9zfUnEkF6yYfAKjBgjVCia60ahpB2nbxDJQCbuA== 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=ShRBQc95dhE2iCLVpp+buq22P9my4LVC+/WldBJK9G8=; b=cgDGPlgXh/0OJpYxMBeT8M7iFVaSkhVlrRlDRFUiciCLllcZm7fxkxR6FcGP5tu7CoVBwQF0rcXp7mqiMaM6ff3Y3mXgthhDmktvqa3ae+j571AAI6tXwTHeMViS08HvyV26fDcsOHTLbG/yWd539QyUDWhlKo9JkkY+zVmeUkKoq4li7CNJEtSx4OluRJ6tfiFdPmmY13DSNQ6HXddbodSY9KiNLKcS3n2Jfnq9E6uzhi7hoE+xoeQLWXvX7/W4lh9CEsAUIWKWYrjEQ4JvuoCRFtOArgpWeANw4t4nKMPoYSlBGg8h9BbNbRP03wC03Ix9/WIjN7e2kpBlLQodKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.com 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=ShRBQc95dhE2iCLVpp+buq22P9my4LVC+/WldBJK9G8=; b=cKZ5zLPxknEnhwm4oghNAJd0L1AVJWRSHghgalvCClmv+M7SfkseUopfA/dW+ErE3cft59AK6eTKeNx5/sF/TnvL+uhoiflhHLzvJ++J5B2fS6j02qw9qcuriK39++HTxgyoBhSr/k/pfulhbPKYMJ0yYed2Voiy/ctHOaDj1gFEgXopUGW59zbAsJ+Yxz7DxdchyGcIC1i1DGN880GkUQnTfhGRC3yD5AT7D+pAQm/LwqYlbvkxp83oAmcvBZKEYjNKw0L1G0oPh3qX5aaq7bBChzJl0MGCh6e3rfQzFiygYA8M/chsFyEmDaUCxTlsjeRZobpI5ONMxdls+x+sxg== Received: from DM5PR13CA0011.namprd13.prod.outlook.com (2603:10b6:3:23::21) by CY4PR1201MB0007.namprd12.prod.outlook.com (2603:10b6:903:d4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.16; Fri, 17 Jun 2022 05:23:00 +0000 Received: from DM6NAM11FT033.eop-nam11.prod.protection.outlook.com (2603:10b6:3:23:cafe::56) by DM5PR13CA0011.outlook.office365.com (2603:10b6:3:23::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.9 via Frontend Transport; Fri, 17 Jun 2022 05:23:00 +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; pr=C Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT033.mail.protection.outlook.com (10.13.172.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Fri, 17 Jun 2022 05:22:59 +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; Fri, 17 Jun 2022 05:22:59 +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; Thu, 16 Jun 2022 22:22:56 -0700 From: Gregory Etelson To: , CC: , , Matan Azrad , Viacheslav Ovsiienko , Ferruh Yigit , Dekel Peled Subject: [PATCH] net/mlx5: fix RSS expansion for patterns with ICMP item Date: Fri, 17 Jun 2022 08:22:38 +0300 Message-ID: <20220617052238.9893-1-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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: 7180eca2-379b-4dbe-1e82-08da502171de X-MS-TrafficTypeDiagnostic: CY4PR1201MB0007:EE_ 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: Jf32/4lRCqij4J4edbBrkMdmDAJqA4BdEuWDt3ajl8l+pAO3j9PPXowToIgg46pk9kL3T02hXffeoo4ateNvUaIi8FO41/6eX5jq5y6JMvvjb2BEFAAFOKXeLtrhPAmLOeyxqKtunUWKMD+8vdCkkGWWlLhlG8X3lwdS6ZS61lLbxNQ6PxP/I7FGLJJHRgxudzTTCHzLdVZDvhGV7lfZ2rNIWAaKB7ta9OdBlGADJSTe/OD7F8HauogxXdP90qutlv8vxf6zEIhgSbNllcP/lnoQ5j8eyAA4a4kh93e6JhwdT+cwTZfkeNUvBq/o5IrPl9CwlNeev5D9aA0RE5Mp59ItxtKLvljdzxIc5KRuzrFN8dJMAgdWz7dLsAix1oKECGa35qdNxcyhmwOGbzoqXT68XByyREcZSgyU8cIdM0U6XXBgQAwiYx06DlSYPa8UvdBl/hLhEAQZqvkqzDHsxUrX3hVEh6+wZLOFo5rOmwm9RPnZ7IaoPVkt7HkVHe437pnUTToxsPea8BoH0GLdL6V0xofe67qLOg2ccO+759yMLVjTYGnn1pb9b3xEPnu0uwutGfQbkM3mZyejj2vSeaJbm1gNfj8wfAK/3SVYjeAfc6uAR2MYuPHMiwiZ2QlgeZ22W44G/zCKrrEGEodnnjwThB+Eq+2McaV+BuDLp3YCo4hU3woXPyPL0xy5qJUl8CwmNIvUkiLjxsB9LqzlQw== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(46966006)(36840700001)(40470700004)(7049001)(36756003)(356005)(8936002)(86362001)(316002)(83380400001)(70586007)(26005)(81166007)(47076005)(40460700003)(6286002)(2616005)(16526019)(336012)(7696005)(1076003)(107886003)(426003)(508600001)(82310400005)(36860700001)(110136005)(55016003)(186003)(5660300002)(54906003)(2906002)(8676002)(70206006)(6666004)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2022 05:22:59.9621 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7180eca2-379b-4dbe-1e82-08da502171de 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: DM6NAM11FT033.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0007 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org MLX5 PMD RSS expansion implementation added L4 UDP or TCP headers after ICMP. For example: ETH / IPv4 / ICMP expanded into ETH / IPv4 / ICMP / {UDP | TCP} ETH / IPv6 / ICMPv6 expanded into ETH / IPv6 / ICMPv6 / {UDP | TCP} The patch updates PMD expansion scheme to handle ICMP and ICMPv6 types as non-expandable for RSS. cc: stable@dpdk.org Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver") Signed-off-by: Gregory Etelson Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 090de0366b..900ec8e4bc 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -150,6 +150,8 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item) case RTE_FLOW_ITEM_TYPE_UDP: case RTE_FLOW_ITEM_TYPE_TCP: case RTE_FLOW_ITEM_TYPE_ESP: + case RTE_FLOW_ITEM_TYPE_ICMP: + case RTE_FLOW_ITEM_TYPE_ICMP6: case RTE_FLOW_ITEM_TYPE_VXLAN: case RTE_FLOW_ITEM_TYPE_NVGRE: case RTE_FLOW_ITEM_TYPE_GRE: @@ -563,10 +565,12 @@ enum mlx5_expansion { MLX5_EXPANSION_OUTER_IPV4_UDP, MLX5_EXPANSION_OUTER_IPV4_TCP, MLX5_EXPANSION_OUTER_IPV4_ESP, + MLX5_EXPANSION_OUTER_IPV4_ICMP, MLX5_EXPANSION_OUTER_IPV6, MLX5_EXPANSION_OUTER_IPV6_UDP, MLX5_EXPANSION_OUTER_IPV6_TCP, MLX5_EXPANSION_OUTER_IPV6_ESP, + MLX5_EXPANSION_OUTER_IPV6_ICMP6, MLX5_EXPANSION_VXLAN, MLX5_EXPANSION_STD_VXLAN, MLX5_EXPANSION_L3_VXLAN, @@ -581,10 +585,12 @@ enum mlx5_expansion { MLX5_EXPANSION_IPV4_UDP, MLX5_EXPANSION_IPV4_TCP, MLX5_EXPANSION_IPV4_ESP, + MLX5_EXPANSION_IPV4_ICMP, MLX5_EXPANSION_IPV6, MLX5_EXPANSION_IPV6_UDP, MLX5_EXPANSION_IPV6_TCP, MLX5_EXPANSION_IPV6_ESP, + MLX5_EXPANSION_IPV6_ICMP6, MLX5_EXPANSION_IPV6_FRAG_EXT, MLX5_EXPANSION_GTP, MLX5_EXPANSION_GENEVE, @@ -620,6 +626,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { (MLX5_EXPANSION_OUTER_IPV4_UDP, MLX5_EXPANSION_OUTER_IPV4_TCP, MLX5_EXPANSION_OUTER_IPV4_ESP, + MLX5_EXPANSION_OUTER_IPV4_ICMP, MLX5_EXPANSION_GRE, MLX5_EXPANSION_NVGRE, MLX5_EXPANSION_IPV4, @@ -645,11 +652,15 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { .type = RTE_FLOW_ITEM_TYPE_ESP, .rss_types = RTE_ETH_RSS_ESP, }, + [MLX5_EXPANSION_OUTER_IPV4_ICMP] = { + .type = RTE_FLOW_ITEM_TYPE_ICMP, + }, [MLX5_EXPANSION_OUTER_IPV6] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT (MLX5_EXPANSION_OUTER_IPV6_UDP, MLX5_EXPANSION_OUTER_IPV6_TCP, MLX5_EXPANSION_OUTER_IPV6_ESP, + MLX5_EXPANSION_OUTER_IPV6_ICMP6, MLX5_EXPANSION_IPV4, MLX5_EXPANSION_IPV6, MLX5_EXPANSION_GRE, @@ -675,6 +686,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { .type = RTE_FLOW_ITEM_TYPE_ESP, .rss_types = RTE_ETH_RSS_ESP, }, + [MLX5_EXPANSION_OUTER_IPV6_ICMP6] = { + .type = RTE_FLOW_ITEM_TYPE_ICMP6, + }, [MLX5_EXPANSION_VXLAN] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH, MLX5_EXPANSION_IPV4, @@ -735,7 +749,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { [MLX5_EXPANSION_IPV4] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4_UDP, MLX5_EXPANSION_IPV4_TCP, - MLX5_EXPANSION_IPV4_ESP), + MLX5_EXPANSION_IPV4_ESP, + MLX5_EXPANSION_IPV4_ICMP), .type = RTE_FLOW_ITEM_TYPE_IPV4, .rss_types = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_FRAG_IPV4 | RTE_ETH_RSS_NONFRAG_IPV4_OTHER, @@ -752,10 +767,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { .type = RTE_FLOW_ITEM_TYPE_ESP, .rss_types = RTE_ETH_RSS_ESP, }, + [MLX5_EXPANSION_IPV4_ICMP] = { + .type = RTE_FLOW_ITEM_TYPE_ICMP, + }, [MLX5_EXPANSION_IPV6] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV6_UDP, MLX5_EXPANSION_IPV6_TCP, MLX5_EXPANSION_IPV6_ESP, + MLX5_EXPANSION_IPV6_ICMP6, MLX5_EXPANSION_IPV6_FRAG_EXT), .type = RTE_FLOW_ITEM_TYPE_IPV6, .rss_types = RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_FRAG_IPV6 | @@ -776,6 +795,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { [MLX5_EXPANSION_IPV6_FRAG_EXT] = { .type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT, }, + [MLX5_EXPANSION_IPV6_ICMP6] = { + .type = RTE_FLOW_ITEM_TYPE_ICMP6, + }, [MLX5_EXPANSION_GTP] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4, MLX5_EXPANSION_IPV6), -- 2.34.1