Two nits only: On Fri, 5 Jul 2024 12:07:21 +1000 David Gibson <david(a)gibson.dropbear.id.au> wrote:This replaces the last piece of existing UDP port tracking with the common flow table. Specifically use the flow table to direct datagrams from host sockets to the guest tap interface. Since this now requires a flow for every datagram, we add some logging if we encounter any datagrams for which we can't find or create a flow. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- flow_table.h | 14 ++++ udp.c | 188 +++++++++++++++------------------------------------ 2 files changed, 67 insertions(+), 135 deletions(-) diff --git a/flow_table.h b/flow_table.h index 1faac4a7..da9483b3 100644 --- a/flow_table.h +++ b/flow_table.h @@ -106,6 +106,20 @@ static inline uint8_t pif_at_sidx(flow_sidx_t sidx) return flow->f.pif[sidx.side]; } +/** flowside_at_sidx - Retrieve a specific flowsideflowside_at_sidx()+ * @sidx: Flow & side index + * + * Return: Flowside for the flow & side given by @sidx + */ +static inline const struct flowside *flowside_at_sidx(flow_sidx_t sidx) +{ + const union flow *flow = flow_at_sidx(sidx); + + if (!flow) + return PIF_NONE;Usual extra newline.+ return &flow->f.side[sidx.side]; +}I finished reviewing all the other patches, no further comments, everything else looks good to me. -- Stefano