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)
Sponsored by: Amazon, Inc.

(cherry picked from commit ce20b51cb71bfb548fcaafc4bacb8290460f03d5)

Details

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