]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: Remove unnecessary READ_ONCE of data
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 19 Dec 2019 12:39:29 +0000 (13:39 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 21 Dec 2019 00:00:09 +0000 (16:00 -0800)
commit5840334947d46eb3e4ead3a92d9d036f843e6463
treee2b70e5a4cebd0e99f5cbbd8dfd4d5df94cb8db6
parent61d2b0a36d09f25184f16a5190b1b5f233107a85
xsk: Remove unnecessary READ_ONCE of data

There are two unnecessary READ_ONCE of descriptor data. These are not
needed since the data is written by the producer before it signals
that the data is available by incrementing the producer pointer. As the
access to this producer pointer is serialized and the consumer always
reads the descriptor after it has read and synchronized with the
producer counter, the write of the descriptor will have fully
completed and it does not matter if the consumer has any read tearing.

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-11-git-send-email-magnus.karlsson@intel.com
net/xdp/xsk_queue.h