X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Ftransport_types.h;h=1e7d5672f1c992938b6efd9c663cf2ceb3cf5bb7;hb=4b47ee26c;hp=28043b56fe6ca7be3b10dc9f4ff8daec955ccf8a;hpb=4fde4ae0363de45d867eb3472e43b89ae34d3bd1;p=vpp.git diff --git a/src/vnet/session/transport_types.h b/src/vnet/session/transport_types.h index 28043b56fe6..1e7d5672f1c 100644 --- a/src/vnet/session/transport_types.h +++ b/src/vnet/session/transport_types.h @@ -19,6 +19,8 @@ #include #include #include +#include + #define TRANSPORT_MAX_HDRS_LEN 140 /* Max number of bytes for headers */ @@ -63,10 +65,10 @@ typedef enum transport_connection_flags_ typedef struct _spacer { u64 bytes_per_sec; - u64 bucket; + i64 bucket; clib_us_time_t last_update; f32 tokens_per_period; - u32 idle_timeout_us; + u32 max_burst; } spacer_t; #define TRANSPORT_CONN_ID_LEN 44 @@ -144,6 +146,8 @@ typedef struct _transport_connection #define c_stats connection.stats #define c_pacer connection.pacer #define c_flags connection.flags +#define s_ho_handle pacer.bytes_per_sec +#define c_s_ho_handle connection.pacer.bytes_per_sec } transport_connection_t; STATIC_ASSERT (STRUCT_OFFSET_OF (transport_connection_t, s_index) @@ -154,12 +158,13 @@ STATIC_ASSERT (STRUCT_OFFSET_OF (transport_connection_t, s_index) STATIC_ASSERT (sizeof (transport_connection_t) <= 128, "moved into 3rd cache line"); -#define foreach_transport_proto \ - _(TCP, "tcp", "T") \ - _(UDP, "udp", "U") \ - _(NONE, "ct", "C") \ - _(TLS, "tls", "J") \ - _(QUIC, "quic", "Q") \ +#define foreach_transport_proto \ + _ (TCP, "tcp", "T") \ + _ (UDP, "udp", "U") \ + _ (NONE, "ct", "C") \ + _ (TLS, "tls", "J") \ + _ (QUIC, "quic", "Q") \ + _ (DTLS, "dtls", "D") typedef enum _transport_proto {