summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2006-08-14 01:50:54 +0000
committeryongari <yongari@FreeBSD.org>2006-08-14 01:50:54 +0000
commit494fd63ce267ca352d6bf5af3a85075eecd61d76 (patch)
tree6eed63de61e6189ea773abee68740bbdf1ae38fe /lib/libc/stdlib
parent78a915dfb7092a6ecf5af7f964f1d652d4879f6f (diff)
downloadFreeBSD-src-494fd63ce267ca352d6bf5af3a85075eecd61d76.zip
FreeBSD-src-494fd63ce267ca352d6bf5af3a85075eecd61d76.tar.gz
Overhaul Rx path to recover from mbuf cluster allocation failure.
o Create one more spare DMA map for Rx handler to recover from bus_dmamap_load_mbuf_sg(9) failure. o Make sure to update status bit in Rx descriptors even if we failed to allocate a new buffer. Previously it resulted in stuck condition and em_handle_rxtx task took up all available CPU cycles. o Don't blindly unload DMA map. Reuse loaded DMA map if received packet has errors. This would speed up Rx processing a bit under heavy load as it does not need to reload DMA map in case of error. (bus_dmamap_load_mbuf_sg(9) is the most expensive call in driver context.) o Update if_iqdrops counter if it can't allocate a mbuf cluster. With this change it's now possible to see queue dropped packets with netstat(1). o Update mbuf_cluster_failed counter if fixup code failed to allocate mbuf header. o Return ENOBUFS instead of ENOMEM in case of Rx fixup failure. o Make adapter->lmp NULL in case of Rx fixup failure. Strictly specking it's not necessary for correct operation but it makes the intention clear. o Remove now unused dropped_pkts member in softc. With these changes em(4) should survive mbuf cluster allocation failure on Rx path. Reviewed by: pdeuskar, glebius (with improvements)
Diffstat (limited to 'lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud