All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Avi Urman <aviu@mellanox.com>, Tariq Toukan <tariqt@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 09/10] Revert "net/mlx5e: Enable reporting checksum unnecessary also for L3 packets"
Date: Tue,  9 Apr 2019 12:36:35 -0700	[thread overview]
Message-ID: <20190409193636.13663-10-saeedm@mellanox.com> (raw)
In-Reply-To: <20190409193636.13663-1-saeedm@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>

This reverts commit b820e6fb0978f9c2ac438c199d2bb2f35950e9c9.

Prior the commit we are reverting, checksum unnecessary was only set when
both the L3 OK and L4 OK bits are set on the CQE. This caused packets
of IP protocols such as SCTP which are not dealt by the current HW L4
parser (hence the L4 OK bit is not set, but the L4 header type none bit
is set) to go through the checksum none code, where currently we wrongly
report checksum unnecessary for them, a regression. Fix this by a revert.

Note that on our usual track we report checksum complete, so the revert
isn't expected to have any notable performance impact. Also, when we are
not on the checksum complete track, the L4 protocols for which we report
checksum none are not high performance ones, we will still report
checksum unnecessary for UDP/TCP.

Fixes: b820e6fb0978 ("net/mlx5e: Enable reporting checksum unnecessary also for L3 packets")
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Avi Urman <aviu@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 36fd628188bc..c3b3002ff62f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -847,8 +847,7 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
 
 csum_unnecessary:
 	if (likely((cqe->hds_ip_ext & CQE_L3_OK) &&
-		   ((cqe->hds_ip_ext & CQE_L4_OK) ||
-		    (get_cqe_l4_hdr_type(cqe) == CQE_L4_HDR_TYPE_NONE)))) {
+		   (cqe->hds_ip_ext & CQE_L4_OK))) {
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 		if (cqe_is_tunneled(cqe)) {
 			skb->csum_level = 1;
-- 
2.20.1


  parent reply	other threads:[~2019-04-09 19:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 19:36 [pull request][net 00/10] Mellanox, mlx5 fixes 2019-04-09 Saeed Mahameed
2019-04-09 19:36 ` [net 01/10] net/mlx5: FPGA, tls, hold rcu read lock a bit longer Saeed Mahameed
2019-04-09 19:36 ` [net 02/10] net/mlx5: FPGA, tls, idr remove on flow delete Saeed Mahameed
2019-04-09 19:36 ` [net 03/10] net/mlx5e: Skip un-needed tx recover if interface state is down Saeed Mahameed
2019-04-09 19:36 ` [net 04/10] net/mlx5e: Use fail-safe channels reopen in tx reporter recover Saeed Mahameed
2019-04-09 19:36 ` [net 05/10] net/mlx5e: XDP, Avoid checksum complete when XDP prog is loaded Saeed Mahameed
2019-04-09 19:36 ` [net 06/10] net/mlx5e: Rx, Fixup skb checksum for packets with tail padding Saeed Mahameed
2019-04-09 19:36 ` [net 07/10] net/mlx5e: Rx, Check ip headers sanity Saeed Mahameed
2019-04-09 19:36 ` [net 08/10] net/mlx5e: Protect against non-uplink representor for encap Saeed Mahameed
2019-04-09 19:36 ` Saeed Mahameed [this message]
2019-04-09 19:36 ` [net 10/10] net/mlx5e: Switch to Toeplitz RSS hash by default Saeed Mahameed
2019-04-11 21:12 ` [pull request][net 00/10] Mellanox, mlx5 fixes 2019-04-09 David Miller
2019-04-14 22:12 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190409193636.13663-10-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=aviu@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.