Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Fix a bug that ixgbe_mq_start(an if_transm...
details: https://anonhg.NetBSD.org/src/rev/a552e72acacf
branches: trunk
changeset: 433291:a552e72acacf
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Sep 06 08:20:12 2018 +0000
description:
Fix a bug that ixgbe_mq_start(an if_transmit function) returned wrong
vaue 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 cb3eec40376d -r a552e72acacf sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c Thu Sep 06 07:56:40 2018 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c Thu Sep 06 08:20:12 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.49 2018/07/31 09:19:34 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.50 2018/09/06 08:20:12 msaitoh 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