linux-stable/net/xdp
Magnus Karlsson 6b8fec241d xsk: Simplify detection of empty and full rings
[ Upstream commit 11cc2d2149 ]

In order to set the correct return flags for poll, the xsk code has to
check if the Rx queue is empty and if the Tx queue is full. This code
was unnecessarily large and complex as it used the functions that are
used to update the local state from the global state (xskq_nb_free and
xskq_nb_avail). Since we are not doing this nor updating any data
dependent on this state, we can simplify the functions. Another
benefit from this is that we can also simplify the xskq_nb_free and
xskq_nb_avail functions in a later commit.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1576759171-28550-3-git-send-email-magnus.karlsson@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 10:59:48 +02:00
..
Kconfig
Makefile
xdp_umem.c xsk: Add overflow check for u64 division, stored into u32 2020-06-03 08:19:48 +02:00
xdp_umem.h
xdp_umem_props.h
xsk.c xsk: Fix xsk_poll()'s return type 2020-12-30 11:25:44 +01:00
xsk_queue.c
xsk_queue.h xsk: Simplify detection of empty and full rings 2021-05-22 10:59:48 +02:00