iflib_simple_encap() asks iflib_txd_db_check() about the doorbell after every
packet, and for a ring at most an eighth full the rule allows no pending
descriptors. So a lock holder that sends a run of packets, as when it drains
the deferral ring, rings once per packet.
Every lock holder rings before it unlocks, so a doorbell deferred inside the
hold is never lost. Drop the two lower bands of the rule: a ring up to half
full now uses the threshold a ring a quarter to half full already had, 31
descriptors on a 1024-entry ring and 127 on a 4096-entry one. This never adds
a doorbell, and a hold that sends one packet is unchanged. The zero threshold
came with 95246abb21da, which removed the callout that rang what a drain left
pending; before it iflib deferred size / 32 descriptors on every ring.
Round trip through the box, and TCP throughput, retransmits, CPU and ping as
an endpoint, with and without TSO, are unchanged.
Measured with D62395 applied.
Sponsored by: Rubicon Communications, LLC ("Netgate")