From: Ed Czeck <ed.czeck@atomicrules.com>
To: dev@dpdk.org, stephen@networkplumber.org
Cc: Shepard Siegel <shepard.siegel@atomicrules.com>,
John Miller <john.miller@atomicrules.com>
Subject: [PATCH v2 3/4] net/ark: improve ring handling for segmented packets
Date: Wed, 10 Sep 2025 14:57:19 -0400 [thread overview]
Message-ID: <20250910185720.995300-3-ed.czeck@atomicrules.com> (raw)
In-Reply-To: <20250910185720.995300-1-ed.czeck@atomicrules.com>
handle case where complete packet is not yet available
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
drivers/net/ark/ark_ethdev_rx.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 6077d98ae0..1b5c4b64a4 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -313,11 +313,15 @@ eth_ark_recv_pkts(void *rx_queue,
}
}
- if (unlikely(meta->pkt_len > queue->dataroom))
- cons_index = eth_ark_rx_jumbo
- (queue, meta, mbuf, cons_index + 1);
- else
+ if (unlikely(meta->pkt_len > queue->dataroom)) {
+ uint32_t tcons = eth_ark_rx_jumbo(queue, meta, mbuf, cons_index + 1);
+ if ((int32_t)(prod_index - tcons) >= 0)
+ cons_index = tcons; /* nominal condition */
+ else
+ break;
+ } else {
cons_index += 1;
+ }
rx_pkts[nb] = mbuf;
nb++;
--
2.34.1
next prev parent reply other threads:[~2025-09-10 18:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 18:57 [PATCH v2 1/4] net/ark: add PCIe IDS for newly supported devices Ed Czeck
2025-09-10 18:57 ` [PATCH v2 2/4] net/ark: remove double mbuf frees Ed Czeck
2025-09-10 18:57 ` Ed Czeck [this message]
2025-09-10 18:57 ` [PATCH v2 4/4] net/ark: improve Rx queue recovery after mbuf exhaustion Ed Czeck
2025-09-13 16:26 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2025-09-03 21:28 [PATCH 1/4] net/ark: add PCIe IDS for newly supported devices Ed Czeck
2025-09-10 19:04 ` [PATCH v2 " Ed Czeck
2025-09-10 19:04 ` [PATCH v2 3/4] net/ark: improve ring handling for segmented packets Ed Czeck
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=20250910185720.995300-3-ed.czeck@atomicrules.com \
--to=ed.czeck@atomicrules.com \
--cc=dev@dpdk.org \
--cc=john.miller@atomicrules.com \
--cc=shepard.siegel@atomicrules.com \
--cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.