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 AC75B455AD for ; Mon, 15 Jul 2024 17:29:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A82F840DCE; Mon, 15 Jul 2024 17:29:58 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id D307840E01 for ; Mon, 15 Jul 2024 17:29:56 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4266dc7591fso30489435e9.0 for ; Mon, 15 Jul 2024 08:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057396; x=1721662196; 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=XTbVL6ihBE+j9KDBSiKBd/eESGCNLbt+PeAlokhTNNs=; b=dXI6kQREkW4VOM6TR+U34Cn0FZUqYLsnFDDzz8ZU1L6ItAcE104U3sYbkzneA2Qwa2 4C1tmnKiqUlCBidiTkt8ELOYhAe2JSokuy+pmCtpHVH83olTIeKNFx32iV66t9VZ3vRx EIMzRuNZ+o9qG0STxo6JvDYj/0ZVPKcP6M4CYWX37FsG/Kkr5wMYXsrw1LD+c63FA1bw C09EHz5RRf0ATQPhVuwNUuOoC9MJZJQzsf7qK/n239fb58TSffi95pcvDrddqYbQKB0n kuKRmG7lGZH8mAAny4JZ9Wc4CNybDlmKt7HVdYMkfgFVgrxEJlZAHrfzgwl3uPLa8mii NP5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057396; x=1721662196; 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=XTbVL6ihBE+j9KDBSiKBd/eESGCNLbt+PeAlokhTNNs=; b=BTK00PxjhRCd45BtXKsCMEpZUIrLjy3IueSa4Kl4yIJjy2k5Ffg9GpacWh8JVW3WtW Idk8oFzwYQtzV8Ofc9fyVqjXAOxPt+kuPFVFUT/iu1LR3Y0S33CRcpD3yjXR4dU9VXFt EvXpuQ4ZmmyJLdcRUaSuJHt5HZUnpdMPrk0dNfyk90r65FaCnOiZlIOseYhtjCE18UsB GjdnrW4Xy1cnq5AXq3JcgWodF+d9RumUmxnMNpD8ZVcmXqaGKdxs69ZRP6G6aRrzr1U9 I9Kbj9B5WZKi8bps3AS/HqK4PgaJqoAeaJuYpnu6CitEFqGKdge/5+g/JDr1V6KT1SqA JMzQ== X-Forwarded-Encrypted: i=1; AJvYcCU3/hX/JBHbmn4pwd4CgsvjdrLN9fGwUBsou3DdWFCKoFhAQmX0J2s08j37LbjNYhDfpq150wapWEkUN0LbP2M= X-Gm-Message-State: AOJu0YxT+GdtW15rygVZQ5nUMaPGK5NoSDVK4ZJciMWG5pM7k82iNvcb i/SlEsStdasyhGS/j0XVJ7M81jSHlxVq8aguHUMaLd8TZgmsfgs5NrMhJo85NLA= X-Google-Smtp-Source: AGHT+IEEEptzn+FGLgEIn5/DItr9CRgAdN3aZbDgNMbORd54P9Uge+/AqSyuvNNNa0ZpcL7uhtnO6A== X-Received: by 2002:a05:600c:6a11:b0:425:7c95:75d0 with SMTP id 5b1f17b1804b1-426707d7cb5mr131672255e9.18.1721057396437; Mon, 15 Jul 2024 08:29:56 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f2cc32esm126596385e9.35.2024.07.15.08.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:55 -0700 (PDT) From: luca.boccassi@gmail.com To: Yahui Cao Cc: Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix masking when reading context' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:32 +0100 Message-Id: <20240715152704.2229503-54-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/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/e804d4471528425931bd578192ab115780a3ecd6 Thanks. Luca Boccassi --- >From e804d4471528425931bd578192ab115780a3ecd6 Mon Sep 17 00:00:00 2001 From: Yahui Cao Date: Wed, 26 Jun 2024 12:42:14 +0100 Subject: [PATCH] net/ice/base: fix masking when reading context [ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ] No need to invert mask since we only reserve the masked bits instead of clear them. Fixes: a03c714bfe0b ("net/ice/base: add two helper functions") Signed-off-by: Yahui Cao Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index ac67411ebd..92a520daf2 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA); - dest_byte &= ~(mask); + dest_byte &= mask; dest_byte >>= shift_width; @@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) /* the data in the memory is stored as little endian so mask it * correctly */ - src_word &= ~(CPU_TO_LE16(mask)); + src_word &= CPU_TO_LE16(mask); /* get the data back into host order before shifting */ dest_word = LE16_TO_CPU(src_word); @@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) /* the data in the memory is stored as little endian so mask it * correctly */ - src_dword &= ~(CPU_TO_LE32(mask)); + src_dword &= CPU_TO_LE32(mask); /* get the data back into host order before shifting */ dest_dword = LE32_TO_CPU(src_dword); @@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) /* the data in the memory is stored as little endian so mask it * correctly */ - src_qword &= ~(CPU_TO_LE64(mask)); + src_qword &= CPU_TO_LE64(mask); /* get the data back into host order before shifting */ dest_qword = LE64_TO_CPU(src_qword); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:37.350738786 +0100 +++ 0054-net-ice-base-fix-masking-when-reading-context.patch 2024-07-15 16:19:34.624207659 +0100 @@ -1 +1 @@ -From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001 +From e804d4471528425931bd578192ab115780a3ecd6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index c14f66d55b..9a9c8f86e5 100644 +index ac67411ebd..92a520daf2 100644 @@ -23 +24 @@ -@@ -5014,7 +5014,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) @@ -25 +26 @@ - ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA); + ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA); @@ -32 +33 @@ -@@ -5054,7 +5054,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) @@ -41 +42 @@ -@@ -5105,7 +5105,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info) @@ -50 +51 @@ -@@ -5156,7 +5156,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)