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 BA26E19FA9C; Thu, 6 Jun 2024 14:20:31 +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=1717683631; cv=none; b=q7IBl5zBVO4OBiUlzl190SwR8VTCOUB/BmVhngCTzDaMo4G0zViq1AzQyAb27i3J6LImTYMXDjHnmrbaZjvIfXXGOGKtt1i3v0Qeqej8/2SW4g1l3ujcf3EGcJusVW1otAEqEkirHHnKMt5KNIbjzHP+khm5lu2csoBrvvBZFbg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683631; c=relaxed/simple; bh=/cE+X/+97EYafsoYhuJZFsGMYpcZaHlflMw/WZjP9is=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dp7TqWNHktFpw03KLa0g9ZvF8KIHgV2vAV+fXE5EsZM1WqliRlqJKZeYRATOfH+9i1ntE/0aF+Haai5IQdQe8XI/Xrm1At/OKNHUmoIgu7WUDWdsU5FZtElne9pzOv+2SHYqCoDwBL4Wl62qh1CakjH5R6MolZxt1tYSZhYZIhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p5UVz8M/; 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="p5UVz8M/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4576BC32781; Thu, 6 Jun 2024 14:20:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717683631; bh=/cE+X/+97EYafsoYhuJZFsGMYpcZaHlflMw/WZjP9is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p5UVz8M/mz6P3+/jhpaOI9Xh+l6twsEe0a79KU6LM75Hy9FMGAtLVypRARKm+6B/t DIV5BcYPcyd0QAZTOVJqVJjA8Mbh7IdtYMdQCu58Wcao6bcRQnMJmhDx/EilN0dgH5 a0nqRv2cLPysudWvjbD5CcvG9Bpw21AqsoICHPg8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rahul Rameshbabu , Tariq Toukan , Simon Horman , "David S. Miller" , Sasha Levin Subject: [PATCH 6.1 439/473] net/mlx5e: Fix IPsec tunnel mode offload feature check Date: Thu, 6 Jun 2024 16:06:08 +0200 Message-ID: <20240606131714.243080584@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606131659.786180261@linuxfoundation.org> References: <20240606131659.786180261@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rahul Rameshbabu [ Upstream commit 9a52f6d44f4521773b4699b4ed34b8e21d5a175c ] Remove faulty check disabling checksum offload and GSO for offload of simple IPsec tunnel L4 traffic. Comment previously describing the deleted code incorrectly claimed the check prevented double tunnel (or three layers of ip headers). Fixes: f1267798c980 ("net/mlx5: Fix checksum issue of VXLAN and IPsec crypto offload") Signed-off-by: Rahul Rameshbabu Signed-off-by: Tariq Toukan Reviewed-by: Simon Horman Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h index 1878a70b9031d..43ccdf0e6cff8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h @@ -97,18 +97,11 @@ mlx5e_ipsec_feature_check(struct sk_buff *skb, netdev_features_t features) if (!x || !x->xso.offload_handle) goto out_disable; - if (xo->inner_ipproto) { - /* Cannot support tunnel packet over IPsec tunnel mode - * because we cannot offload three IP header csum - */ - if (x->props.mode == XFRM_MODE_TUNNEL) - goto out_disable; - - /* Only support UDP or TCP L4 checksum */ - if (xo->inner_ipproto != IPPROTO_UDP && - xo->inner_ipproto != IPPROTO_TCP) - goto out_disable; - } + /* Only support UDP or TCP L4 checksum */ + if (xo->inner_ipproto && + xo->inner_ipproto != IPPROTO_UDP && + xo->inner_ipproto != IPPROTO_TCP) + goto out_disable; return features; -- 2.43.0