From owner-svn-src-all@FreeBSD.ORG Sat Mar 5 03:27:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2355D1065672; Sat, 5 Mar 2011 03:27:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 070158FC14; Sat, 5 Mar 2011 03:27:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p253REiP099297; Sat, 5 Mar 2011 03:27:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p253REVA099293; Sat, 5 Mar 2011 03:27:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103050327.p253REVA099293@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 5 Mar 2011 03:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219289 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Mar 2011 03:27:15 -0000 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);