aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2020-06-23 16:43:28 -0400
committerJason Gunthorpe <jgg@nvidia.com>2020-06-24 16:13:38 -0300
commit38fd98afeeb79d3b148db49f81f2ec6a37a4ee00 (patch)
tree8c3b8047aacb3a84a6253e505461199c40407fb0 /include
parentIB/hfi1: Correct -EBUSY handling in tx code (diff)
downloadwireguard-linux-38fd98afeeb79d3b148db49f81f2ec6a37a4ee00.tar.xz
wireguard-linux-38fd98afeeb79d3b148db49f81f2ec6a37a4ee00.zip
IB/hfi1: Add atomic triggered sleep/wakeup
When running iperf in a two host configuration the following trace can occur: [ 319.728730] NETDEV WATCHDOG: ib0 (hfi1): transmit queue 0 timed out The issue happens because the current implementation relies on the netif txq being stopped to control the flushing of the tx list. There are two resources that the transmit logic can wait on and stop the txq: - SDMA descriptors - Ring space to hold completions The ring space is tested on the sending side and relieved when the ring is consumed in the napi tx reaping. Unfortunately, that reaping can run conncurrently with the workqueue flushing of the txlist. If the txq is started just before the workitem executes, the txlist will never be flushed, leading to the txq being stuck. Fix by: - Adding sleep/wakeup wrappers * Use an atomic to control the call to the netif routines inside the wrappers - Use another atomic to record ring space exhaustion * Only wakeup when the a ring space exhaustion has happened and it relieved Add additional wrappers to clarify the ring space resource handling. Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets") Link: https://lore.kernel.org/r/20200623204327.108092.4024.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan <kaike.wan@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions