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 33F2045D69 for ; Thu, 21 Nov 2024 14:33:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D34EA40272; Thu, 21 Nov 2024 14:33:18 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2074.outbound.protection.outlook.com [40.107.101.74]) by mails.dpdk.org (Postfix) with ESMTP id 64A3B40272; Thu, 21 Nov 2024 14:33:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Eq7lPzolTdpNKUMb9VJW5KqPAad/nwll9fECRAAJ2t/R1dTqjNeCFm4Y2dXztZ67B2wPolXF8Iz4DHV/j7gejwFQD7FI8H07QqiO6rh7N5vUKDHD/lEv568nJhJPblboM0lYQ/sU3TirWl6Dsfeg6ixOWuypbfzb9s8xKH6WWzSa7g7C1wooofuuLZgxiJUNZoA72gaClIaE2ZUv/EkPbVIiDQRK4YhjTHi4sDygoubXPYLCFla8EqrI1O/8zT6DHkQSDaec1iBPRHgD7ifoNKNGYplaYOVd4q6Yx8ilChP3nKt4rWGBESDcjXFFUObSKvV8sWblOv172CjZUNSRgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Ye6EXW2QO32VRM846v3UhrztLoj9qo8Gpwv3FGTG8UA=; b=B4WAPO1TxRwdPYTWQKlChMGPSBTCetv2ZppoUL5UWe4bvjk30jqd4d0+N/1F5L5zC0h4HcONF22ti4YoG04x1MTQS3ntFNggAyrDyLbouqIi/zX1hqIBdHc53jJpCFAXxb00efBXVajEuczdE33Q1NlEUltf40PFmr37IuxDEHf3oil8XZIWzeNDCcVV5bYL0Er7icTnSBk1dJRVcCYvVB40ATdwH9HW9fmabqXsG2207rH9Pf/8EwdGPAWJhG9IVspEWfwzoi9b7xqrIPMgs/vT7SDY8wiqtLf0EOW6K6+oQBzYPc6dbRClh7MiUNgC6+YldIlhOvvGFYoKbCRFng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=Ye6EXW2QO32VRM846v3UhrztLoj9qo8Gpwv3FGTG8UA=; b=W43ciR9lzAUW5AazPfPHdvJsDgmPjbkFqhf+xI2WMGIwsNGLHZjfdQpvrS4gZjCpL5+La/erQu8pxcGtqytjKPJtn2iAu1vhy4ckYnofEP8wLEQL1rKpCW1XHLPRtG/igtWPfStm3KDESo3ykGv7OBO5vEjqoryZJEyPOs9vZuzz5lXUtYZvHPaWLJy2GoiFriP1c7WfLax/iqsGVFE2QnRVhVHyxFIuwcGBygDDD3fQR8XBHgF1wrcxV53SriJ0Qht8tqonGPPlaJd0urvxhtoceh6exuf9Y1oumL3DkGgzhs709xMkgBceNN/UDP3poNhYAgx8Ac5ttFQCUO+3BA== Received: from BL6PEPF00016416.NAMP222.PROD.OUTLOOK.COM (2603:10b6:22e:400:0:1004:0:4) by PH0PR12MB7957.namprd12.prod.outlook.com (2603:10b6:510:281::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.22; Thu, 21 Nov 2024 13:33:13 +0000 Received: from BL6PEPF0001AB54.namprd02.prod.outlook.com (2a01:111:f403:f903::3) by BL6PEPF00016416.outlook.office365.com (2603:1036:903:4::a) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.22 via Frontend Transport; Thu, 21 Nov 2024 13:33:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL6PEPF0001AB54.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.16 via Frontend Transport; Thu, 21 Nov 2024 13:33:11 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 21 Nov 2024 05:32:51 -0800 Received: from pegasus01.mtr.labs.mlnx (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.1544.4; Thu, 21 Nov 2024 05:32:49 -0800 From: Alexander Kozyrev To: CC: , , , , , , Subject: [PATCH] net/mlx5: fix RSS hash for non-RSS CQE zipping Date: Thu, 21 Nov 2024 15:32:21 +0200 Message-ID: <20241121133231.914815-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB54:EE_|PH0PR12MB7957:EE_ X-MS-Office365-Filtering-Correlation-Id: dbd4a2e3-bb7e-4fcc-bda4-08dd0a310b87 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?k1V0zOO91k9pZEiZ+M6X/VAJnUkNnhoi+zFOJlTpqF25zKHsS30uUh1DW4DQ?= =?us-ascii?Q?uoKaPmTO1w2zY0kjZxAFLSejPHV3/UQtoHQar4m8Nmy8UhwJ0lX1ZFdUj5ub?= =?us-ascii?Q?zW4vYU6W7Sj41Roep35EFOUTd3OCMGFk7y4s7R8RdmfwE4hr6NUR5gZKB3tr?= =?us-ascii?Q?q7bD12e+CwdiINJKB1FO/K6YQj2cqQT7GDHMo7i/61RaZQKszQjT2RZ1W6mM?= =?us-ascii?Q?fRlvZAmFzaE/VzO0TIXKkBCed4lMYy4dR5IwRmoJIQVeU7KaR98y/M/LzCUg?= =?us-ascii?Q?DuSJSZA+B6x0lSett6RjbdkaHbBtZcu6A/S9UhDIaFRfREGnNwAIBQrLqdOw?= =?us-ascii?Q?A1zCDyjuicWodWBlxovR7oqgIK2E76y61HWvKrRZhDoHzuIveIUFlivdoFcC?= =?us-ascii?Q?XCCiNcEZCknOEfZRZGBOQqmwd+FK/djSi0HXKFKG4MeSVIkhT5SxRbk8R83y?= =?us-ascii?Q?l/5j1ivb0u0+0OHxipZH6D7idGcdSmH3KYM9XTqACD7OTlpiJUE8sQK6r8LE?= =?us-ascii?Q?zlQazt3r86DiT6h46qIvys4JGUQqcb0kjJYwrLnZeXkicXygG5W2k+hxhc8i?= =?us-ascii?Q?FCGJfhtPrD36y4bBBP+YFTiydLWe4u/MCiHV7XgWmpjUiVGNdSiaDZnGH2wF?= =?us-ascii?Q?nWdo0CPc9iXTtBSo0ig19eeOfzXM580sQdNqYamPbxVskvUSSvZou6UcCSJ5?= =?us-ascii?Q?NxPfq9nmkqUJHLwIGe7BJKXRauZP++TZLkMogm0hUQiPHdYLnpvvyAe1ecww?= =?us-ascii?Q?gztqefWmBqp4SUL+7DC6cn3UFpMux4n5PJxFa4HmbwO/KBkL31cCskmV4++b?= =?us-ascii?Q?k5q+rDL5njnpNwEc6MiJ4Eck0JNW9NNbS412c4PK3uP1UBoPiuoET5Z3dzrC?= =?us-ascii?Q?6KN9NOHf6qHU9Bea5oMb/LU/bBYxEQU3B8LTJChq9aIuvT+sZZJeKII+iOqH?= =?us-ascii?Q?roMbq6JvHubhs24rtcCs/3+Tl/tq95x3QFvM3wlqIrJYFatMo1HT2QqI5b/p?= =?us-ascii?Q?bDF//Dg60FDB5u2t1boC6pPskvec+v0toAKixLi12/w4yPX8lDIJwDfX4nfV?= =?us-ascii?Q?4sMdEjNC4wu1WSmsCIaJULf38F74tNaEWupDmMdMQ6sWNf6ptpLua/7q6/U7?= =?us-ascii?Q?6iHPP2NDnPCh6BdhGQ2sgxpzGb+ek/I/M85PDAo65e0yQgTn4ZY5aZcCj/hV?= =?us-ascii?Q?z//ZcBIFfkHqadUhd5yKmX5CyAZjde2y8VmeiRB9X05XNQoGsQZLonMrwWcA?= =?us-ascii?Q?+2RlJOyydoc99g8ZCwpXtliyCXo0qcSccRkiAWxe8ZyYqyatCEcdv/knSUey?= =?us-ascii?Q?0xdVnEBzRbfYhXHdJw+HX0PwpKTmjjisdagFF2j3g/dbXkItynqRLJFha6O1?= =?us-ascii?Q?VcuTjQlumMqyWqPJAeOywOZxOHJkJJqaK+Ky/uBkjhv04AAqqg=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2024 13:33:11.7567 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dbd4a2e3-bb7e-4fcc-bda4-08dd0a310b87 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB54.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7957 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 Take the RSS hash value for the title packet for flow tag and packet header CQE zipping formats. Fixes: 54c2d46b16 ("net/mlx5: support flow tag and packet header miniCQEs") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev --- drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 9 +++++---- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 9 +++++---- drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h index 240987d03d..18452cc047 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h @@ -452,6 +452,7 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, (uint32_t)t_pkt->ol_flags, (uint32_t)t_pkt->ol_flags, (uint32_t)t_pkt->ol_flags}; + const uint32_t hash_rss = t_pkt->hash.rss; ol_flags_mask = (__vector unsigned char) vec_or((__vector unsigned long)ol_flags_mask, @@ -470,10 +471,10 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, ((__vector unsigned int)ol_flags)[2]; elts[pos + 3]->ol_flags = ((__vector unsigned int)ol_flags)[3]; - elts[pos]->hash.rss = 0; - elts[pos + 1]->hash.rss = 0; - elts[pos + 2]->hash.rss = 0; - elts[pos + 3]->hash.rss = 0; + elts[pos]->hash.rss = hash_rss; + elts[pos + 1]->hash.rss = hash_rss; + elts[pos + 2]->hash.rss = hash_rss; + elts[pos + 3]->hash.rss = hash_rss; } if (rxq->dynf_meta) { int32_t offs = rxq->flow_meta_offset; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h index dc1d30753d..653a10867d 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h @@ -330,6 +330,7 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, vdupq_n_u32(RTE_MBUF_F_RX_RSS_HASH); const uint32x4_t rearm_flags = vdupq_n_u32((uint32_t)t_pkt->ol_flags); + const uint32_t hash_rss = t_pkt->hash.rss; ol_flags_mask = vorrq_u32(ol_flags_mask, hash_flags); ol_flags = vorrq_u32(ol_flags, @@ -338,10 +339,10 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, elts[pos + 1]->ol_flags = vgetq_lane_u32(ol_flags, 2); elts[pos + 2]->ol_flags = vgetq_lane_u32(ol_flags, 1); elts[pos + 3]->ol_flags = vgetq_lane_u32(ol_flags, 0); - elts[pos]->hash.rss = 0; - elts[pos + 1]->hash.rss = 0; - elts[pos + 2]->hash.rss = 0; - elts[pos + 3]->hash.rss = 0; + elts[pos]->hash.rss = hash_rss; + elts[pos + 1]->hash.rss = hash_rss; + elts[pos + 2]->hash.rss = hash_rss; + elts[pos + 3]->hash.rss = hash_rss; } if (rxq->dynf_meta) { int32_t offs = rxq->flow_meta_offset; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h index 81a177fce7..fd47677db1 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h @@ -314,6 +314,7 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, _mm_set1_epi32(RTE_MBUF_F_RX_RSS_HASH); const __m128i rearm_flags = _mm_set1_epi32((uint32_t)t_pkt->ol_flags); + const uint32_t hash_rss = t_pkt->hash.rss; ol_flags_mask = _mm_or_si128(ol_flags_mask, hash_flags); ol_flags = _mm_or_si128(ol_flags, @@ -326,10 +327,10 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, _mm_extract_epi32(ol_flags, 2); elts[pos + 3]->ol_flags = _mm_extract_epi32(ol_flags, 3); - elts[pos]->hash.rss = 0; - elts[pos + 1]->hash.rss = 0; - elts[pos + 2]->hash.rss = 0; - elts[pos + 3]->hash.rss = 0; + elts[pos]->hash.rss = hash_rss; + elts[pos + 1]->hash.rss = hash_rss; + elts[pos + 2]->hash.rss = hash_rss; + elts[pos + 3]->hash.rss = hash_rss; } if (rxq->dynf_meta) { int32_t offs = rxq->flow_meta_offset; -- 2.43.5