net: vhost: factor out busy polling logic to vhost_net_busy_poll()
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Tue, 25 Sep 2018 12:36:51 +0000 (05:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Sep 2018 03:25:55 +0000 (20:25 -0700)
commitdc151282bbdaed08e62f5c34c4842331d54b4628
tree010fc596904f11a5cf9caa4bcc16d9804248e2d2
parenta6a67a2f343c613752165101208bd096b0bba6e1
net: vhost: factor out busy polling logic to vhost_net_busy_poll()

Factor out generic busy polling logic and will be
used for in tx path in the next patch. And with the patch,
qemu can set differently the busyloop_timeout for rx queue.

To avoid duplicate codes, introduce the helper functions:
* sock_has_rx_data(changed from sk_has_rx_data)
* vhost_net_busy_poll_try_queue

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c