From 9f86d225ab4f3dccbf61383a75d6af7d321a204e Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 23 Mar 2020 15:34:22 +0000 Subject: session tls: support tls descheduling Type: improvement Signed-off-by: Florin Coras Change-Id: Ieb8bb9c6deb92479fdd3e045778fe5ae4782d1ea --- src/vnet/session/transport.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/vnet/session/transport.h') diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h index 6dc6984cdf4..eb98032b1e4 100644 --- a/src/vnet/session/transport.h +++ b/src/vnet/session/transport.h @@ -44,9 +44,21 @@ typedef enum transport_snd_flags_ typedef struct transport_send_params_ { - u32 snd_space; - u32 tx_offset; - u16 snd_mss; + union + { + /* Used to retrieve snd params from transports */ + struct + { + u32 snd_space; + u32 tx_offset; + u16 snd_mss; + }; + /* Used by custom tx functions */ + struct + { + u32 max_burst_size; + }; + }; transport_snd_flags_t flags; } transport_send_params_t; @@ -76,7 +88,7 @@ typedef struct _transport_proto_vft transport_send_params_t *sp); void (*update_time) (f64 time_now, u8 thread_index); void (*flush_data) (transport_connection_t *tconn); - int (*custom_tx) (void *session, u32 max_burst_size); + int (*custom_tx) (void *session, transport_send_params_t *sp); int (*app_rx_evt) (transport_connection_t *tconn); /* @@ -152,9 +164,10 @@ transport_get_half_open (transport_proto_t tp, u32 conn_index) } static inline int -transport_custom_tx (transport_proto_t tp, void *s, u32 max_burst_size) +transport_custom_tx (transport_proto_t tp, void *s, + transport_send_params_t * sp) { - return tp_vfts[tp].custom_tx (s, max_burst_size); + return tp_vfts[tp].custom_tx (s, sp); } static inline int -- cgit 1.2.3-korg