[PATCH v2 3/4] net/ark: improve ring handling for segmented packets
Ed Czeck
ed.czeck at atomicrules.com
Wed Sep 10 20:57:19 CEST 2025
handle case where complete packet is not yet available
Signed-off-by: Ed Czeck <ed.czeck at 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
More information about the dev
mailing list