Page MenuHomeFreeBSD

Fix PR222744 - netmap errors with iflib em driver
ClosedPublic

Authored by shurd on Oct 23 2017, 4:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 6:55 AM
Unknown Object (File)
Dec 12 2023, 9:46 PM
Unknown Object (File)
Nov 13 2023, 6:47 AM
Unknown Object (File)
Nov 13 2023, 5:01 AM
Unknown Object (File)
Oct 19 2023, 8:21 PM
Unknown Object (File)
Oct 19 2023, 9:03 AM
Unknown Object (File)
Jul 1 2023, 10:52 PM
Unknown Object (File)
Jul 1 2023, 10:50 PM
Subscribers

Details

Summary

Fix error when refilling netmap buffers that resulted in the first
buffer of the successive passes through ifl_bus_addrs[] leaving the
first value unset (tmp_pidx started at 1, not zero after the first time
through the loop).

Leave the one unused buffer required by some NICs visible in the netmap
ring rather than hidden. There will always be a buffer in use by the
kernel now when an iflib driver is used via netmap.

Always get the netmap slot index via netmap_idx_n2k() to account for
nkr_hwofs in a consistent way.

Split shared functionality into new functions.
iru_init(): shared by _iflib_fl_refill() and netmap_fl_refill()
netmap_fl_refill(): shared by iflib_netmap_rxsync() and
iflib_netmap_rxq_init()

Test Plan

Have reporter test, test with netmap packet generator

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Added this diff and built a new kernel last night and let the netmap application "lb" run all night, with tcpdump reading from two netmap pipes and everything appeared to run just fine. I have not been able to cause a panic with the e1000 network interface. There is some issue with the lb app that was not working correctly (it was not load balancing flows), so I will be running just tcpdump with "-i netmap:em0" overnight to verify a clean packet capture.

This revision is now accepted and ready to land.Oct 30 2017, 8:18 PM
This revision was automatically updated to reflect the committed changes.