HomeFreeBSD

ena: Handle wrap around for prefetch in netmap

Description

ena: Handle wrap around for prefetch in netmap

Netmap index wraps around based on the number of netmap kernel ring
slots.
Currently the driver prefetches the next slot using nm_i + 1 which may
be wrong since it does not handle wrap around.
This patch fixes that by using the kernel API for fetching the next
netmap index.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

Details

Provenance
osamaabb_amazon.comAuthored on Aug 7 2024, 6:24 AM
Parents
rGf236e544a2ff: ena: Properly unmap last socket chain in netmap
Branches
Unknown
Tags
Unknown