aboutgitcodebugslistschat
path: root/contrib/qemu
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-03-26 14:44:02 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-03-26 21:34:23 +0100
commit5a977c2f4ee8926673554b2b456e7791962b2ce2 (patch)
tree2e64bb61347f68d2dc8a2954fa57019fb2a876db /contrib/qemu
parent89b203b851f32a532cc0406cf26a1d24950a207c (diff)
downloadpasst-5a977c2f4ee8926673554b2b456e7791962b2ce2.tar
passt-5a977c2f4ee8926673554b2b456e7791962b2ce2.tar.gz
passt-5a977c2f4ee8926673554b2b456e7791962b2ce2.tar.bz2
passt-5a977c2f4ee8926673554b2b456e7791962b2ce2.tar.lz
passt-5a977c2f4ee8926673554b2b456e7791962b2ce2.tar.xz
passt-5a977c2f4ee8926673554b2b456e7791962b2ce2.tar.zst
passt-5a977c2f4ee8926673554b2b456e7791962b2ce2.zip
udp: Simplify checking of epoll event bits
udp_{listen,reply}_sock_handler() can accept both EPOLLERR and EPOLLIN events. However, unlike most epoll event handlers we don't check the event bits right there. EPOLLERR is checked within udp_sock_errs() which we call unconditionally. Checking EPOLLIN is still more buried: it is checked within both udp_sock_recv() and udp_vu_sock_recv(). We can simplify the logic and pass less extraneous parameters around by moving the checking of the event bits to the top level event handlers. This makes udp_{buf,vu}_{listen,reply}_sock_handler() no longer general event handlers, but specific to EPOLLIN events, meaning new data. So, rename those functions to udp_{buf,vu}_{listen,reply}_sock_data() to better reflect their function. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/qemu')
0 files changed, 0 insertions, 0 deletions