diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-18 15:26:46 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-19 18:33:39 +0200 |
commit | a45a7e97982acc7c9d00fddb0192fbbfcd2030d6 (patch) | |
tree | 371c1d0ce44f09463702386c6dc0c75a6b65cf1c /flow.h | |
parent | 8abd06e9fac93b60cc98d90f7310d94cfc295090 (diff) | |
download | passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.tar passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.tar.gz passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.tar.bz2 passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.tar.lz passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.tar.xz passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.tar.zst passt-a45a7e97982acc7c9d00fddb0192fbbfcd2030d6.zip |
udp: Create flows for datagrams from originating sockets
This implements the first steps of tracking UDP packets with the flow table
rather than its own (buggy) set of port maps. Specifically we create flow
table entries for datagrams received from a socket (PIF_HOST or
PIF_SPLICE).
When splitting datagrams from sockets into batches, we group by the flow
as well as splicesrc. This may result in smaller batches, but makes things
easier down the line. We can re-optimise this later if necessary. For now
we don't do anything else with the flow, not even match reply packets to
the same flow.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'flow.h')
-rw-r--r-- | flow.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -115,6 +115,8 @@ enum flow_type { FLOW_PING4, /* ICMPv6 echo requests from guest to host and matching replies back */ FLOW_PING6, + /* UDP pseudo-connection */ + FLOW_UDP, FLOW_NUM_TYPES, }; @@ -238,6 +240,8 @@ flow_sidx_t flow_lookup_af(const struct ctx *c, uint8_t proto, uint8_t pif, sa_family_t af, const void *eaddr, const void *faddr, in_port_t eport, in_port_t fport); +flow_sidx_t flow_lookup_sa(const struct ctx *c, uint8_t proto, uint8_t pif, + const void *esa, in_port_t fport); union flow; |