diff options
Diffstat (limited to 'src/plugins/flowprobe/flowprobe.h')
-rw-r--r-- | src/plugins/flowprobe/flowprobe.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/plugins/flowprobe/flowprobe.h b/src/plugins/flowprobe/flowprobe.h index 2d28c81de33..1fde5f94491 100644 --- a/src/plugins/flowprobe/flowprobe.h +++ b/src/plugins/flowprobe/flowprobe.h @@ -42,17 +42,22 @@ typedef enum FLOW_N_RECORDS = 1 << 5, } flowprobe_record_t; -/* *INDENT-OFF* */ typedef enum __attribute__ ((__packed__)) { - FLOW_VARIANT_IP4, + FLOW_VARIANT_IP4 = 0, FLOW_VARIANT_IP6, FLOW_VARIANT_L2, FLOW_VARIANT_L2_IP4, FLOW_VARIANT_L2_IP6, FLOW_N_VARIANTS, } flowprobe_variant_t; -/* *INDENT-ON* */ + +typedef enum __attribute__ ((__packed__)) +{ + FLOW_DIRECTION_RX = 0, + FLOW_DIRECTION_TX, + FLOW_DIRECTION_BOTH, +} flowprobe_direction_t; STATIC_ASSERT (sizeof (flowprobe_variant_t) == 1, "flowprobe_variant_t is expected to be 1 byte, " @@ -72,7 +77,6 @@ typedef struct u16 *next_record_offset_per_worker; } flowprobe_protocol_context_t; -/* *INDENT-OFF* */ typedef struct __attribute__ ((aligned (8))) { u32 rx_sw_if_index; u32 tx_sw_if_index; @@ -85,8 +89,8 @@ typedef struct __attribute__ ((aligned (8))) { u16 src_port; u16 dst_port; flowprobe_variant_t which; + flowprobe_direction_t direction; } flowprobe_key_t; -/* *INDENT-ON* */ typedef struct { @@ -134,9 +138,7 @@ typedef struct u8 ht_log2len; /* Hash table size is 2^log2len */ u32 **hash_per_worker; flowprobe_entry_t **pool_per_worker; - /* *INDENT-OFF* */ TWT (tw_timer_wheel) ** timers_per_worker; - /* *INDENT-ON* */ u32 **expired_passive_per_worker; flowprobe_record_t record; @@ -149,6 +151,7 @@ typedef struct u16 template_per_flow[FLOW_N_VARIANTS]; u8 *flow_per_interface; + u8 *direction_per_interface; /** convenience vlib_main_t pointer */ vlib_main_t *vlib_main; @@ -159,6 +162,8 @@ typedef struct extern flowprobe_main_t flowprobe_main; extern vlib_node_registration_t flowprobe_walker_node; +void flowprobe_delete_by_index (u32 my_cpu_number, u32 poolindex); + void flowprobe_flush_callback_ip4 (void); void flowprobe_flush_callback_ip6 (void); void flowprobe_flush_callback_l2 (void); |