aboutgitcodebugslistschat
path: root/contrib
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-04-01 19:57:09 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-04-02 11:30:26 +0200
commit76e554d9ec8dc80c1856621e17e45be811d198d0 (patch)
treed277e6e7ffd83de5f286ab80b9eb5bb261e750b4 /contrib
parent8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6 (diff)
downloadpasst-76e554d9ec8dc80c1856621e17e45be811d198d0.tar
passt-76e554d9ec8dc80c1856621e17e45be811d198d0.tar.gz
passt-76e554d9ec8dc80c1856621e17e45be811d198d0.tar.bz2
passt-76e554d9ec8dc80c1856621e17e45be811d198d0.tar.lz
passt-76e554d9ec8dc80c1856621e17e45be811d198d0.tar.xz
passt-76e554d9ec8dc80c1856621e17e45be811d198d0.tar.zst
passt-76e554d9ec8dc80c1856621e17e45be811d198d0.zip
udp: Simplify updates to UDP flow timestamp
Since UDP has no built in knowledge of connections, the only way we know when we're done with a UDP flow is a timeout with no activity. To keep track of this struct udp_flow includes a timestamp to record the last time we saw traffic on the flow. For data from listening sockets and from tap, this is done implicitly via udp_flow_from_{sock,tap}() but for reply sockets it's done explicitly. However, that logic is duplicated between the vhost-user and "buf" paths. Make it common in udp_reply_sock_handler() instead. Technically this is a behavioural change: previously if we got an EPOLLIN event, but there wasn't actually any data we wouldn't update the timestamp, now we will. This should be harmless: if there's an EPOLLIN we expect there to be data, and even if there isn't the worst we can do is mildly delay the cleanup of a stale flow. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions