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 4A44E43CAD for ; Thu, 14 Mar 2024 01:12:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4191D42E73; Thu, 14 Mar 2024 01:12:33 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id C4C9D42E5D for ; Thu, 14 Mar 2024 01:12:31 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33e17342ea7so212491f8f.2 for ; Wed, 13 Mar 2024 17:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710375151; x=1710979951; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5mGlQN4NL550Hl7ONikTtQJN3QNz4rCn/ED9jztYOvQ=; b=K6a3tAP8WaoGsnrRE3NDz7OVGdsZQARDh30iVAJM64ZhgoM8ZhhD7P8Q+21DAd10Sx SRwbn0zziDuJ65q5dN2gEScTakLRKgIux9WC+fCm8RtovlIPlhLyNpVTQDMNvZuICnTY dymk/BqWMxtVhZUN/L9CckcRnC/FKRIwOYR0AwLlKwRsVFqacXNvqs5GpvGrO1aaoIO8 JW293pMRPn/5KQzPdIPBqEPbNQtvpw0A16emeJ2G3+qGmJgt+wKqZVDpqbpT8FSyBIv2 kSjhKW51h4UJPQFoVK7HD3FTYA7HfdK1lhV+2DEAXwtvoyIGfZHUt5tRXjdo3Ict2Iz1 lWig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710375151; x=1710979951; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5mGlQN4NL550Hl7ONikTtQJN3QNz4rCn/ED9jztYOvQ=; b=odxfVyyyvND7N8HKfi0mGI7iEtoswigRTKivM4z4ilt3ZAIeinFvwQW19FGa64nZXN NqoyHHlVKznwzF469qeTlRvguc6cIiXlRIvhcL9QN8H9k07/AZeWcG0hX/dksxYGYQbI JOHaN7o4c+SRJgMA5Zj/5C3WoUMXykHquzAQbuda7eFKDSNg2ZeF1DLCKnc2COZTOD5d yKGmILzx0z1M1HBITWTjDVtKrBV1U8OWODJITFm2II4Ehmqk7O4VSDpwglGZ+LjYECWz TBu0G3/usapL6zAjuK1oKyITg2UjmJUIOMx3Ql8FWwnnjXYT5NogWXBK79bGiOguOjHR r6Aw== X-Forwarded-Encrypted: i=1; AJvYcCW4bkK8k9tRDH4Qyq2jtU/mvyNIUdmQHHP8WM+sRZQlPxEPKRVsqOYdq0opB5YRxKJ4j8w6pAv77/ICDfMUf20= X-Gm-Message-State: AOJu0YzRwy5C4SuATdqHjKXnuo3kvY29X/9Sm+lSTrGdyTboDu1b7LXN 9OBrvc0LfJWaj8kuxRWMScxbn1y/X+75cC4Pgkp9z9/cUoFJyBMsg25QwoEM4SY= X-Google-Smtp-Source: AGHT+IGTWYJPBu7unF7lHktePe5FAZc2/mwsqWsCVd1lIRrQG9Qn74yXaQQ2z0TEvEfVRsq33d0alg== X-Received: by 2002:a05:6000:110:b0:33e:c539:977d with SMTP id o16-20020a056000011000b0033ec539977dmr108311wrx.22.1710375151316; Wed, 13 Mar 2024 17:12:31 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id f2-20020adff8c2000000b0033ea499c645sm299458wrq.4.2024.03.13.17.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 17:12:30 -0700 (PDT) From: luca.boccassi@gmail.com To: Michael Baum Cc: Erez Shitrit , Matan Azrad , dpdk stable Subject: patch 'net/mlx5/hws: enable multiple integrity items' has been queued to stable release 22.11.5 Date: Thu, 14 Mar 2024 00:09:43 +0000 Message-Id: <20240314000957.2810803-47-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240314000957.2810803-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-102-luca.boccassi@gmail.com> <20240314000957.2810803-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/16/24. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/325c88d078153ecc36f5dab892a5a8396e5f6cde Thanks. Luca Boccassi --- >From 325c88d078153ecc36f5dab892a5a8396e5f6cde Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Wed, 28 Feb 2024 11:50:55 +0200 Subject: [PATCH] net/mlx5/hws: enable multiple integrity items [ upstream commit 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b ] The integrity item uses the DW "oks1" in header layout. It includes the all supported bits for both inner and outer. When item is integrity type, the relevant bits are turned on and all DW is submitted. When user provides more then single integrity item in same pattern, the last one overrides the values were submitted before. This is problematic when user wants to match integrity bits for both inner and outer in same pattern, he cannot merge them into single item since rte_flow API provides encapsulation level field to match either inner or outer. This patch avoids the overriding values, when "oks1" is submitted, operator "or" is used instead of regular set. Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer") Signed-off-by: Michael Baum Reviewed-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index b3d8d9504e..d81d66523a 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -31,6 +31,10 @@ (bit_off))); \ } while (0) +/* Getter function based on bit offset and mask, for 32bit DW*/ +#define DR_GET_32(p, byte_off, bit_off, mask) \ + ((rte_be_to_cpu_32(*((const rte_be32_t *)(p) + ((byte_off) / 4))) >> (bit_off)) & (mask)) + /* Setter function based on bit offset and mask */ #define DR_SET(p, v, byte_off, bit_off, mask) \ do { \ @@ -271,7 +275,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc, { bool inner = (fc->fname == MLX5DR_DEFINER_FNAME_INTEGRITY_I); const struct rte_flow_item_integrity *v = item_spec; - uint32_t ok1_bits = 0; + uint32_t ok1_bits = DR_GET_32(tag, fc->byte_off, fc->bit_off, fc->bit_mask); if (v->l3_ok) ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) | -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-14 00:09:22.882320867 +0000 +++ 0047-net-mlx5-hws-enable-multiple-integrity-items.patch 2024-03-14 00:09:20.681616571 +0000 @@ -1 +1 @@ -From 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b Mon Sep 17 00:00:00 2001 +From 325c88d078153ecc36f5dab892a5a8396e5f6cde Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ -index e036aca781..0e15aafb8a 100644 +index b3d8d9504e..d81d66523a 100644 @@ -33 +34 @@ -@@ -44,6 +44,10 @@ +@@ -31,6 +31,10 @@ @@ -44 +45 @@ -@@ -509,7 +513,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc, +@@ -271,7 +275,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc, @@ -52 +53 @@ - ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) : + ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) |