From: <shaibran@amazon.com>
To: <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, Shai Brandes <shaibran@amazon.com>, <stable@dpdk.org>
Subject: [PATCH 13/15] net/ena: fix wrong handling of checksum
Date: Tue, 2 Jul 2024 17:46:24 +0300 [thread overview]
Message-ID: <20240702144626.14545-14-shaibran@amazon.com> (raw)
In-Reply-To: <20240702144626.14545-1-shaibran@amazon.com>
From: Shai Brandes <shaibran@amazon.com>
This change fixes an issue where a non tcp/udp packet can be indicated
to have an invalid csum. If the device erroneously tries to verify the
csum on a non tcp/udp packet it will result in false indication that
there is a csum error. This change make the driver ignore the
indication for csum error on such packets.
Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
Cc: stable@dpdk.org
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
doc/guides/rel_notes/release_24_07.rst | 1 +
drivers/net/ena/ena_ethdev.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
index 24bb91ad46..ec960d93cc 100644
--- a/doc/guides/rel_notes/release_24_07.rst
+++ b/doc/guides/rel_notes/release_24_07.rst
@@ -80,6 +80,7 @@ New Features
cleanup and lay the groundwork for hot-unplug support.
* Removed an obsolete workaround for a false L4 bad Rx checksum indication.
* Fixed an invalid return value check.
+ * Fixed Rx chcecksum inspection to check only TCP/UDP packets.
* **Update Tap PMD driver.**
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 67a1d86f9a..a18c94df28 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -669,7 +669,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
packet_type |= RTE_PTYPE_L3_IPV6;
}
- if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
+ if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
+ !(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {
--
2.17.1
next prev parent reply other threads:[~2024-07-02 14:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:46 [PATCH 00/15] net/ena: driver release 2.10.0 shaibran
2024-07-02 14:46 ` [PATCH 01/15] net/ena/base: add descriptor dump capability shaibran
2024-07-02 14:46 ` [PATCH 02/15] net/ena/base: remove unused param shaibran
2024-07-02 14:46 ` [PATCH 03/15] net/ena/base: remove redundant assert checks shaibran
2024-07-02 14:46 ` [PATCH 04/15] net/ena/base: update memory barrier comment shaibran
2024-07-02 14:46 ` [PATCH 05/15] net/ena/base: add method to check used entries shaibran
2024-07-02 14:46 ` [PATCH 06/15] net/ena/base: add an additional reset reason shaibran
2024-07-02 14:46 ` [PATCH 07/15] net/ena/base: update copyrights comments shaibran
2024-07-02 14:46 ` [PATCH 08/15] net/ena/base: add macro for bitfield access shaibran
2024-07-02 14:46 ` [PATCH 09/15] net/ena: logger change to improve performance shaibran
2024-07-02 14:46 ` [PATCH 10/15] net/ena: rework device uninit shaibran
2024-07-02 14:46 ` [PATCH 11/15] net/ena: fix bad checksum handling shaibran
2024-07-02 14:46 ` [PATCH 12/15] net/ena: fix invalid return value check shaibran
2024-07-02 14:46 ` shaibran [this message]
2024-07-02 14:46 ` [PATCH 14/15] net/ena: rework Rx checksum inspection shaibran
2024-07-02 14:46 ` [PATCH 15/15] net/ena: upgrade driver version to 2.10.0 shaibran
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=20240702144626.14545-14-shaibran@amazon.com \
--to=shaibran@amazon.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=stable@dpdk.org \
/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).