|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef PLUGINS_IOAM_PLUGIN_IOAM_LIB_E2E_IOAM_SEQNO_LIB_H_
17 #define PLUGINS_IOAM_PLUGIN_IOAM_LIB_E2E_IOAM_SEQNO_LIB_H_
21 #define SEQ_CHECK_VALUE 0x80000000
23 #define SEQNO_WINDOW_SIZE 2048
24 #define SEQNO_WINDOW_ARRAY_SIZE 64
58 p[n >> 5] |= (1 << (n & 31));
64 return p[n >> 5] & (1 << (n & 31));
71 int start_index = (start >> 5);
72 int mask_index = (
mask >> 5);
74 start_index &= mask_index;
77 int start_bit = (start & 0x1f);
79 n = (1 << start_bit) - 1;
80 t = start_bit + num_bits;
88 start_index = (start_index + 1) & mask_index;
89 num_bits -= (32 - start_bit);
91 while (num_bits >= 32)
94 start_index = (start_index + 1) & mask_index;
97 n = ~((1 << num_bits) - 1);
120 static int peer_dead_count;
128 diff = seqno - bitmap->
highest;
129 if (diff < bitmap->window_size)
149 diff = bitmap->
highest - seqno;
162 if (peer_dead_count > 25)
void ioam_seqno_init_rx_info(seqno_rx_info *data)
static void BIT_SET(u64 *p, u32 n)
struct seqno_bitmap_ seqno_bitmap
u8 * show_ioam_seqno_cmd_fn(u8 *s, ioam_seqno_data *seqno_data, u8 enc)
static void ioam_analyze_seqno(seqno_rx_info *seqno_rx, u64 seqno)
static u8 seqno_check_wraparound(u32 a, u32 b)
struct seqno_rx_info_ seqno_rx_info
struct ioam_seqno_data_ ioam_seqno_data
static void BIT_CLEAR(u64 *p, u64 start, int num_bits, u32 mask)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u64 array[SEQNO_WINDOW_ARRAY_SIZE]
static int BIT_TEST(u64 *p, u32 n)
u8 * show_ioam_seqno_analyse_data_fn(u8 *s, seqno_rx_info *rx)
void ioam_seqno_init_data(ioam_seqno_data *data)
#define SEQNO_WINDOW_ARRAY_SIZE