summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-02-26 23:12:59 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-02-26 23:12:59 +0000
commitd8edb5b8ec2bc74ae198b2dd5f60c2093019f7a8 (patch)
tree44be20c22cb8203b55a370b8f070bef326316e2c /sys
parentf9f23b060986bd47ae476ee89aea3bd986912b2e (diff)
tweak the mbuf loading in the tx path so it's easier to read.
count mbuf load failures as output errors so i can see if that's a problem (it's not, but at least i can see it isn't now).
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ixl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c
index efb1804ef9b..2c938e584de 100644
--- a/sys/dev/pci/if_ixl.c
+++ b/sys/dev/pci/if_ixl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ixl.c,v 1.22 2019/02/26 03:17:18 dlg Exp $ */
+/* $OpenBSD: if_ixl.c,v 1.23 2019/02/26 23:12:58 dlg Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -2267,7 +2267,11 @@ ixl_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m)
error = bus_dmamap_load_mbuf(dmat, map, m,
BUS_DMA_STREAMING | BUS_DMA_NOWAIT);
- if (error != EFBIG || m_defrag(m, M_DONTWAIT) != 0)
+ if (error != EFBIG)
+ return (error);
+
+ error = m_defrag(m, M_DONTWAIT);
+ if (error != 0)
return (error);
return (bus_dmamap_load_mbuf(dmat, map, m,
@@ -2323,6 +2327,7 @@ ixl_start(struct ifqueue *ifq)
map = txm->txm_map;
if (ixl_load_mbuf(sc->sc_dmat, map, m) != 0) {
+ ifq->ifq_errors++;
m_freem(m);
continue;
}