Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/pci/ixgbe Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/509307d93d32
branches:  netbsd-8
changeset: 435250:509307d93d32
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Sep 07 12:37:20 2018 +0000

description:
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

diffstat:

 sys/dev/pci/ixgbe/ix_txrx.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r cdc67cc9b1ff -r 509307d93d32 sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c       Fri Sep 07 12:34:18 2018 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c       Fri Sep 07 12:37:20 2018 +0000
@@ -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 @@
 {
        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 @@
 
        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);



Home | Main Index | Thread Index | Old Index