From 98d82ca04ba438cd2ba3c03de6e1e82e4786cd83 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Tue, 2 Feb 2021 13:25:40 +0100 Subject: nat: fix EI hairpinning thread safety Avoid doing inter-thread reads without locks by doing a handoff before destination address rewrite. Destination address is read from a session which is possibly owned by a different thread. By splitting the work in two parts with a handoff in the middle, we can do both in a thread safe way. Type: improvement Signed-off-by: Klement Sekera Change-Id: I1c50d188393a610f5564fa230c75771a8065f273 --- src/vnet/buffer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vnet/buffer.h') diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h index aae999620ac..88637e1d902 100644 --- a/src/vnet/buffer.h +++ b/src/vnet/buffer.h @@ -378,6 +378,7 @@ typedef struct struct { u32 flags; + u32 required_thread_index; } snat; u32 unused[6]; -- cgit 1.2.3-korg