2968dde3de
AMD 10GbE hardware is designed to have two buffers per receive descriptor to support split header feature. For this purpose, the driver was designed to use 2 iflib freelists per receive queue. So, that buffers from 2 freelists are used to refill an entry in the receive descriptor. The current design holds good with regular data traffic. But, when netmap comes into play, the current design will not fit in. The current netmap interfaces and netmap implementation in iflib doesn't seem to accomodate the design of 2 freelists per receive queue. So, exercising Netmap capability with inbuilt tools like bridge, pkt-gen doesn't work with the 2 freelists driver design. So, the driver design is changed to accomodate the current netmap interfaces and netmap implementation in iflib by using single freelist per receive queue approach when Netmap capability is exercised without disturbing the current 2 freelists approach. The dev.ax.sph_enable tunable can be set to 0 to configure the single free list mode. Thanks to Stephan Dewt for his Initial set of code changes for the stated problem. Submitted by: rajesh1.kumar_amd.com Approved by: vmaffione MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27797