HomeFreeBSD

cxgbe/cxgbei: overhaul the iSCSI ULP driver.

Description

cxgbe/cxgbei: overhaul the iSCSI ULP driver.

  • icl_cxgbei_conn is _the_ per-connection softc for iSCSI. Retire iscsi_socket by removing all unneeded fields and moving the rest to icl_cxgbei_conn.
  • Update pdu_queue to use the new t4_push_pdus and associated mbufq in the TOE driver. Throw away all the callbacks registered during MOD_LOAD as t4_push_pdus doesn't need them.
  • Use the mbuf allocated for the BHS header to store icl_cxgbei_pdu as well. This eliminates the custom zone for the PDUs and reduces the number of allocations on the fast path. For each PDU, the old code used to allocate an icl_cxgbei_pdu, an mbuf for the BHS, and tags for the BHS and data mbufs. The new code allocates just one mbuf per PDU. This is convenient for another reason -- it allows t4_tom to deal with mbufs (which it understands) instead of having to call into the iSCSI driver.
  • Remove the socket upcalls, calls to ICL_DEBUG and ICL_WARN, and all code within ICL_KERNEL_PROXY. None of this stuff is actually used by cxgbei, it's probably leftover copy/paste from icl_soft.
  • Fold various icl_foo into icl_cxgbei_foo if the cxgbei implementation was simply a call to the other function.
  • Remove set_tcb_field and use t4_set_tcb_field that's already available in the base driver.
  • Fix connection handoff to not assume that there is only one T4/T5 adapter in the system and that's the one handling all offloaded connections. Walk the list of adapters and match tp->t_tod with the adapter's toedev instead. This allows multiple TOE devices of multiple types to coexist.
  • Fix connection teardown by not reaching for the inp via the toepcb but via the socket instead. If the tid is dead in the hardware then the inp has already been unhooked from the toepcb by t4_tom.
  • Add more CTRs. The ones on the normal fast path are disabled by default to avoid flooding the log.
  • Refine pdu_append_data.
  • Other miscellaneous changes.

Details

Provenance
npAuthored on
Parents
rS290971: Take maintainership of nis(8) and yp(8), Pre-commit review
Branches
Unknown
Tags
Unknown