Date: Thu, 31 Oct 2024 16:01:36 GMT From: Osama Abboud <osamaabb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8b43095ad8cd - stable/14 - ena: Clear NS_MOREFRAG flag for last netmap slot Message-ID: <202410311601.49VG1ahP072975@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d commit 8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d Author: Osama Abboud <osamaabb@amazon.com> AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud <osamaabb@FreeBSD.org> CommitDate: 2024-10-31 14:54:11 +0000 ena: Clear NS_MOREFRAG flag for last netmap slot When processing packets within the rx-flow ena_netmap_rx_load_desc doesn't know the number of descriptors, so it sets NS_MOREFRAG to all the slots to indicate that there are more fragments for this packet. The code calls ena_netmap_rx_load_desc() for every descriptor in this packet to map the relevant buffer into the netmap shared memory. After ena_netmap_rx_load_desc() calls, we need to unset the NS_MOREFRAG for the last fragment to indicate that this is the last fragment, so we explicitly turn off NS_MOREFRAG flag. Current code overrides all other flags and sets NS_BUF_CHANGED. This patch unsets the relevant flag only. Approved by: cperciva (mentor) Sponsored by: Amazon, Inc. (cherry picked from commit 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4) --- sys/dev/ena/ena_netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index eef8021b8569..8a220373ec3f 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -964,7 +964,7 @@ ena_netmap_rx_frame(struct ena_netmap_ctx *ctx) * It just set flag NS_MOREFRAG to all slots, then here flag of * last slot is cleared. */ - ctx->slots[nm_prev(ctx->nm_i, ctx->lim)].flags = NS_BUF_CHANGED; + ctx->slots[nm_prev(ctx->nm_i, ctx->lim)].flags &= ~NS_MOREFRAG; if (rc != 0) { goto rx_clear_desc;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410311601.49VG1ahP072975>