From: Michal Krawczyk <mk@semihalf.com>
To: dev@dpdk.org
Cc: shaibran@amazon.com, upstream@semihalf.com,
Michal Krawczyk <mk@semihalf.com>,
stable@dpdk.org
Subject: [PATCH v2 20/21] net/ena: don't indicate bad csum for L4 csum error
Date: Tue, 22 Feb 2022 19:11:45 +0100 [thread overview]
Message-ID: <20220222181146.28882-21-mk@semihalf.com> (raw)
In-Reply-To: <20220222181146.28882-1-mk@semihalf.com>
Some HW may invalidly set checksum error bit for the valid L4 checksum.
To avoid drop of the packets in that situation, do not indicate bad
checksum for L4 Rx csum offloads. Instead, set it as unknown, so the
application will re-verify this value.
The statistics counters will still work as previously.
Fixes: 05817057faba ("net/ena: fix indication of bad L4 Rx checksums")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 9f29cf04ac..0861206ea4 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -583,7 +583,13 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {
++rx_stats->l4_csum_bad;
- ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+ /*
+ * For the L4 Rx checksum offload the HW may indicate
+ * bad checksum although it's valid. Because of that,
+ * we're setting the UNKNOWN flag to let the app
+ * re-verify the checksum.
+ */
+ ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
} else {
++rx_stats->l4_csum_good;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
--
2.25.1
next prev parent reply other threads:[~2022-02-22 18:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220222160634.24489-1-mk@semihalf.com>
2022-02-22 16:06 ` [PATCH 07/21] net/ena: skip timer if the reset is triggered Michal Krawczyk
2022-02-22 16:06 ` [PATCH 15/21] net/ena: check if reset was already triggered Michal Krawczyk
2022-02-22 16:06 ` [PATCH 17/21] net/ena: fix meta-desc DF flag setup Michal Krawczyk
2022-02-22 16:06 ` [PATCH 19/21] net/ena: don't initialize LLQ when membar isn't exposed Michal Krawczyk
2022-02-22 16:06 ` [PATCH 20/21] net/ena: don't indicate bad csum for L4 csum error Michal Krawczyk
[not found] ` <20220222181146.28882-1-mk@semihalf.com>
2022-02-22 18:11 ` [PATCH v2 07/21] net/ena: skip timer if the reset is triggered Michal Krawczyk
2022-02-22 18:11 ` [PATCH v2 15/21] net/ena: check if reset was already triggered Michal Krawczyk
2022-02-22 18:11 ` [PATCH v2 17/21] net/ena: fix meta-desc DF flag setup Michal Krawczyk
2022-02-22 18:11 ` [PATCH v2 19/21] net/ena: don't initialize LLQ when membar isn't exposed Michal Krawczyk
2022-02-22 18:11 ` Michal Krawczyk [this message]
[not found] ` <20220223121944.24156-1-mk@semihalf.com>
2022-02-23 12:19 ` [PATCH v3 07/21] net/ena: skip timer if the reset is triggered Michal Krawczyk
2022-02-23 12:19 ` [PATCH v3 15/21] net/ena: check if reset was already triggered Michal Krawczyk
2022-02-23 12:19 ` [PATCH v3 17/21] net/ena: fix meta-desc DF flag setup Michal Krawczyk
2022-02-23 12:19 ` [PATCH v3 19/21] net/ena: don't initialize LLQ when membar isn't exposed Michal Krawczyk
2022-02-23 12:19 ` [PATCH v3 20/21] net/ena: don't indicate bad csum for L4 csum error Michal Krawczyk
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=20220222181146.28882-21-mk@semihalf.com \
--to=mk@semihalf.com \
--cc=dev@dpdk.org \
--cc=shaibran@amazon.com \
--cc=stable@dpdk.org \
--cc=upstream@semihalf.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).