kernel_optimize_test/drivers/net
Jack Morgenstein f4ec9e9531 mlx4_core: Change bitmap allocator to work in round-robin fashion
Under most circumstances, the bitmap allocator does not allocate the
same full 24-bit QP number immediately after a QP is destroyed.

This works by using the upper bits of a 24-bit QP number, beyond the
number of QPs that are actually available in the low level driver.
For example, say that the HCA is willing to allocate a maximum of 64K
qps.  We use the bits 23..16 as a "counter" which is incremented by 1
at each allocation so that even if the same physical QP is
re-allocated, it will not receive the same 24-bit QP number.

However, we have seen the following scenario:
1. Allocate, say, 255 QPs in succession.  This will cause a wrap of the "counter".
2. Destroy the first QP allocated, then allocate a new QP.  The new QP,
   because of the counter wraparound, will get the same FULL QP number as
   the QP just destroyed!

This is a problem because packets in transit can be erroneously
delivered to the new QP when they were meant for the old (destroyed)
QP, because the full QP number of the new QP is identical to the
destroyed QP.  (The "counter" mechanism is meant to prevent this by
having the full 24-bit QP numbers differ even if the physical QP on
the HCA is the same.  As we see above, however, this mechanism does
not always work).

The best fix for this problem is to allocate QPs in round-robin mode,
so that the physical QP numbers are not immediately re-used.

Found-by:  Matthew Finlay <matt@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-05-14 13:44:38 -07:00
..
appletalk Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
arcnet arcnet: rimi: Fix device name in debug output 2012-04-17 22:22:43 -04:00
bonding bonding: properly unset current_arp_slave on slave link up 2012-04-05 19:07:59 -04:00
caif caif_hsi: use dev_dbg not dev_err for reporting 2012-04-13 11:01:44 -04:00
can can: usb: PCAN-USB Pro: fix mem leaks in pcan_usb_pro_init() on error paths 2012-04-16 21:34:50 +02:00
cris Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
dsa
ethernet mlx4_core: Change bitmap allocator to work in round-robin fashion 2012-05-14 13:44:38 -07:00
fddi
hamradio Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hippi Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hyperv net/hyperv: Adding cancellation to ensure rndis filter is closed 2012-04-21 15:38:10 -04:00
irda ARM: sa11x0: fix build errors from DMA engine API updates 2012-03-30 11:46:20 +01:00
phy icplus: fix interrupt for IC+ 101A/G and 1001LF 2012-04-19 15:34:18 -04:00
plip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ppp ppp: Fix race condition with queue start/stop 2012-04-13 13:06:47 -04:00
slip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
team
tokenring Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
usb usbnet: fix failure handling in usbnet_probe 2012-05-02 20:13:04 -04:00
vmxnet3
wan drivers/net/wan/farsync.c: add missing iounmap 2012-04-17 22:31:59 -04:00
wimax Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
wireless wl1251: fix crash on remove due to leftover work item 2012-04-27 15:25:25 -04:00
xen-netback
dummy.c dummy: Add ndo_uninit(). 2012-04-16 23:56:36 -04:00
eql.c eql: dont rely on HZ=100 2012-03-27 22:45:26 -04:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
rionet.c rionet: fix page allocation order of rionet_active 2012-04-01 23:17:16 -04:00
sb1000.c
Space.c
sungem_phy.c
tun.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
veth.c
virtio_net.c net: Fix misplaced parenthesis in virtio_net.c 2012-04-13 11:01:44 -04:00
xen-netfront.c Two fixes for regressions: 2012-04-06 17:54:53 -07:00