Date: Sat, 5 Mar 2011 03:27:14 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219289 - head/sys/dev/cxgbe Message-ID: <201103050327.p253REVA099293@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Sat Mar 5 03:27:14 2011 New Revision: 219289 URL: http://svn.freebsd.org/changeset/base/219289 Log: Store the ifnet rather than the port_info in each txq and rxq struct. MFC after: 1 week Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Sat Mar 5 03:18:56 2011 (r219288) +++ head/sys/dev/cxgbe/adapter.h Sat Mar 5 03:27:14 2011 (r219289) @@ -314,7 +314,7 @@ struct sge_txq { struct mbuf *m; /* held up due to temporary resource shortage */ struct task resume_tx; - struct port_info *port; /* the port this txq belongs to */ + struct ifnet *ifp; /* the interface this txq belongs to */ /* stats for common events first */ @@ -343,7 +343,7 @@ struct sge_rxq { struct sge_fl fl; unsigned int flags; - struct port_info *port; /* the port this rxq belongs to */ + struct ifnet *ifp; /* the interface this rxq belongs to */ struct lro_ctrl lro; /* LRO state */ /* stats for common events first */ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Mar 5 03:18:56 2011 (r219288) +++ head/sys/dev/cxgbe/t4_main.c Sat Mar 5 03:27:14 2011 (r219289) @@ -2649,10 +2649,9 @@ void cxgbe_txq_start(void *arg, int count) { struct sge_txq *txq = arg; - struct ifnet *ifp = txq->port->ifp; TXQ_LOCK(txq); - txq_start(ifp, txq); + txq_start(txq->ifp, txq); TXQ_UNLOCK(txq); } Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Mar 5 03:18:56 2011 (r219288) +++ head/sys/dev/cxgbe/t4_sge.c Sat Mar 5 03:27:14 2011 (r219289) @@ -531,11 +531,10 @@ t4_intr_data(void *arg) { struct sge_rxq *rxq = arg; struct sge_iq *iq = arg; + struct adapter *sc = iq->adapter; struct rsp_ctrl *ctrl; struct sge_fl *fl = &rxq->fl; - struct port_info *pi = rxq->port; - struct ifnet *ifp = pi->ifp; - struct adapter *sc = pi->adapter; + struct ifnet *ifp = rxq->ifp; const struct rss_header *rss; const struct cpl_rx_pkt *cpl; int ndescs = 0, rsp_type; @@ -1193,7 +1192,7 @@ alloc_rxq(struct port_info *pi, struct s if (pi->ifp->if_capenable & IFCAP_LRO) rxq->flags |= RXQ_LRO_ENABLED; #endif - rxq->port = pi; + rxq->ifp = pi->ifp; children = SYSCTL_CHILDREN(pi->oid_rxq); @@ -1246,7 +1245,7 @@ alloc_txq(struct port_info *pi, struct s struct sysctl_oid *oid; struct sysctl_oid_list *children; - txq->port = pi; + txq->ifp = pi->ifp; TASK_INIT(&txq->resume_tx, 0, cxgbe_txq_start, txq); mtx_init(&eq->eq_lock, eq->lockname, NULL, MTX_DEF); @@ -2393,9 +2392,11 @@ handle_sge_egr_update(struct adapter *sc unsigned int qid = G_EGR_QID(ntohl(cpl->opcode_qid)); struct sge *s = &sc->sge; struct sge_txq *txq; + struct port_info *pi; txq = (void *)s->eqmap[qid - s->eq_start]; - taskqueue_enqueue(txq->port->tq, &txq->resume_tx); + pi = txq->ifp->if_softc; + taskqueue_enqueue(pi->tq, &txq->resume_tx); txq->egr_update++; return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103050327.p253REVA099293>