yongari 494fd63ce2 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)
2006-08-14 01:50:54 +00:00
..
2006-04-30 16:44:41 +00:00
2006-07-09 16:31:53 +00:00
2006-08-11 21:19:29 +00:00
2006-08-10 16:31:37 +00:00
2006-06-02 23:14:40 +00:00
2006-08-07 12:51:50 +00:00
2006-06-12 03:28:42 +00:00
2006-06-11 22:25:01 +00:00
2005-12-17 07:09:17 +00:00
2006-05-26 13:51:38 +00:00
2006-06-12 04:30:42 +00:00
2006-06-12 04:00:33 +00:00
2006-06-02 23:14:40 +00:00
2006-08-12 01:19:37 +00:00
2006-06-05 17:59:46 +00:00
2006-07-14 04:36:57 +00:00
2006-05-20 21:08:09 +00:00
2006-08-12 09:06:55 +00:00
2006-08-02 04:54:14 +00:00
2006-07-13 11:47:36 +00:00
2006-05-16 15:23:27 +00:00
2006-08-12 01:24:37 +00:00
2006-07-17 21:18:03 +00:00
2006-07-14 04:35:59 +00:00
2006-05-26 13:54:27 +00:00
2006-08-12 01:30:38 +00:00
2006-04-30 16:46:11 +00:00
2006-08-05 04:58:25 +00:00
2006-06-19 11:30:36 +00:00
2006-05-26 18:25:34 +00:00