]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cxgbe(4): Changes to the CPL-handler registration mechanism and code
authornp <np@FreeBSD.org>
Tue, 5 Jul 2016 01:29:24 +0000 (01:29 +0000)
committernp <np@FreeBSD.org>
Tue, 5 Jul 2016 01:29:24 +0000 (01:29 +0000)
commit58667ff11c68ece556bfb71b54362c21beb187c9
treec218d7b6cc9f5dbf8049aa629b9ede0048a0f6b5
parent9e6e43be959bda5472c468f080cf53a6b89df4b1
cxgbe(4): Changes to the CPL-handler registration mechanism and code
related to "shared" CPLs.

a) Combine t4_set_tcb_field and t4_set_tcb_field_rpl into a single
function.  Allow callers to direct the response to any iq.  Tidy up
set_ulp_mode_iscsi while there to use names from t4_tcb.h instead of
magic constants.

b) Remove all CPL handler tables from struct adapter.  This reduces its
size by around 2KB.  All handlers are now registered at MOD_LOAD instead
of attach or some kind of initialization/activation.  The registration
functions do not need an adapter parameter any more.

c) Add per-iq handlers to deal with CPLs whose destination cannot be
determined solely from the opcode.  There are 2 such CPLs in use right
now: SET_TCB_RPL and L2T_WRITE_RPL.  The base driver continues to send
filter and L2T_WRITEs over the mgmtq and solicits the reply on fwq.
t4_tom (including the DDP code) now uses the port's ctrlq to send
L2T_WRITEs and SET_TCB_FIELDs and solicits the reply on an ofld_rxq.
fwq and ofld_rxq have different handlers that know what kind of tid to
expect in the reply.  Update t4_write_l2e and callers to to support any
wrq/iq combination.

Approved by: re@ (kib@)
Sponsored by: Chelsio Communications
18 files changed:
sys/dev/cxgbe/adapter.h
sys/dev/cxgbe/cxgbei/cxgbei.c
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
sys/dev/cxgbe/iw_cxgbe/cm.c
sys/dev/cxgbe/iw_cxgbe/device.c
sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
sys/dev/cxgbe/t4_l2t.c
sys/dev/cxgbe/t4_l2t.h
sys/dev/cxgbe/t4_main.c
sys/dev/cxgbe/t4_sge.c
sys/dev/cxgbe/tom/t4_connect.c
sys/dev/cxgbe/tom/t4_cpl_io.c
sys/dev/cxgbe/tom/t4_ddp.c
sys/dev/cxgbe/tom/t4_listen.c
sys/dev/cxgbe/tom/t4_tom.c
sys/dev/cxgbe/tom/t4_tom.h
sys/dev/cxgbe/tom/t4_tom_l2t.c
sys/dev/cxgbe/tom/t4_tom_l2t.h