From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E269C27D786; Tue, 27 May 2025 17:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748367814; cv=none; b=WNA4rEXbTS7leesH1kdP7yBqheoSs9gNm3cIKygbhar0zruwe4eyQK5Z+FQoPGaEpU6t2CuatzEugfGgEM4Cao3xkTxw8DwgZOsjf161zt45/e6UCTqc/PVGsiYdrnfRBgk44zxVcHOc+h3mjBd2RyvhqTr5rjBzydNUteyrrqc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748367814; c=relaxed/simple; bh=D1UREOCT8Zqy8z24KzxKahLSfYUtIrs3PbByzcRODSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V/DnySjPxqmC3iIVh45sbYhQESpIUl6YW8nitXxRnnDwiOnC47Hp1J4kBZm2dhsWumJkdHZV5w6qP8ByBhV/zxHAkpOteenE503UbefOUTnMCyOZDOsuhMYHV+8q8mEjk5YX6OzFzosDS5df13Nmozamzi0pulEYDwGbtlRYAvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nQtGWBXm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nQtGWBXm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3BAFC4CEEA; Tue, 27 May 2025 17:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748367813; bh=D1UREOCT8Zqy8z24KzxKahLSfYUtIrs3PbByzcRODSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nQtGWBXmwJKHelHR6tywtc9rdSGpgL8LmjndAMjevfIG0z4CiF7IvShSkfF34bDr1 zX/WZ5cEJcFnQjOAmFt/qy7aK+mh9H4Qq0M6NvjB/2H68BnHz4acmqqxe8sSUkGjag 0QnoMJcsR7g1/tdThLrJwISXRf5ZZlJA+E+bzbaQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Lazar , Dragos Tatulea , Tariq Toukan , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.14 506/783] net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB Date: Tue, 27 May 2025 18:25:03 +0200 Message-ID: <20250527162533.744760593@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexei Lazar [ Upstream commit 95b9606b15bb3ce1198d28d2393dd0e1f0a5f3e9 ] Current loopback test validation ignores non-linear SKB case in the SKB access, which can lead to failures in scenarios such as when HW GRO is enabled. Linearize the SKB so both cases will be handled. Signed-off-by: Alexei Lazar Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250209101716.112774-15-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c index 1d60465cc2ca4..2f7a543feca62 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c @@ -166,6 +166,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb, struct udphdr *udph; struct iphdr *iph; + if (skb_linearize(skb)) + goto out; + /* We are only going to peek, no need to clone the SKB */ if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb)) goto out; -- 2.39.5