X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Ftransport.h;h=eb98032b1e48ad5fb1bddf2ccb8bdcfd56049dab;hb=9f86d225ab4f3dccbf61383a75d6af7d321a204e;hp=6dc6984cdf4c3970405741fec78f972abb0c7cb8;hpb=ed8db52539a8d8239a9a43bea53328d25eb47f0d;p=vpp.git 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