Date: Mon, 29 Mar 2010 01:03:37 +0200 From: Max Laier <max@love2party.net> To: Jack F Vogel <jfv@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205720 - in head/sys: dev/ixgbe modules/ixgbe Message-ID: <201003290103.37621.max@love2party.net> In-Reply-To: <201003270021.o2R0LebO003969@svn.freebsd.org> References: <201003270021.o2R0LebO003969@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 27 March 2010 01:21:40 Jack F Vogel wrote: > Author: jfv > Date: Sat Mar 27 00:21:40 2010 > New Revision: 205720 > URL: http://svn.freebsd.org/changeset/base/205720 > > Log: > Update the driver to Intel version 2.1.6 > - add some new hardware support for 82599 > - Big change to interrupt architecture, it now > uses a queue which contains an RX/TX pair as > the recipient of the interrupt. This will reduce > overall system interrupts/msix usage. > - Improved RX mbuf handling: the old get_buf routine > is no longer synchronized with rxeof, this allows > the elimination of packet discards due to mbuf > allocation failure. > - Much simplified and improved AIM code, it now > happens in the queue interrupt context and takes > into account both the traffic on the RX AND TX > side. > - variety of small tweaks, like ring size, that have > been seen as performance improvements. > - Thanks to those that provided feedback or suggested > changes, I hope I've caught all of them. This seems to introduce the same error in drbr handling that I just fixed for e1000 & friend - c.f. r203834. This results in ALTQ not working on these interfaces. Let me know if you have any questions, more details in-line. > Modified: head/sys/dev/ixgbe/ixgbe.c > =========================================================================== > === --- head/sys/dev/ixgbe/ixgbe.c Fri Mar 26 23:44:51 2010 (r205719) > +++ head/sys/dev/ixgbe/ixgbe.c Sat Mar 27 00:21:40 2010 (r205720) ... > @@ -849,59 +817,43 @@ ixgbe_mq_start_locked(struct ifnet *ifp, > { > struct adapter *adapter = txr->adapter; > struct mbuf *next; > - int err = 0; > + int enqueued, err = 0; > > - if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || > - (!adapter->link_active)) { > - err = drbr_enqueue(ifp, txr->br, m); > + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != > + IFF_DRV_RUNNING || adapter->link_active == 0) { > + if (m != NULL) > + err = drbr_enqueue(ifp, txr->br, m); > return (err); > } > > - if (m == NULL) /* Called by tasklet */ > - goto process; > - > - /* If nothing queued go right to xmit */ > - if (!drbr_needs_enqueue(ifp, txr->br)) { > - if ((err = ixgbe_xmit(txr, &m)) != 0) { > - if (m != NULL) > - err = drbr_enqueue(ifp, txr->br, m); > - return (err); > - } else { > - /* Success, update stats */ > - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); > - /* Send a copy of the frame to the BPF listener */ > - ETHER_BPF_MTAP(ifp, m); > - /* Set the watchdog */ > - txr->watchdog_check = TRUE; > - } > - > - } else if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) > - return (err); > - > -process: > - if (drbr_empty(ifp, txr->br)) > - return (err); > + enqueued = 0; > + if (m == NULL) > + next = drbr_dequeue(ifp, txr->br); > + else > + next = m; The new start_locked logic looks like the old igb. An adaption of my diff: http://svn.freebsd.org/viewvc/base/head/sys/dev/e1000/if_igb.c?r1=203834&r2=203833&pathrev=203834 should make things work. > /* Process the queue */ > - while (TRUE) { > - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) > - break; > - next = drbr_dequeue(ifp, txr->br); > - if (next == NULL) > - break; > + while (next != NULL) { > if ((err = ixgbe_xmit(txr, &next)) != 0) { > if (next != NULL) > err = drbr_enqueue(ifp, txr->br, next); > break; > } > + enqueued++; > drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); > + /* Send a copy of the frame to the BPF listener */ > ETHER_BPF_MTAP(ifp, next); > - /* Set the watchdog */ > - txr->watchdog_check = TRUE; > + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) > + break; > + if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) { > + ifp->if_drv_flags |= IFF_DRV_OACTIVE; > + break; > + } > + next = drbr_dequeue(ifp, txr->br); > } > - > - if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) > - ifp->if_drv_flags |= IFF_DRV_OACTIVE; > + > + if (enqueued > 0) > + txr->watchdog_check = TRUE; > > return (err); > } Regards, Max
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003290103.37621.max>