xsk: Change the tx writeable condition
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Tue, 1 Dec 2020 13:56:58 +0000 (21:56 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 3 Dec 2020 00:14:38 +0000 (01:14 +0100)
commit3413f04141aa440c71da187755e8e22f5093ce83
tree05f9cc0aa60f5e1bace31ef5778090229b28e8dc
parentf5da54187e33dce9bea63170667dbb0ca8d98194
xsk: Change the tx writeable condition

Modify the tx writeable condition from the queue is not full to the
number of present tx queues is less than the half of the total number
of queues. Because the tx queue not full is a very short time, this will
cause a large number of EPOLLOUT events, and cause a large number of
process wake up.

Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/508fef55188d4e1160747ead64c6dcda36735880.1606555939.git.xuanzhuo@linux.alibaba.com
net/xdp/xsk.c
net/xdp/xsk_queue.h