HomeFreeBSD

cxgbe/tom: redo the TOM bits that support the iSCSI driver.

Description

cxgbe/tom: redo the TOM bits that support the iSCSI driver.

  • There is no reason to have a special case for iSCSI in t4_rcvd. Either there is data in the socket buffer (from when the connection was plain TOE, before being promoted to ulp_mode iSCSI) and sbused _should_ be taken into account, or sbused is 0 and doesn't affect the calculation of rx_credits.
  • write_tx_wr doesn't need special handling for iSCSI either. Its caller should specify the ulp_submode.
  • Replace t4_ulp_push_frames with t4_push_pdus that can deal with PDUs in an mbufq hanging off the toepcb. This eliminates the "backwards" calls from t4_tom's tx into the iSCSI driver.
  • The iSCSI driver installs a handler for RX_ISCSI_DDP already and the iSCSI handler for RX_DATA_DDP is identical to the one for RX_ISCSI_DDP. Take advantage of this to eliminate the last remaining "backwards" call from do_rx_data_ddp into the iSCSI driver.
  • Eliminate the CXGBE_ISCSI_MBUF_TAG abomination.
    • For tx, it makes no sense to allocate an mbuf tag just to stash 2 bits worth of information. Use a spare byte from the mbuf header instead.
    • For rx, the per-connection ulpcb is a more natural place to keep information about the PDU currently being assembled.

Details

Provenance
npAuthored on
Parents
rS290375: Import imsg from OpenBSD's libutil.
Branches
Unknown
Tags
Unknown