bnx: Create dedicated thread for RX standard ring refilling
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 14 Apr 2013 08:29:06 +0000 (16:29 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 14 Apr 2013 10:14:20 +0000 (18:14 +0800)
commit841cdf08263117c54b0a800440c7630b6913c21e
treefc915511e33b816e80291380efbb0f93a7fa4198
parent29c8ea87102153195ef4903303a25afcf4c5c7cc
bnx: Create dedicated thread for RX standard ring refilling

The RX standard ring descriptors and RX standard producer index register
are updated only in the dedicated thread.  The RX standard ring software
ring data are shared between RX return rings' processing threads and the
dedicated thread.  The RX standard ring software ring data are updated in
lockless fashion, since only one RX return ring could be the owner of the
entry of RX standard ring software ring data.

The RX standard ring refilling thread scheduling is optimized that only
when certain amount of packets are received by the RX return ring, the
RX standard ring refiling thread will be scheduled.

This prepares for the multiple RX rings support.
sys/dev/netif/bnx/if_bnx.c
sys/dev/netif/bnx/if_bnxvar.h