Stats for Multicast FIB
Change-Id: I46b4aeb6ec9ab6ee462f9c5074b5778d94bf8dc3 Signed-off-by: Neale Ranns <nranns@cisco.com>
This commit is contained in:
committed by
Florin Coras
parent
fedc455b6c
commit
ff233898ce
@@ -1226,6 +1226,16 @@ mfib_entry_get_fib_index (fib_node_index_t mfib_entry_index)
|
||||
return (mfib_entry->mfe_fib_index);
|
||||
}
|
||||
|
||||
const dpo_id_t*
|
||||
mfib_entry_contribute_ip_forwarding (fib_node_index_t mfib_entry_index)
|
||||
{
|
||||
mfib_entry_t *mfib_entry;
|
||||
|
||||
mfib_entry = mfib_entry_get(mfib_entry_index);
|
||||
|
||||
return (&mfib_entry->mfe_rep);
|
||||
}
|
||||
|
||||
void
|
||||
mfib_entry_contribute_forwarding (fib_node_index_t mfib_entry_index,
|
||||
fib_forward_chain_type_t type,
|
||||
|
||||
@@ -133,6 +133,9 @@ extern u32 mfib_entry_get_fib_index(fib_node_index_t fib_entry_index);
|
||||
extern int mfib_entry_is_sourced(fib_node_index_t fib_entry_index,
|
||||
mfib_source_t source);
|
||||
|
||||
extern const dpo_id_t*mfib_entry_contribute_ip_forwarding(
|
||||
fib_node_index_t mfib_entry_index);
|
||||
|
||||
extern void mfib_entry_contribute_forwarding(
|
||||
fib_node_index_t mfib_entry_index,
|
||||
fib_forward_chain_type_t type,
|
||||
|
||||
@@ -133,6 +133,34 @@ autoreply define want_ip6_fib_stats
|
||||
u32 pid;
|
||||
};
|
||||
|
||||
/** \brief Want IP4 muilticast FIB Stats, register for continuous stats
|
||||
@param client_index - opaque cookie to identify the sender
|
||||
@param context - sender context, to match reply w/ request
|
||||
@param enable_disable - 1 = enable stats, 0 = disable
|
||||
@param pid - pid of process requesting stats updates
|
||||
*/
|
||||
autoreply define want_ip4_mfib_stats
|
||||
{
|
||||
u32 client_index;
|
||||
u32 context;
|
||||
u32 enable_disable;
|
||||
u32 pid;
|
||||
};
|
||||
|
||||
/** \brief Want IP6 multicast FIB Stats, register for continuous stats
|
||||
@param client_index - opaque cookie to identify the sender
|
||||
@param context - sender context, to match reply w/ request
|
||||
@param enable_disable - 1 = enable stats, 0 = disable
|
||||
@param pid - pid of process requesting stats updates
|
||||
*/
|
||||
autoreply define want_ip6_mfib_stats
|
||||
{
|
||||
u32 client_index;
|
||||
u32 context;
|
||||
u32 enable_disable;
|
||||
u32 pid;
|
||||
};
|
||||
|
||||
/** \brief Want IP4 NBR Stats, register for continuous stats
|
||||
@param client_index - opaque cookie to identify the sender
|
||||
@param context - sender context, to match reply w/ request
|
||||
@@ -176,6 +204,22 @@ manual_print manual_endian define vnet_ip4_fib_counters
|
||||
vl_api_ip4_fib_counter_t c[count];
|
||||
};
|
||||
|
||||
typeonly manual_print manual_endian define ip4_mfib_counter
|
||||
{
|
||||
u8 source[4];
|
||||
u8 group[4];
|
||||
u8 group_length;
|
||||
u64 packets;
|
||||
u64 bytes;
|
||||
};
|
||||
|
||||
manual_print manual_endian define vnet_ip4_mfib_counters
|
||||
{
|
||||
u32 vrf_id;
|
||||
u32 count;
|
||||
vl_api_ip4_mfib_counter_t c[count];
|
||||
};
|
||||
|
||||
typeonly manual_print manual_endian define ip4_nbr_counter
|
||||
{
|
||||
u32 address;
|
||||
@@ -216,6 +260,22 @@ manual_print manual_endian define vnet_ip6_fib_counters
|
||||
vl_api_ip6_fib_counter_t c[count];
|
||||
};
|
||||
|
||||
typeonly manual_print manual_endian define ip6_mfib_counter
|
||||
{
|
||||
u8 source[16];
|
||||
u8 group[16];
|
||||
u8 group_length;
|
||||
u64 packets;
|
||||
u64 bytes;
|
||||
};
|
||||
|
||||
manual_print manual_endian define vnet_ip6_mfib_counters
|
||||
{
|
||||
u32 vrf_id;
|
||||
u32 count;
|
||||
vl_api_ip6_mfib_counter_t c[count];
|
||||
};
|
||||
|
||||
typeonly manual_print manual_endian define ip6_nbr_counter
|
||||
{
|
||||
u64 address[2];
|
||||
|
||||
+376
-4
File diff suppressed because it is too large
Load Diff
+10
-6
@@ -22,6 +22,7 @@
|
||||
#include <pthread.h>
|
||||
#include <vlib/threads.h>
|
||||
#include <vnet/fib/fib_table.h>
|
||||
#include <vnet/mfib/mfib_table.h>
|
||||
#include <vlib/unix/unix.h>
|
||||
#include <vlibmemory/api.h>
|
||||
#include <vlibmemory/unix_shared_memory_queue.h>
|
||||
@@ -41,12 +42,14 @@ typedef struct
|
||||
*
|
||||
*/
|
||||
/* from .../vnet/vnet/ip/lookup.c. Yuck */
|
||||
/* *INDENT-OFF* */
|
||||
typedef CLIB_PACKED (struct
|
||||
{
|
||||
ip4_address_t address;
|
||||
u32 address_length: 6;
|
||||
u32 index: 26;
|
||||
}) ip4_route_t;
|
||||
{
|
||||
ip4_address_t address;
|
||||
u32 address_length: 6;
|
||||
u32 index: 26;
|
||||
}) ip4_route_t;
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* see interface.api */
|
||||
typedef struct
|
||||
@@ -79,12 +82,13 @@ typedef struct
|
||||
u32 index;
|
||||
} ip6_route_t;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ip4_route_t *ip4routes;
|
||||
ip6_route_t *ip6routes;
|
||||
mfib_prefix_t *mroutes;
|
||||
fib_table_t **fibs;
|
||||
mfib_table_t **mfibs;
|
||||
hash_pair_t **pvec;
|
||||
uword *results;
|
||||
} do_ip46_fibs_t;
|
||||
|
||||
@@ -39,4 +39,5 @@ stats_reg (IP6_FIB_COUNTERS)
|
||||
stats_reg (IP6_NBR_COUNTERS)
|
||||
stats_reg (PER_INTERFACE_COMBINED_COUNTERS)
|
||||
stats_reg (PER_INTERFACE_SIMPLE_COUNTERS)
|
||||
|
||||
stats_reg (IP4_MFIB_COUNTERS)
|
||||
stats_reg (IP6_MFIB_COUNTERS)
|
||||
|
||||
Reference in New Issue
Block a user