freebsd-dev/sys/dev/bxe
Randall Stewart ded5ea6a25 This fixes a out-of-order problem with several
of the newer drivers. The basic problem was
that the driver was pulling the mbuf off the
drbr ring and then when sending with xmit(), encounting
a full transmit ring. Thus the lower layer
xmit() function would return an error, and the
drivers would then append the data back on to the ring.
For TCP this is a horrible scenario sure to bring
on a fast-retransmit.

The fix is to use drbr_peek() to pull the data pointer
but not remove it from the ring. If it fails then
we either call the new drbr_putback or drbr_advance
method. Advance moves it forward (we do this sometimes
when the xmit() function frees the mbuf). When
we succeed we always call advance. The
putback will always copy the mbuf back to the top
of the ring. Note that the putback *cannot* be used
with a drbr_dequeue() only with drbr_peek(). We most
of the time, in putback, would not need to copy it
back since most likey the mbuf is still the same, but
sometimes xmit() functions will change the mbuf via
a pullup or other call. So the optimial case for
the single consumer is to always copy it back. If
we ever do a multiple_consumer (for lagg?) we
will  need a test and atomic in the put back possibly
a seperate putback_mc() in the ring buf.

Reviewed by:	jhb@freebsd.org, jlv@freebsd.org
2013-02-07 15:20:54 +00:00
..
bxe_debug.h
bxe_fw_defs.h
bxe_hsi.h Remove spurious 8bit chars, turning files into plain ASCII. 2012-01-15 13:23:33 +00:00
bxe_include.h
bxe_init_values_e1.h
bxe_init_values_e1h.h
bxe_init.h
bxe_link.c - change "is is" to "is" or "it is" 2011-10-16 14:30:28 +00:00
bxe_link.h
bxe_reg.h s/timout/timeout 2011-12-15 06:29:13 +00:00
bxe_self_test.h
dump_e1.h
dump_e1h.h
hw_dump_reg_st.h
if_bxe.c This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
if_bxe.h