cxgbe(4): Move release_tid to the base NIC driver for future consumers.
Sponsored by: Chelsio Communications.
This commit is contained in:
parent
cbf65cf228
commit
8896672a77
@ -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 */
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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 *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user