freebsd-dev/sys/ofed/drivers/net/mlx4
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
..
alloc.c
catas.c
cmd.c
cq.c
en_cq.c - Correct the vlan filter programming. The device filter is built in 2011-03-23 02:47:04 +00:00
en_ethtool.c - Implement wake-on-lan support in mlxen. 2011-03-26 00:54:01 +00:00
en_frag.c Add OFED and the associated options and drivers to x86 LINT builds: 2012-04-12 14:01:06 +00:00
en_main.c
en_netdev.c remove duplicate semicolons where possible. 2012-10-22 03:00:37 +00:00
en_params.c
en_port.c Properly parse 40G media types from newer Mellanox adapters that are 2012-04-10 14:01:09 +00:00
en_port.h Properly parse 40G media types from newer Mellanox adapters that are 2012-04-10 14:01:09 +00:00
en_resources.c
en_rx.c remove duplicate semicolons where possible. 2012-10-22 03:00:37 +00:00
en_selftest.c
en_tx.c This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
eq.c
fw.c - Implement wake-on-lan support in mlxen. 2011-03-26 00:54:01 +00:00
fw.h - Implement wake-on-lan support in mlxen. 2011-03-26 00:54:01 +00:00
icm.c
icm.h
intf.c
main.c - Implement wake-on-lan support in mlxen. 2011-03-26 00:54:01 +00:00
Makefile
mcg.c
mlx4_en.h - Implement wake-on-lan support in mlxen. 2011-03-26 00:54:01 +00:00
mlx4.h
mr.c
pd.c
port.c
profile.c
qp.c
reset.c
sense.c
srq.c
xrcd.c