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 2F547432E1; Thu, 9 Nov 2023 09:41:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EC7342E3A; Thu, 9 Nov 2023 09:41:28 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2077.outbound.protection.outlook.com [40.107.93.77]) by mails.dpdk.org (Postfix) with ESMTP id 5010E42E26; Thu, 9 Nov 2023 09:41:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OglsgSRrUAQk6xvyOC4c7R4zJaPkXe1FZEdtu6wOt9lS28twcI8kwEka/ObFFdaK7ZQJ6RMfVwrSkghptzDeObWoWbxDaBt7z47VrQFThD8EbBl24Kao/x9ZcQ4LGmB9IG5eFJm/HOOENVYhLGalcjBxoY2EPfsZABTPout2/W/ACbA+06Mhyj4fndxyWQDH4Z5Gwhe8ZjslYZcZoZ4eRsjVsCbqoxpRmZ1wruGIclI3yhx6Qwz00fZm9IoiB+z37+FcEH4XDFWtV/CIVaRexLAn5TjtZ7wIDb6eXsch6gCGEkJ70K0oVXI6UMVjD/Di7hcnqo8aHYeRAWPg0LOJdA== 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=RyfazT532Q0oZ3z60pDK/FwHV8sYvvlE5jsbnAPjaOs=; b=FvFOUVhLkLBbr82rhkng0MectCGZ/lpNUQo3yhOBuv+aaz2XdChDOVL6hEsAoUsplS43j3FmUAt+bgS+qnSo7wPNlCdvKTuJcnuzH70aqA8qg9toqRbo5EVGht5SaQ7fO6/C9feDxnhJtkLboq7R0VTUlppH56iQtymRipanPWjXERY4Qjf4FvDGLHxE22VWmxE2KNSYBm4VPFFXHyT/S83LGosT0y7O6MySQasXs9fNm29sWnzza0tX7yF7e5DG7DjTCkeP+EurZO+LA1Fz4tYPfAPSCYDMYbdtt7icsKm/pVHYuCXNhfuANwtd/NX5jdBd+liDCzFU4sBYNUo5jA== 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 (0) 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=RyfazT532Q0oZ3z60pDK/FwHV8sYvvlE5jsbnAPjaOs=; b=exjtM8BYA6V2I2bz3rB7APsO+h/1j48dV9bNHpCEBtqsbz1vS7HoYdkAoaqWNfgCM6nzptSJGI374tClpJro86cXhSI0mEHwpxy1gwC3My7u+af0euf7ictWfPfPE496NgBFKPu8Lj/ZIvNBt8srKuIWBAqT7M3gNy1jIOt41WPd33eO+NT3YwRJH+AA3a/oJyF9QoGW07FXSZLXgVZli2cHGWiWI5vjSEi4L5/D7NxhXZyP69W8uCs/AoDJdNSMQ9gpX3qPaNlE+5E8H+YHYYEeOWpzGFbx1vpZRFaIQAnNC87Ls34nM7/wfC7rW26fOpuk+BGzHIK8ZI6aPkr1nA== Received: from DM6PR03CA0064.namprd03.prod.outlook.com (2603:10b6:5:100::41) by SN7PR12MB7155.namprd12.prod.outlook.com (2603:10b6:806:2a6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.18; Thu, 9 Nov 2023 08:41:23 +0000 Received: from DS3PEPF000099D8.namprd04.prod.outlook.com (2603:10b6:5:100:cafe::92) by DM6PR03CA0064.outlook.office365.com (2603:10b6:5:100::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29 via Frontend Transport; Thu, 9 Nov 2023 08:41:23 +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 DS3PEPF000099D8.mail.protection.outlook.com (10.167.17.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Thu, 9 Nov 2023 08:41:23 +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.41; Thu, 9 Nov 2023 00:41:14 -0800 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.41; Thu, 9 Nov 2023 00:41:12 -0800 From: Rongwei Liu To: , , , , , CC: , Erez Shitrit Subject: [PATCH v1 1/2] net/mlx5/hws: disable IPv6 routing extension relaxed mode Date: Thu, 9 Nov 2023 10:40:56 +0200 Message-ID: <20231109084057.452476-2-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231109084057.452476-1-rongweil@nvidia.com> References: <20231109084057.452476-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] 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: DS3PEPF000099D8:EE_|SN7PR12MB7155:EE_ X-MS-Office365-Filtering-Correlation-Id: c1893143-d71f-4202-4b70-08dbe0ffa792 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: Uh7v35oocYaLxR7umqKFiaoE0qL7v1smg9UFRKELNwqCKHosHJh3bbBs2dK2chzMU9oPB6EKN7BqG/l3GOBqbotVVA2VtQtDIHlsG2FlWmUhs43sP7gOc1DJeyu3vmrKo33u5m/AahpFpK5craQ5VErIhZ8QXHOzQNO/kcwoSUmfEZq/Jc7H8xPh8x0bgBjzfsH2R5grN/F45C9sSaoevWFVgfvrGu/Y4n84CKiN8x9CwdryIEXGf7yB1wn0ZoUFVkmN+2AGVZDGiHBWyE2kXZ1kDt2SzzJ9Ygt2Pc0nqjzSOLpQjqIdikC9YIWKuilWa0iG6U3AGaELcrDrsB3/mmDHYxQtY6YMyOiO0ccIHo2DLUpbJKFgvjkqJCwicbEvV5D+8J3nAsGZxpH4ekfceX2MeIatc7eItU6Nk2/OoU3UxY+aGv1KQq47wGTHIFEo8UX9hFiQXwBRWmcIYoAh3hrQbJVcfaN7wtjJKemUi+5e7TlEgiR942RtjW5EGPbpYzcDHAd+INJ8BpqQTmCCgch5nleDqcOhpMFHqVfZpBfLs8Eqn14IuQAmolqS/z0wjOYfGi9RrsGYcscF6UxKMSjqTwqS3IrCBySQQsSNjD6FLqkBzFp3oWfqgQl5ILh5PlR7YO1BUBrS9ESBDdHNqZggzziAhEIKy124PLCJ0x0q8g1FFdAL6iXO0cLMjIWN2kfqY41yUMsql7roYt8MxnpVpAeK9xxxXGqcKGAeRkfj8CipFZE4Ao83vA4TczQt 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:(13230031)(4636009)(39860400002)(136003)(376002)(346002)(396003)(230922051799003)(451199024)(64100799003)(1800799009)(82310400011)(186009)(46966006)(40470700004)(36840700001)(336012)(40460700003)(426003)(6666004)(40480700001)(55016003)(2906002)(36756003)(110136005)(36860700001)(47076005)(356005)(7636003)(82740400003)(70586007)(316002)(54906003)(70206006)(8676002)(8936002)(86362001)(4326008)(478600001)(2616005)(7696005)(5660300002)(26005)(41300700001)(16526019)(6286002)(1076003)(107886003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2023 08:41:23.4159 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1893143-d71f-4202-4b70-08dbe0ffa792 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: DS3PEPF000099D8.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7155 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 When relaxed mode is set, definer only programs the fields with mask in the pattern template. Assume a template like "ipv6_routing_ext ext_next_hdr mask 0xff ext_type mask 0xff / udp dst mask 0xffff" and rule like "ipv6_routing_ext ext_next_hdr spec 17 ext_next_hdr mask 0xff ext_type spec 4 ext_type mask 0xff / udp dst spec 100 dst mask 0xffff", there is a potential mis-matching. 1. User sends first packet as: Ether()/IPv6()/IPv6ExtHdrSegmentRouting()/UDP(sport=100,dport=200) Miss due to unexpected UDP dport. 2. User sends 2nd packet as: Ether()/IPv6()/UDP(sport=100,dport=100) Packet hit. Hardware cached the IPv6 routing extension information in the 1st packet and plus the UDP dport in the 2nd packet, it matches the rule by mistake. Signed-off-by: Rongwei Liu Cc: stable@dpdk.org Reviewed-by: Erez Shitrit Acked-by: Suanming Mou --- drivers/net/mlx5/hws/mlx5dr_definer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index 7dffbfb9b9..c0ccde64e1 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -2143,6 +2143,9 @@ mlx5dr_definer_conv_item_ipv6_routing_ext(struct mlx5dr_definer_conv_data *cd, fc->tag_mask_set = &mlx5dr_definer_ones_set; DR_CALC_SET(fc, eth_l3, protocol_next_header, inner); } + } else { + rte_errno = ENOTSUP; + return rte_errno; } if (!m) -- 2.27.0