HomeFreeBSD

cxgbei: Dispatch sent PDUs to the NIC asynchronously.

Description

cxgbei: Dispatch sent PDUs to the NIC asynchronously.

Previously the driver was called to send PDUs to the NIC synchronously
from the icl_conn_pdu_queue_cb callback. However, this performed a
fair bit of work while holding the icl connection lock. Instead,
change the callback to add sent PDUs to a STAILQ and defer dispatching
of PDUs to the NIC to a helper thread similar to the scheme used in
the TCP iSCSI backend.

  • Replace rx_flags int and the sole RXF_ACTIVE flag with a simple rx_active bool.
  • Add a pool of transmit worker threads for cxgbei.
  • Fix worker thread exit to depend on the wakeup in kthread_exit() to fix a race with module unload.

Reported by: mav
Sponsored by: Chelsio Communications

(cherry picked from commit fd8f61d6e970fa443d393d330ae70c54c9a523a4)

Details

Provenance
jhbAuthored on Feb 8 2022, 12:20 AM
Parents
rGffd150099ca0: Extend the VMM stats interface to support a dynamic count of statistics.
Branches
Unknown
Tags
Unknown