aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phylink.c
diff options
context:
space:
mode:
authorBernd Eckstein <3erndeckstein@gmail.com>2019-05-20 17:31:09 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-21 13:10:52 -0700
commit94d250fae48e6f873d8362308f5c4d02cd1b1fd2 (patch)
tree15785936b3f238629f44947280edfe7362d42b41 /drivers/net/phy/phylink.c
parentnet: stmmac: dma channel control register need to be init first (diff)
downloadlinux-dev-94d250fae48e6f873d8362308f5c4d02cd1b1fd2.tar.xz
linux-dev-94d250fae48e6f873d8362308f5c4d02cd1b1fd2.zip
usbnet: ipheth: fix racing condition
Fix a racing condition in ipheth.c that can lead to slow performance. Bug: In ipheth_tx(), netif_wake_queue() may be called on the callback ipheth_sndbulk_callback(), _before_ netif_stop_queue() is called. When this happens, the queue is stopped longer than it needs to be, thus reducing network performance. Fix: Move netif_stop_queue() in front of usb_submit_urb(). Now the order is always correct. In case, usb_submit_urb() fails, the queue is woken up again as callback will not fire. Testing: This racing condition is usually not noticeable, as it has to occur very frequently to slowdown the network. The callback from the USB is usually triggered slow enough, so the situation does not appear. However, on a Ubuntu Linux on VMWare Workstation, running on Windows 10, the we loose the race quite often and the following speedup can be noticed: Without this patch: Download: 4.10 Mbit/s, Upload: 4.01 Mbit/s With this patch: Download: 36.23 Mbit/s, Upload: 17.61 Mbit/s Signed-off-by: Oliver Zweigle <Oliver.Zweigle@faro.com> Signed-off-by: Bernd Eckstein <3ernd.Eckstein@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phylink.c')
0 files changed, 0 insertions, 0 deletions