HomeFreeBSD

ena: Clear NS_MOREFRAG flag for last netmap slot

Description

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)

Details

Provenance
osamaabb_amazon.comAuthored on Aug 7 2024, 6:24 AM
Parents
rGb0830d2b6bbc: ena: Handle wrap around for prefetch in netmap
Branches
Unknown
Tags
Unknown