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 398D2A034F for ; Wed, 10 Nov 2021 07:33:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 312D8410E0; Wed, 10 Nov 2021 07:33:24 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2067.outbound.protection.outlook.com [40.107.243.67]) by mails.dpdk.org (Postfix) with ESMTP id 4755840E28 for ; Wed, 10 Nov 2021 07:33:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fNmjhHZyWcQSbKS4zUxdJA3xSsfYkGGSoczXAc5ZVjehDnnxsnJ+UBMDc22ZGKjOSQSf8zFn+i7TsABXQ89eElnwbxzbGrvNcB2JR+G3Ka0j58kklQjQq6jiMAcckwTfw/2mx7t1yCojZDTpy4VGI3xusCD5JoLur3+er4uWVBcsM25Kouec452nFAuEIlpC2LwOGtwUDB/YYmDqkmGn4LYYF8jGuubpX+gPEnIl5LSF73sI5/4rhke/xbSQ5WxCnTGmJbRvTJCTDNshMhXholnjD7EbadUmPkCPLQ79iKHYOOpxeXnLt54SYD5KowSvoYqfLnEsaxPvIR8k2pcCfg== 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=T0mPB4VuGyJ1FQ2JK/KccuE5uvKvA2G/iLI/Ca47FEY=; b=H8rrq7SZe1F+bjxnmlCUQSF9ixunDyCKnC3s4PkUWnmrhMpZnKmJkJ4UqwkYgKmZVnVZ0xgmlT8H/gD4jQvZifsrdiaYUDj/HpYOZRy/2Jts2IUrpS6bNghbvD0udrOkWvDNjpAvnV35pl3ODBRoU0ju/HHag56TA5FEobUO7zgFi014L8arxUfabnfCNTrBmqXsVngM5B8dwb3PXjXYEcJnClDEOBnG1NGq+h7Rws5vewZOKDqcseWCwgLss9UDHL2oUw1JBesS4lZTNdlNGst9uT9WSOIrQqKQ5pzRSRFX5OikRZphqvy57s6Mvk/3mMw6o6kPROuC7GSvyNY29A== 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=quarantine sp=quarantine 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=T0mPB4VuGyJ1FQ2JK/KccuE5uvKvA2G/iLI/Ca47FEY=; b=jle041C4ZHPwH8qXHbhOgsT34jgUvbq6Wu66msKS4arfwZnIceAKpmvVOFcjXIrl657GnWXIFKDb8FtUODDo0Tp27eB8+dZl+3kmKamNOcwmt/3Zth6WnwQQMHYpnxTui2TfId4rnuvOhe7dw4y6RH0OJ96WaZ98Yarf1+PpfREfLEDPiZEraabjHS07YyvalKkamfdjOWrX+Un0ysc/cwwxWLdTgSzUT93W4RsGcbWbW5Mogs6ZpEbJmcDrJ7RJTyrBcud9JjfI94x8tmSmbgLFG2ZMV6csXvueYDYo+tWIQGHJ/xuZ++0anBqI6EWi4MbVhMrTU+FxjFl/pQF9Mg== Received: from DM6PR08CA0057.namprd08.prod.outlook.com (2603:10b6:5:1e0::31) by DM6PR12MB3194.namprd12.prod.outlook.com (2603:10b6:5:184::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:33:21 +0000 Received: from DM6NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::dc) by DM6PR08CA0057.outlook.office365.com (2603:10b6:5:1e0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:33:21 +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 DM6NAM11FT016.mail.protection.outlook.com (10.13.173.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:33:21 +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.18; Wed, 10 Nov 2021 06:33:19 +0000 From: Xueming Li To: Dmitry Kozlyuk CC: Luca Boccassi , Matan Azrad , "dpdk stable" Date: Wed, 10 Nov 2021 14:28:13 +0800 Message-ID: <20211110063216.2744012-10-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1dc8c228-8234-475d-1973-08d9a413fd88 X-MS-TrafficTypeDiagnostic: DM6PR12MB3194: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6/KQwf4ppKCTT1S3vE84/6O+MGs+zhCPJBrWAGsxs5IbXcMILr6kqRlKDNv2u7xj8iCR2QBZRi0v1MmqsJJtNENhBQ3BGreJbjWKNU4sqp8kTz80fOPSRj9unvY2lzny7EjPfHqnPchoz8i6g0y7afzaWqd3lAsV5yIlS1PFLhiQBYQQ3C9TJvfo+1hfySsNcAp5B86u7XTKwJDE5qpZLnaTNJYu3P2SsBPiaV6VBnhhASTI/yNgrJjIqiSyNYn9Ndwnfexeb7Ys3ABRM5R6EezPY3zS/yawG0l3u0PjAY40RyEGjznF9I9wovCHbQ2anw7G7m8b5CG+JSMn/7kFZxVJmhkYjxDbXIwZedXMF3DMOVTj7Wwizhs9UqABW69StuTIToiWQMqP0E37Z8xEIGpjp2tdIq4mgouuQhkLhuWUy2EE/9krHO/nYfKsYlPe7SYZK/8of9GDV63fyBN8XRsjERWc/Z4oQ97OKclbx1dtJbO8N6f/2DIe9mwqV0NMANaAYaGLHb9nHy5GDFUcyzBuSXmgm8B3JBN1lliEeM4VvuqpHXk4RfJ64JytrYRJmxJaiYMce7CTaDZCPAfQMuHuBTXFgVexzq9psRGFAuA3k5+xPryDRLHiYy7Bhr+ZYBwbGFR4eTLzP/+JMz5ma9mIxMkSabOjWUt3O6zDL17mmKFes5GYcLVAgSKzajXbtxWpjWphXQqjowNRLuHDrPdOh/ZsG9lNVdk2DcutLVPZYWvtGgFGyhElO3dWzPkG8k9PtcJ2yHCPYFbHzEWIf3tBl7OSWSvxy+F2iiF4cI4hUbblDpphGio/W5tTkJSZlI1hQwDtogkZms/qFKMhGQ== 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)(46966006)(36840700001)(36756003)(36906005)(53546011)(6666004)(5660300002)(26005)(356005)(8936002)(508600001)(83380400001)(70206006)(6636002)(966005)(2616005)(8676002)(336012)(55016002)(426003)(2906002)(6286002)(70586007)(37006003)(36860700001)(1076003)(4001150100001)(6862004)(7696005)(47076005)(316002)(86362001)(4326008)(54906003)(7636003)(16526019)(82310400003)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:33:21.3395 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1dc8c228-8234-475d-1973-08d9a413fd88 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: DM6NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3194 Subject: [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Thanks. Xueming Li --- >From 4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Mon, 9 Aug 2021 17:26:46 +0300 Subject: [PATCH] net/mlx5: fix eCPRI matching Cc: Xueming Li [ upstream commit 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 ] When an ETH or VLAN flow item directly preceding ECPRI (i. e. a pattern for eCPRI over Ethernet) did not specify the eCPRI protocol, matches were not restricted to eCPRI traffic. For example, "eth / ecpri / end" pattern behaved as "eth / end". Implicitly add Ethernet type condition, so that "eth / ecpri / end" behaves as "eth type is 0xAEFE / end". Fixes: daa38a8924a0 ("net/mlx5: add flow translation of eCPRI header") Signed-off-by: Dmitry Kozlyuk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 1793683421..0b1a488edb 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -7927,12 +7927,13 @@ flow_dv_translate_item_gtp(void *matcher, void *key, * Flow matcher value. * @param[in] item * Flow pattern to translate. - * @param[in] samples - * Sample IDs to be used in the matching. + * @param[in] last_item + * Last item flags. */ static void flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher, - void *key, const struct rte_flow_item *item) + void *key, const struct rte_flow_item *item, + uint64_t last_item) { struct mlx5_priv *priv = dev->data->dev_private; const struct rte_flow_item_ecpri *ecpri_m = item->mask; @@ -7945,6 +7946,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher, void *dw_m; void *dw_v; + /* + * In case of eCPRI over Ethernet, if EtherType is not specified, + * match on eCPRI EtherType implicitly. + */ + if (last_item & MLX5_FLOW_LAYER_OUTER_L2) { + void *hdrs_m, *hdrs_v, *l2m, *l2v; + + hdrs_m = MLX5_ADDR_OF(fte_match_param, matcher, outer_headers); + hdrs_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers); + l2m = MLX5_ADDR_OF(fte_match_set_lyr_2_4, hdrs_m, ethertype); + l2v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, hdrs_v, ethertype); + if (*(uint16_t *)l2m == 0 && *(uint16_t *)l2v == 0) { + *(uint16_t *)l2m = UINT16_MAX; + *(uint16_t *)l2v = RTE_BE16(RTE_ETHER_TYPE_ECPRI); + } + } if (!ecpri_v) return; if (!ecpri_m) @@ -10603,7 +10620,8 @@ flow_dv_translate(struct rte_eth_dev *dev, dev_flow->dv.value.size = MLX5_ST_SZ_BYTES(fte_match_param); flow_dv_translate_item_ecpri(dev, match_mask, - match_value, items); + match_value, items, + last_item); /* No other protocol should follow eCPRI layer. */ last_item = MLX5_FLOW_LAYER_ECPRI; break; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:02.529371657 +0800 +++ 0009-net-mlx5-fix-eCPRI-matching.patch 2021-11-10 14:17:01.747413767 +0800 @@ -1 +1 @@ -From 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 Mon Sep 17 00:00:00 2001 +From 4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index 31d857030f..5bb6d89a3f 100644 +index 1793683421..0b1a488edb 100644 @@ -25 +27 @@ -@@ -9976,12 +9976,13 @@ flow_dv_translate_item_gtp_psc(void *matcher, void *key, +@@ -7927,12 +7927,13 @@ flow_dv_translate_item_gtp(void *matcher, void *key, @@ -42 +44 @@ -@@ -9994,6 +9995,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher, +@@ -7945,6 +7946,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher, @@ -65,3 +67,3 @@ -@@ -13474,7 +13491,8 @@ flow_dv_translate(struct rte_eth_dev *dev, - "cannot create eCPRI parser"); - } +@@ -10603,7 +10620,8 @@ flow_dv_translate(struct rte_eth_dev *dev, + dev_flow->dv.value.size = + MLX5_ST_SZ_BYTES(fte_match_param);