HomeFreeBSD

First round of code cleanup and reorganization. This is mostly code on

Description

First round of code cleanup and reorganization. This is mostly code on
the slow path. Changes to the fast path will follow later.

  • Use the standard ULD registration and activation mechanism offered by if_cxgbe. This eliminates all the code that managed the list of offload_device structures. This simplifies the CPL dispatch too by eliminating t4tom_cpl_handler_register_flag and associated code.
  • Remove all unused or write-only fields from various structures (iscsi_socket, offload_device, cxgbei_ulp2_ddp_info, ulp_iscsi_info)
  • Eliminate the two line wrappers around malloc/free. While here, switch to using M_CXGBE for all allocations.
  • Simplify the page size settings in the chip (for iSCSI). This ULD "owns" these settings so it should simply write the values that it wants to the A_ULP_RX_ISCSI_TAGMASK and A_ULP_RX_ISCSI_PSZ registers. This eliminates the globals ddp_page_order[], ddp_page_shift[], page_idx and all related code.
  • Maintain the per-adapter ULD state in one data structure instead of two. This consolidates struct offload_device and struct cxgbei_ulp2_ddp_info and into struct cxgbei_data, which is stored in adapter->iscsi_softc.
  • Leave socket->so_emuldata alone, it exists for a different purpose (which is definitely not iSCSI). Store the per-socket offload state in a new field in struct icl_conn instead. (The new field exists only in this project branch and hasn't been reviewed for inclusion into head yet).
  • Switch to the system version of mbufq.
  • Tidy up the CPL/callback dispatch from if_cxgbe/t4_tom into cxgbei. The tid/toepcb is always available (t4_tom has looked it up) so it's a waste of time looking it up again.

Details

Provenance
npAuthored on
Parents
rS279896: Document m_collapse().
Branches
Unknown
Tags
Unknown

Event Timeline