On systems experiencing a heavy memory load, the ENA driver may spend an excessive amount of time in its packet receiving ithread attempting to allocate new receive buffers. Due to the high priority with which network ithreads operate, this can cause other issues, including starving the ENA *transmit* side and causing ENA driver resets, and starving the NVMe driver's I/O completion processing ithread resulting in timeouts and other issues there.
This patch:
(a) Switches the ENA driver from using 16 kB mbuf clusters by default to using 9 kB mbuf clusters by default, since the larger clusters are never appropriate for the EC2 network's MTU, and
(b) When refilling receive buffers, remembers if a 9 kB allocation fails and switches over to 4 kB mbuf clusters for the remainder of the refill operation.
This patch applies to FreeBSD stable/12; the code in HEAD is very slightly different.