#include <vnet/vnet.h>
#include <vnet/ip/ip.h>
#include <vnet/tcp/tcp_debug.h>
+#include <vppinfra/bihash_24_8.h>
+
#define TRANSPORT_MAX_HDRS_LEN 140 /* Max number of bytes for headers */
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
#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)
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
{