Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161193340
D29382.id86171.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
13 KB
Referenced Files
None
Subscribers
None
D29382.id86171.diff
View Options
Index: sys/dev/cxgbe/adapter.h
===================================================================
--- sys/dev/cxgbe/adapter.h
+++ sys/dev/cxgbe/adapter.h
@@ -677,8 +677,8 @@
};
/*
- * wrq: SGE egress queue that is given prebuilt work requests. Both the control
- * and offload tx queues are of this type.
+ * wrq: SGE egress queue that is given prebuilt work requests. Control queues
+ * are of this type.
*/
struct sge_wrq {
struct sge_eq eq; /* MUST be first */
@@ -712,6 +712,11 @@
} __aligned(CACHE_LINE_SIZE);
+/* ofld_txq: SGE egress queue + miscellaneous items */
+struct sge_ofld_txq {
+ struct sge_wrq wrq;
+} __aligned(CACHE_LINE_SIZE);
+
#define INVALID_NM_RXQ_CNTXT_ID ((uint16_t)(-1))
struct sge_nm_rxq {
/* Items used by the driver rx ithread are in this cacheline. */
@@ -792,7 +797,7 @@
struct sge_wrq *ctrlq; /* Control queues */
struct sge_txq *txq; /* NIC tx queues */
struct sge_rxq *rxq; /* NIC rx queues */
- struct sge_wrq *ofld_txq; /* TOE tx queues */
+ struct sge_ofld_txq *ofld_txq; /* TOE tx queues */
struct sge_ofld_rxq *ofld_rxq; /* TOE rx queues */
struct sge_nm_txq *nm_txq; /* netmap tx queues */
struct sge_nm_rxq *nm_rxq; /* netmap rx queues */
Index: sys/dev/cxgbe/cxgbei/icl_cxgbei.c
===================================================================
--- sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -551,7 +551,7 @@
flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval);
- wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq);
+ wr = alloc_wrqe(roundup2(flowclen, 16), &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -843,8 +843,8 @@
goto no_ddp;
}
- rc = t4_write_page_pods_for_buf(sc, toep->ofld_txq, toep->tid, prsv,
- (vm_offset_t)csio->data_ptr, csio->dxfer_len);
+ rc = t4_write_page_pods_for_buf(sc, &toep->ofld_txq->wrq, toep->tid,
+ prsv, (vm_offset_t)csio->data_ptr, csio->dxfer_len);
if (rc != 0) {
t4_free_page_pods(prsv);
uma_zfree(prsv_zone, prsv);
@@ -957,8 +957,8 @@
goto no_ddp;
}
- rc = t4_write_page_pods_for_buf(sc, toep->ofld_txq, toep->tid,
- prsv, buf, xferlen);
+ rc = t4_write_page_pods_for_buf(sc, &toep->ofld_txq->wrq,
+ toep->tid, prsv, buf, xferlen);
if (rc != 0) {
t4_free_page_pods(prsv);
uma_zfree(prsv_zone, prsv);
Index: sys/dev/cxgbe/iw_cxgbe/qp.c
===================================================================
--- sys/dev/cxgbe/iw_cxgbe/qp.c
+++ sys/dev/cxgbe/iw_cxgbe/qp.c
@@ -1127,7 +1127,7 @@
CTR4(KTR_IW_CXGBE, "%s qhp %p qid 0x%x tid %u", __func__, qhp,
qhp->wq.sq.qid, qhp->ep->hwtid);
- wr = alloc_wrqe(sizeof(*wqe), toep->ofld_txq);
+ wr = alloc_wrqe(sizeof(*wqe), &toep->ofld_txq->wrq);
if (wr == NULL)
return;
wqe = wrtod(wr);
@@ -1259,7 +1259,7 @@
CTR5(KTR_IW_CXGBE, "%s qhp %p qid 0x%x ep %p tid %u", __func__, qhp,
qhp->wq.sq.qid, ep, ep->hwtid);
- wr = alloc_wrqe(sizeof(*wqe), toep->ofld_txq);
+ wr = alloc_wrqe(sizeof(*wqe), &toep->ofld_txq->wrq);
if (wr == NULL)
return (0);
wqe = wrtod(wr);
@@ -1353,7 +1353,7 @@
CTR5(KTR_IW_CXGBE, "%s qhp %p qid 0x%x ep %p tid %u", __func__, qhp,
qhp->wq.sq.qid, ep, ep->hwtid);
- wr = alloc_wrqe(sizeof(*wqe), toep->ofld_txq);
+ wr = alloc_wrqe(sizeof(*wqe), &toep->ofld_txq->wrq);
if (wr == NULL)
return (0);
wqe = wrtod(wr);
Index: sys/dev/cxgbe/t4_main.c
===================================================================
--- sys/dev/cxgbe/t4_main.c
+++ sys/dev/cxgbe/t4_main.c
@@ -6102,7 +6102,7 @@
struct sge_ofld_rxq *ofld_rxq;
#endif
#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
- struct sge_wrq *ofld_txq;
+ struct sge_ofld_txq *ofld_txq;
#endif
if (vi->flags & VI_INIT_DONE) {
@@ -6119,7 +6119,7 @@
#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
for_each_ofld_txq(vi, i, ofld_txq) {
- quiesce_wrq(sc, ofld_txq);
+ quiesce_wrq(sc, &ofld_txq->wrq);
}
#endif
@@ -10671,6 +10671,9 @@
struct sge_rxq *rxq;
struct sge_txq *txq;
struct sge_wrq *wrq;
+#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
+ struct sge_ofld_txq *ofld_txq;
+#endif
#ifdef TCP_OFFLOAD
struct sge_ofld_rxq *ofld_rxq;
#endif
@@ -10758,9 +10761,9 @@
}
#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
- for_each_ofld_txq(vi, i, wrq) {
- wrq->tx_wrs_direct = 0;
- wrq->tx_wrs_copied = 0;
+ for_each_ofld_txq(vi, i, ofld_txq) {
+ ofld_txq->wrq.tx_wrs_direct = 0;
+ ofld_txq->wrq.tx_wrs_copied = 0;
}
#endif
#ifdef TCP_OFFLOAD
Index: sys/dev/cxgbe/t4_sge.c
===================================================================
--- sys/dev/cxgbe/t4_sge.c
+++ sys/dev/cxgbe/t4_sge.c
@@ -1109,7 +1109,7 @@
struct sge_ofld_rxq *ofld_rxq;
#endif
#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
- struct sge_wrq *ofld_txq;
+ struct sge_ofld_txq *ofld_txq;
#endif
#ifdef DEV_NETMAP
int saved_idx;
@@ -1234,12 +1234,12 @@
device_get_nameunit(vi->dev), i);
if (vi->nofldrxq > 0) {
iqidx = vi->first_ofld_rxq + (i % vi->nofldrxq);
- init_eq(sc, &ofld_txq->eq, EQ_OFLD, vi->qsize_txq,
+ init_eq(sc, &ofld_txq->wrq.eq, EQ_OFLD, vi->qsize_txq,
pi->tx_chan, sc->sge.ofld_rxq[iqidx].iq.cntxt_id,
name);
} else {
iqidx = vi->first_rxq + (i % vi->nrxq);
- init_eq(sc, &ofld_txq->eq, EQ_OFLD, vi->qsize_txq,
+ init_eq(sc, &ofld_txq->wrq.eq, EQ_OFLD, vi->qsize_txq,
pi->tx_chan, sc->sge.rxq[iqidx].iq.cntxt_id, name);
}
@@ -1247,7 +1247,7 @@
oid2 = SYSCTL_ADD_NODE(&vi->ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
name, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "offload tx queue");
- rc = alloc_wrq(sc, vi, ofld_txq, oid2);
+ rc = alloc_wrq(sc, vi, &ofld_txq->wrq, oid2);
if (rc != 0)
goto done;
}
@@ -1271,7 +1271,7 @@
#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
struct port_info *pi = vi->pi;
struct adapter *sc = pi->adapter;
- struct sge_wrq *ofld_txq;
+ struct sge_ofld_txq *ofld_txq;
#endif
#ifdef TCP_OFFLOAD
struct sge_ofld_rxq *ofld_rxq;
@@ -1309,7 +1309,7 @@
}
#if defined(TCP_OFFLOAD) || defined(RATELIMIT)
for_each_ofld_txq(vi, i, ofld_txq) {
- free_wrq(sc, ofld_txq);
+ free_wrq(sc, &ofld_txq->wrq);
}
#endif
Index: sys/dev/cxgbe/tom/t4_cpl_io.c
===================================================================
--- sys/dev/cxgbe/tom/t4_cpl_io.c
+++ sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -108,7 +108,7 @@
flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval);
- wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq);
+ wr = alloc_wrqe(roundup2(flowclen, 16), &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -266,7 +266,7 @@
KASSERT(toep->flags & TPF_FLOWC_WR_SENT,
("%s: flowc_wr not sent for tid %d.", __func__, tid));
- wr = alloc_wrqe(sizeof(*req), toep->ofld_txq);
+ wr = alloc_wrqe(sizeof(*req), &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -491,7 +491,7 @@
KASSERT(toep->flags & TPF_FLOWC_WR_SENT,
("%s: flowc_wr not sent for tid %u.", __func__, tid));
- wr = alloc_wrqe(sizeof(*req), toep->ofld_txq);
+ wr = alloc_wrqe(sizeof(*req), &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -823,7 +823,7 @@
/* Immediate data tx */
wr = alloc_wrqe(roundup2(sizeof(*txwr) + plen, 16),
- toep->ofld_txq);
+ &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX: how will we recover from this? */
toep->flags |= TPF_TX_SUSPENDED;
@@ -841,7 +841,8 @@
wr_len = sizeof(*txwr) + sizeof(struct ulptx_sgl) +
((3 * (nsegs - 1)) / 2 + ((nsegs - 1) & 1)) * 8;
- wr = alloc_wrqe(roundup2(wr_len, 16), toep->ofld_txq);
+ wr = alloc_wrqe(roundup2(wr_len, 16),
+ &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX: how will we recover from this? */
toep->flags |= TPF_TX_SUSPENDED;
@@ -1018,7 +1019,7 @@
/* Immediate data tx */
wr = alloc_wrqe(roundup2(sizeof(*txwr) + plen, 16),
- toep->ofld_txq);
+ &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX: how will we recover from this? */
toep->flags |= TPF_TX_SUSPENDED;
@@ -1036,7 +1037,8 @@
/* DSGL tx */
wr_len = sizeof(*txwr) + sizeof(struct ulptx_sgl) +
((3 * (nsegs - 1)) / 2 + ((nsegs - 1) & 1)) * 8;
- wr = alloc_wrqe(roundup2(wr_len, 16), toep->ofld_txq);
+ wr = alloc_wrqe(roundup2(wr_len, 16),
+ &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX: how will we recover from this? */
toep->flags |= TPF_TX_SUSPENDED;
@@ -1351,13 +1353,13 @@
}
void
-send_abort_rpl(struct adapter *sc, struct sge_wrq *ofld_txq, int tid,
+send_abort_rpl(struct adapter *sc, struct sge_ofld_txq *ofld_txq, int tid,
int rst_status)
{
struct wrqe *wr;
struct cpl_abort_rpl *cpl;
- wr = alloc_wrqe(sizeof(*cpl), ofld_txq);
+ wr = alloc_wrqe(sizeof(*cpl), &ofld_txq->wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -1397,7 +1399,7 @@
const struct cpl_abort_req_rss *cpl = (const void *)(rss + 1);
unsigned int tid = GET_TID(cpl);
struct toepcb *toep = lookup_tid(sc, tid);
- struct sge_wrq *ofld_txq = toep->ofld_txq;
+ struct sge_ofld_txq *ofld_txq = toep->ofld_txq;
struct inpcb *inp;
struct tcpcb *tp;
struct epoch_tracker et;
Index: sys/dev/cxgbe/tom/t4_listen.c
===================================================================
--- sys/dev/cxgbe/tom/t4_listen.c
+++ sys/dev/cxgbe/tom/t4_listen.c
@@ -350,7 +350,7 @@
struct port_info *pi = vi->pi;
struct wrqe *wr;
struct fw_flowc_wr *flowc;
- struct sge_wrq *ofld_txq;
+ struct sge_ofld_txq *ofld_txq;
struct sge_ofld_rxq *ofld_rxq;
const int nparams = 6;
const int flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval);
@@ -362,7 +362,7 @@
ofld_txq = &sc->sge.ofld_txq[synqe->params.txq_idx];
ofld_rxq = &sc->sge.ofld_rxq[synqe->params.rxq_idx];
- wr = alloc_wrqe(roundup2(flowclen, 16), ofld_txq);
+ wr = alloc_wrqe(roundup2(flowclen, 16), &ofld_txq->wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -411,7 +411,8 @@
if (!(synqe->flags & TPF_FLOWC_WR_SENT))
send_flowc_wr_synqe(sc, synqe);
- wr = alloc_wrqe(sizeof(*req), &sc->sge.ofld_txq[synqe->params.txq_idx]);
+ wr = alloc_wrqe(sizeof(*req),
+ &sc->sge.ofld_txq[synqe->params.txq_idx].wrq);
if (wr == NULL) {
/* XXX */
panic("%s: allocation failure.", __func__);
@@ -885,7 +886,7 @@
struct synq_entry *synqe = lookup_tid(sc, tid);
struct listen_ctx *lctx = synqe->lctx;
struct inpcb *inp = lctx->inp;
- struct sge_wrq *ofld_txq;
+ struct sge_ofld_txq *ofld_txq;
#ifdef INVARIANTS
unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl)));
#endif
Index: sys/dev/cxgbe/tom/t4_tls.c
===================================================================
--- sys/dev/cxgbe/tom/t4_tls.c
+++ sys/dev/cxgbe/tom/t4_tls.c
@@ -70,7 +70,7 @@
{
struct adapter *sc = td_adapter(toep->td);
- t4_set_tcb_field(sc, toep->ofld_txq, toep, word, mask, val, 0, 0);
+ t4_set_tcb_field(sc, &toep->ofld_txq->wrq, toep, word, mask, val, 0, 0);
}
/* TLS and DTLS common routines */
@@ -518,7 +518,7 @@
keyid = get_keyid(tls_ofld, k_ctx->l_p_key);
}
- wr = alloc_wrqe(len, toep->ofld_txq);
+ wr = alloc_wrqe(len, &toep->ofld_txq->wrq);
if (wr == NULL) {
free_keyid(toep, keyid);
return (ENOMEM);
@@ -1596,7 +1596,7 @@
((3 * (nsegs - 1)) / 2 + ((nsegs - 1) & 1)) * 8;
}
- wr = alloc_wrqe(roundup2(wr_len, 16), toep->ofld_txq);
+ wr = alloc_wrqe(roundup2(wr_len, 16), &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX: how will we recover from this? */
toep->flags |= TPF_TX_SUSPENDED;
@@ -1907,7 +1907,7 @@
if (__predict_false(toep->flags & TPF_FIN_SENT))
panic("%s: excess tx.", __func__);
- wr = alloc_wrqe(roundup2(wr_len, 16), toep->ofld_txq);
+ wr = alloc_wrqe(roundup2(wr_len, 16), &toep->ofld_txq->wrq);
if (wr == NULL) {
/* XXX: how will we recover from this? */
toep->flags |= TPF_TX_SUSPENDED;
Index: sys/dev/cxgbe/tom/t4_tom.h
===================================================================
--- sys/dev/cxgbe/tom/t4_tom.h
+++ sys/dev/cxgbe/tom/t4_tom.h
@@ -185,7 +185,7 @@
int refcount;
struct vnet *vnet;
struct vi_info *vi; /* virtual interface */
- struct sge_wrq *ofld_txq;
+ struct sge_ofld_txq *ofld_txq;
struct sge_ofld_rxq *ofld_rxq;
struct sge_wrq *ctrlq;
struct l2t_entry *l2te; /* L2 table entry used by this connection */
@@ -396,7 +396,7 @@
int t4_aio_queue_aiotx(struct socket *, struct kaiocb *);
void t4_init_cpl_io_handlers(void);
void t4_uninit_cpl_io_handlers(void);
-void send_abort_rpl(struct adapter *, struct sge_wrq *, int , int);
+void send_abort_rpl(struct adapter *, struct sge_ofld_txq *, int , int);
void send_flowc_wr(struct toepcb *, struct tcpcb *);
void send_reset(struct adapter *, struct toepcb *, uint32_t);
int send_rx_credits(struct adapter *, struct toepcb *, int);
@@ -422,7 +422,7 @@
struct ppod_reservation *);
int t4_write_page_pods_for_ps(struct adapter *, struct sge_wrq *, int,
struct pageset *);
-int t4_write_page_pods_for_buf(struct adapter *, struct sge_wrq *, int tid,
+int t4_write_page_pods_for_buf(struct adapter *, struct sge_wrq *, int,
struct ppod_reservation *, vm_offset_t, int);
void t4_free_page_pods(struct ppod_reservation *);
int t4_soreceive_ddp(struct socket *, struct sockaddr **, struct uio *,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 2, 11:43 AM (3 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34595141
Default Alt Text
D29382.id86171.diff (13 KB)
Attached To
Mode
D29382: cxgbe: Add a struct sge_ofld_txq type.
Attached
Detach File
Event Timeline
Log In to Comment