From: Florin Coras Date: Wed, 7 Jul 2021 04:07:50 +0000 (-0700) Subject: tcp session: next node config on connects X-Git-Tag: v22.02-rc0~211 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=48057bd23433a352338358ca1f6cdc6cebd84f08;p=vpp.git tcp session: next node config on connects Type: improvement Signed-off-by: Florin Coras Change-Id: Ief06b1509d31b55efc8d1436b6ff9e01c6037a32 --- diff --git a/src/vnet/session/transport_types.h b/src/vnet/session/transport_types.h index 9fabac5deaa..9ea1f2102b4 100644 --- a/src/vnet/session/transport_types.h +++ b/src/vnet/session/transport_types.h @@ -202,11 +202,15 @@ typedef enum transport_endpt_cfg_flags_ TRANSPORT_CFG_F_UNIDIRECTIONAL = 1 << 1, } transport_endpt_cfg_flags_t; +/* clang-format off */ #define foreach_transport_endpoint_cfg_fields \ foreach_transport_endpoint_fields \ - _(transport_endpoint_t, peer) \ - _(u16, mss) \ - _(u8, transport_flags) \ + _ (transport_endpoint_t, peer) \ + _ (u32, next_node_index) \ + _ (u32, next_node_opaque) \ + _ (u16, mss) \ + _ (u8, transport_flags) \ +/* clang-format on */ typedef struct transport_endpoint_pair_ { diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index c54a994fede..4b1dd8e5cf5 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -831,6 +831,8 @@ tcp_session_open (transport_endpoint_cfg_t * rmt) /* The other connection vars will be initialized after SYN ACK */ tcp_connection_timers_init (tc); tc->mss = rmt->mss; + tc->next_node_index = rmt->next_node_index; + tc->next_node_opaque = rmt->next_node_opaque; TCP_EVT (TCP_EVT_OPEN, tc); tc->state = TCP_STATE_SYN_SENT;