]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/revert-net-mlx5e-enable-reporting-checksum-unnecessary-also-for-l3-packets.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.0 / revert-net-mlx5e-enable-reporting-checksum-unnecessary-also-for-l3-packets.patch
1 From foo@baz Sat Apr 20 16:43:09 CEST 2019
2 From: Or Gerlitz <ogerlitz@mellanox.com>
3 Date: Sun, 31 Mar 2019 12:53:03 +0000
4 Subject: Revert "net/mlx5e: Enable reporting checksum unnecessary also for L3 packets"
5
6 From: Or Gerlitz <ogerlitz@mellanox.com>
7
8 [ Upstream commit 8c8811d46d00d119ffbe039a6e52a0b504df1c2c ]
9
10 This reverts commit b820e6fb0978f9c2ac438c199d2bb2f35950e9c9.
11
12 Prior the commit we are reverting, checksum unnecessary was only set when
13 both the L3 OK and L4 OK bits are set on the CQE. This caused packets
14 of IP protocols such as SCTP which are not dealt by the current HW L4
15 parser (hence the L4 OK bit is not set, but the L4 header type none bit
16 is set) to go through the checksum none code, where currently we wrongly
17 report checksum unnecessary for them, a regression. Fix this by a revert.
18
19 Note that on our usual track we report checksum complete, so the revert
20 isn't expected to have any notable performance impact. Also, when we are
21 not on the checksum complete track, the L4 protocols for which we report
22 checksum none are not high performance ones, we will still report
23 checksum unnecessary for UDP/TCP.
24
25 Fixes: b820e6fb0978 ("net/mlx5e: Enable reporting checksum unnecessary also for L3 packets")
26 Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
27 Reported-by: Avi Urman <aviu@mellanox.com>
28 Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
29 Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 ---
32 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +--
33 1 file changed, 1 insertion(+), 2 deletions(-)
34
35 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
36 +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
37 @@ -848,8 +848,7 @@ static inline void mlx5e_handle_csum(str
38
39 csum_unnecessary:
40 if (likely((cqe->hds_ip_ext & CQE_L3_OK) &&
41 - ((cqe->hds_ip_ext & CQE_L4_OK) ||
42 - (get_cqe_l4_hdr_type(cqe) == CQE_L4_HDR_TYPE_NONE)))) {
43 + (cqe->hds_ip_ext & CQE_L4_OK))) {
44 skb->ip_summed = CHECKSUM_UNNECESSARY;
45 if (cqe_is_tunneled(cqe)) {
46 skb->csum_level = 1;