mirror of
https://passt.top/passt
synced 2025-07-30 21:08:01 +02:00
flow, tcp: Generalise TCP hash table to general flow hash table
Move the data structures and helper functions for the TCP hash table to flow.c, making it a general hash table indexing sides of flows. This is largely code motion and straightforward renames. There are two semantic changes: * flow_lookup_af() now needs to verify that the entry has a matching protocol and interface as well as matching addresses and ports. * We double the size of the hash table, because it's now at least theoretically possible for both sides of each flow to be hashed. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
163a339214
commit
acca4235c4
5 changed files with 172 additions and 145 deletions
|
@ -146,7 +146,4 @@ void flow_activate(struct flow_common *f);
|
|||
#define FLOW_ACTIVATE(flow_) \
|
||||
(flow_activate(&(flow_)->f))
|
||||
|
||||
uint64_t flow_hash(const struct ctx *c, uint8_t proto, uint8_t pif,
|
||||
const struct flowside *side);
|
||||
|
||||
#endif /* FLOW_TABLE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue