Date: Thu, 13 Mar 2025 16:03:17 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: dd1bd0ec5c91 - main - mlx5_en: correct recalculation of the ipv4 checksum for hw lro packet Message-ID: <202503131603.52DG3HPW048628@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dd1bd0ec5c91c21f1f60bb8bc58b2f5e794df43f commit dd1bd0ec5c91c21f1f60bb8bc58b2f5e794df43f Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2025-02-11 15:43:21 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2025-03-13 15:59:50 +0000 mlx5_en: correct recalculation of the ipv4 checksum for hw lro packet The call to in_cksum_skip() did not skipped the ethernet header. Reviewed by: Ariel Ehrenberg <aehrenberg@nvidia.com>, Slava Shwartsman <slavash@nvidia.com> Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index f58c88e98053..a7d796c57eee 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -203,7 +203,8 @@ mlx5e_lro_update_hdr(struct mbuf *mb, struct mlx5_cqe64 *cqe) ip4->ip_ttl = cqe->lro_min_ttl; ip4->ip_len = cpu_to_be16(tot_len); ip4->ip_sum = 0; - ip4->ip_sum = in_cksum(mb, ip4->ip_hl << 2); + ip4->ip_sum = in_cksum_skip(mb, (ip4->ip_hl << 2) + + ETHER_HDR_LEN, ETHER_HDR_LEN); } else { ip6->ip6_hlim = cqe->lro_min_ttl; ip6->ip6_plen = cpu_to_be16(tot_len -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202503131603.52DG3HPW048628>