git: aabca1034c74 - main - mlx5en: Properly account for no-checksum on tunneled packets.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Feb 2022 15:24:26 UTC
The branch main has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=aabca1034c742ed6160ffec57a7e481d929153f7
commit aabca1034c742ed6160ffec57a7e481d929153f7
Author: Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-01 15:20:12 +0000
Commit: Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-02-01 15:21:15 +0000
mlx5en: Properly account for no-checksum on tunneled packets.
MFC after: 1 week
Sponsored by: NVIDIA Networking
---
sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
index 522e3f09df2c..9e58a9bd7904 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
@@ -333,11 +333,13 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe,
CSUM_IP_CHECKED | CSUM_IP_VALID |
CSUM_DATA_VALID | CSUM_PSEUDO_HDR;
mb->m_pkthdr.csum_data = htons(0xffff);
- }
- if (((cqe->hds_ip_ext & (CQE_L2_OK | CQE_L3_OK | CQE_L4_OK)) ==
- (CQE_L2_OK | CQE_L3_OK | CQE_L4_OK))) {
- mb->m_pkthdr.csum_flags |=
- CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID;
+
+ if (likely((cqe->hds_ip_ext & CQE_L4_OK) == CQE_L4_OK)) {
+ mb->m_pkthdr.csum_flags |=
+ CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID;
+ }
+ } else {
+ rq->stats.csum_none++;
}
} else if (likely((ifp->if_capenable & (IFCAP_RXCSUM |
IFCAP_RXCSUM_IPV6)) != 0) &&