summaryrefslogtreecommitdiffstats
path: root/fs/lockd/svcsubs.c
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2019-12-19 13:39:26 +0100
committerAlexei Starovoitov <ast@kernel.org>2019-12-20 16:00:09 -0800
commitc5ed924b54c892ee637d2e6889ef83341835a560 (patch)
tree344a4394b00e50605ff67be098e8ac856ac5647b /fs/lockd/svcsubs.c
parentdf0ae6f78a45e5696427779fc3379c5d75f5d4a5 (diff)
downloadlinux-stable-c5ed924b54c892ee637d2e6889ef83341835a560.tar.gz
linux-stable-c5ed924b54c892ee637d2e6889ef83341835a560.tar.bz2
linux-stable-c5ed924b54c892ee637d2e6889ef83341835a560.zip
xsk: Simplify the consumer ring access functions
Simplify and refactor consumer ring functions. The consumer first "peeks" to find descriptors or addresses that are available to read from the ring, then reads them and finally "releases" these descriptors once it is done. The two local variables cons_tail and cons_head are turned into one single variable called cached_cons. cached_tail referred to the cached value of the global consumer pointer and will be stored in cached_cons. For cached_head, we just use cached_prod instead as it was not used for a consumer queue before. It also better reflects what it really is now: a cached copy of the producer pointer. The names of the functions are also renamed in the same manner as the producer functions. The new functions are called xskq_cons_ followed by what it does. 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-8-git-send-email-magnus.karlsson@intel.com
Diffstat (limited to 'fs/lockd/svcsubs.c')
0 files changed, 0 insertions, 0 deletions