Module Name: src Committed By: martin Date: Fri Sep 7 12:37:20 UTC 2018
Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1014): sys/dev/pci/ixgbe/ix_txrx.c: revision 1.50 Fix a bug that ixgbe_mq_start(an if_transmit function) returned wrong value on error. pcq_put returns false on error, so returning it to caller indicated no error. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.24.2.12 -r1.24.2.13 src/sys/dev/pci/ixgbe/ix_txrx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.12 src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.13 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.12 Tue Aug 7 13:33:23 2018 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Fri Sep 7 12:37:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.24.2.12 2018/08/07 13:33:23 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.24.2.13 2018/09/07 12:37:20 martin Exp $ */ /****************************************************************************** @@ -202,7 +202,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct { struct adapter *adapter = ifp->if_softc; struct tx_ring *txr; - int i, err = 0; + int i; #ifdef RSS uint32_t bucket_id; #endif @@ -238,11 +238,10 @@ ixgbe_mq_start(struct ifnet *ifp, struct txr = &adapter->tx_rings[i]; - err = pcq_put(txr->txr_interq, m); - if (err == false) { + if (__predict_false(!pcq_put(txr->txr_interq, m))) { m_freem(m); txr->pcq_drops.ev_count++; - return (err); + return ENOBUFS; } if (IXGBE_TX_TRYLOCK(txr)) { ixgbe_mq_start_locked(ifp, txr);