diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-02-29 15:15:32 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-03-12 01:34:45 +0100 |
commit | 3af5e9fdba4cbff1389e507489578f81d21a5181 (patch) | |
tree | c06a9e3bb3ed2a9c72dc08d0d4c51121e4eb8efa /flow_table.h | |
parent | 383a6f67e50bbaf63427c9a2dddfd0c22a886160 (diff) | |
download | passt-3af5e9fdba4cbff1389e507489578f81d21a5181.tar passt-3af5e9fdba4cbff1389e507489578f81d21a5181.tar.gz passt-3af5e9fdba4cbff1389e507489578f81d21a5181.tar.bz2 passt-3af5e9fdba4cbff1389e507489578f81d21a5181.tar.lz passt-3af5e9fdba4cbff1389e507489578f81d21a5181.tar.xz passt-3af5e9fdba4cbff1389e507489578f81d21a5181.tar.zst passt-3af5e9fdba4cbff1389e507489578f81d21a5181.zip |
icmp: Store ping socket information in flow table
Currently icmp_id_map[][] stores information about ping sockets in a
bespoke structure. Move the same information into new types of flow
in the flow table. To match that change, replace the existing ICMP
timer with a flow-based timer for expiring ping sockets. This has the
advantage that we only need to scan the active flows, not all possible
ids.
We convert icmp_id_map[][] to point to the flow table entries, rather
than containing its own information. We do still use that array for
locating the right ping flows, rather than using a "flow native" form
of lookup for the time being.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[sbrivio: Update id_sock description in comment to icmp_ping_new()]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'flow_table.h')
-rw-r--r-- | flow_table.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/flow_table.h b/flow_table.h index eecf884..b7e5529 100644 --- a/flow_table.h +++ b/flow_table.h @@ -8,6 +8,7 @@ #define FLOW_TABLE_H #include "tcp_conn.h" +#include "icmp_flow.h" /** * struct flow_free_cluster - Information about a cluster of free entries @@ -33,6 +34,7 @@ union flow { struct flow_free_cluster free; struct tcp_tap_conn tcp; struct tcp_splice_conn tcp_splice; + struct icmp_ping_flow ping; }; /* Global Flow Table */ |