diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-01-16 16:16:13 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-01-22 23:36:46 +0100 |
commit | 15be1bfd81ed6d0b708e0541429f8813ce8d0972 (patch) | |
tree | e35a928ac55650c03f9336ca5ca8206d3f8eb12f /tcp.c | |
parent | 24badd0acf887fdd9009e4c249bf0e68344ea49d (diff) | |
download | passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.tar passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.tar.gz passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.tar.bz2 passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.tar.lz passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.tar.xz passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.tar.zst passt-15be1bfd81ed6d0b708e0541429f8813ce8d0972.zip |
icmp: Simplify socket expiry scanning
Currently we use icmp_act[] to scan for ICMP ids which might have an open
socket which could time out. However icmp_act[] contains no information
that's not already in icmp_id_map[] - it's just an "index" which allows
scanning for relevant entries with less cache footprint.
We only scan for ICMP socket expiry every 1s, though, so it's not clear
that cache footprint really matters. Furthermore, there's no strong reason
we need to scan even that often - the timeout is fairly arbitrary and
approximate.
So, eliminate icmp_act[] in favour of directly scanning icmp_id_map[] and
compensate for the cache impact by reducing the scan frequency to once
every 10s.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
0 files changed, 0 insertions, 0 deletions