diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 5eed5f80b1f..3127c5918ce 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1169,6 +1169,7 @@ void free_atid_tab(struct tid_info *); int alloc_atid(struct adapter *, void *); void *lookup_atid(struct adapter *, int); void free_atid(struct adapter *, int); +void release_tid(struct adapter *, int, struct sge_wrq *); #ifdef DEV_NETMAP /* t4_netmap.c */ diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 27c2c638bbc..91f8f2bcaf9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2535,6 +2535,31 @@ free_atid(struct adapter *sc, int atid) mtx_unlock(&t->atid_lock); } +static void +queue_tid_release(struct adapter *sc, int tid) +{ + + CXGBE_UNIMPLEMENTED("deferred tid release"); +} + +void +release_tid(struct adapter *sc, int tid, struct sge_wrq *ctrlq) +{ + struct wrqe *wr; + struct cpl_tid_release *req; + + wr = alloc_wrqe(sizeof(*req), ctrlq); + if (wr == NULL) { + queue_tid_release(sc, tid); /* defer */ + return; + } + req = wrtod(wr); + + INIT_TP_WR_MIT_CPL(req, CPL_TID_RELEASE, tid); + + t4_wrq_tx(sc, wr); +} + static int t4_range_cmp(const void *a, const void *b) { diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 411c2db5fe1..68353421220 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -96,7 +96,6 @@ static struct uld_info tom_uld_info = { .deactivate = t4_tom_deactivate, }; -static void queue_tid_release(struct adapter *, int); static void release_offload_resources(struct toepcb *); static int alloc_tid_tabs(struct tid_info *); static void free_tid_tabs(struct tid_info *); @@ -541,31 +540,6 @@ remove_tid(struct adapter *sc, int tid, int ntids) atomic_subtract_int(&t->tids_in_use, ntids); } -void -release_tid(struct adapter *sc, int tid, struct sge_wrq *ctrlq) -{ - struct wrqe *wr; - struct cpl_tid_release *req; - - wr = alloc_wrqe(sizeof(*req), ctrlq); - if (wr == NULL) { - queue_tid_release(sc, tid); /* defer */ - return; - } - req = wrtod(wr); - - INIT_TP_WR_MIT_CPL(req, CPL_TID_RELEASE, tid); - - t4_wrq_tx(sc, wr); -} - -static void -queue_tid_release(struct adapter *sc, int tid) -{ - - CXGBE_UNIMPLEMENTED("deferred tid release"); -} - /* * What mtu_idx to use, given a 4-tuple. Note that both s->mss and tcp_mssopt * have the MSS that we should advertise in our SYN. Advertised MSS doesn't diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index b875b0bcf93..4d219c0e55a 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -333,7 +333,6 @@ void insert_tid(struct adapter *, int, void *, int); void *lookup_tid(struct adapter *, int); void update_tid(struct adapter *, int, void *); void remove_tid(struct adapter *, int, int); -void release_tid(struct adapter *, int, struct sge_wrq *); int find_best_mtu_idx(struct adapter *, struct in_conninfo *, struct offload_settings *); u_long select_rcv_wnd(struct socket *);