[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190212.092810.2278214887970417721.davem@davemloft.net>
Date: Tue, 12 Feb 2019 09:28:10 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: tariqt@...lanox.com
Cc: netdev@...r.kernel.org, eranbe@...lanox.com, saeedm@...lanox.com,
edumazet@...gle.com
Subject: Re: [PATCH net V2] net/mlx4_en: Force CHECKSUM_NONE for short
ethernet frames
From: Tariq Toukan <tariqt@...lanox.com>
Date: Mon, 11 Feb 2019 18:04:17 +0200
> From: Saeed Mahameed <saeedm@...lanox.com>
>
> When an ethernet frame is padded to meet the minimum ethernet frame
> size, the padding octets are not covered by the hardware checksum.
> Fortunately the padding octets are usually zero's, which don't affect
> checksum. However, it is not guaranteed. For example, switches might
> choose to make other use of these octets.
> This repeatedly causes kernel hardware checksum fault.
>
> Prior to the cited commit below, skb checksum was forced to be
> CHECKSUM_NONE when padding is detected. After it, we need to keep
> skb->csum updated. However, fixing up CHECKSUM_COMPLETE requires to
> verify and parse IP headers, it does not worth the effort as the packets
> are so small that CHECKSUM_COMPLETE has no significant advantage.
>
> Future work: when reporting checksum complete is not an option for
> IP non-TCP/UDP packets, we can actually fallback to report checksum
> unnecessary, by looking at cqe IPOK bit.
>
> Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends")
> Cc: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Saeed Mahameed <saeedm@...lanox.com>
> Signed-off-by: Tariq Toukan <tariqt@...lanox.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists