X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Flisp-gpe%2Flisp_gpe.h;h=fe51ed06eb1b9d0c73ab8097c51a24fa5b0bf001;hb=71612d61930e57e7c8ebf9e5647b15a4b23720b2;hp=be447024cb9e1b8dc46beec13f2b62f40f4b4018;hpb=4868ff65eddfd694a1485d6c6c355f9a8ca9011d;p=vpp.git diff --git a/src/vnet/lisp-gpe/lisp_gpe.h b/src/vnet/lisp-gpe/lisp_gpe.h index be447024cb9..fe51ed06eb1 100644 --- a/src/vnet/lisp-gpe/lisp_gpe.h +++ b/src/vnet/lisp-gpe/lisp_gpe.h @@ -96,12 +96,6 @@ typedef struct u32 tunnel_index; } lisp_stats_key_t; -typedef struct -{ - u32 pkt_count; - u32 bytes; -} lisp_stats_t; - typedef struct { u32 vni; @@ -110,7 +104,7 @@ typedef struct ip_address_t loc_rloc; ip_address_t rmt_rloc; - lisp_stats_t stats; + vlib_counter_t counters; } lisp_api_stats_t; typedef enum gpe_encap_mode_e @@ -165,8 +159,13 @@ typedef struct lisp_gpe_main gpe_encap_mode_t encap_mode; - lisp_stats_t *lisp_stats_pool; + u8 *dummy_stats_pool; uword *lisp_stats_index_by_key; + vlib_combined_counter_main_t counters; + + /** Native fwd data structures */ + fib_route_path_t *native_fwd_rpath[2]; + u32 *native_fwd_lfes[2]; /** convenience */ vlib_main_t *vlib_main; @@ -178,7 +177,7 @@ typedef struct lisp_gpe_main } lisp_gpe_main_t; /** LISP-GPE global state*/ -lisp_gpe_main_t lisp_gpe_main; +extern lisp_gpe_main_t lisp_gpe_main; always_inline lisp_gpe_main_t * vnet_lisp_gpe_get_main () @@ -226,6 +225,11 @@ typedef enum /** */ typedef struct { + /** forwarding entry index of */ + u32 fwd_entry_index; + + u8 is_src_dst; + u8 is_add; /** type of mapping */ @@ -262,18 +266,25 @@ typedef struct u32 table_id; /** bridge domain id */ - u16 bd_id; + u32 bd_id; /** generic access */ u32 dp_table; }; } vnet_lisp_gpe_add_del_fwd_entry_args_t; +typedef struct +{ + fib_route_path_t rpath; + u8 is_add; +} vnet_gpe_native_fwd_rpath_args_t; + typedef struct { u32 fwd_entry_index; u32 dp_table; u32 vni; + u8 action; dp_address_t leid; dp_address_t reid; } lisp_api_gpe_fwd_entry_t; @@ -311,7 +322,10 @@ int vnet_gpe_set_encap_mode (gpe_encap_mode_t mode); u8 vnet_lisp_stats_enable_disable_state (void); vnet_api_error_t vnet_lisp_stats_enable_disable (u8 enable); lisp_api_stats_t *vnet_lisp_get_stats (void); -void vnet_lisp_flush_stats (void); +int vnet_lisp_flush_stats (void); +int vnet_gpe_add_del_native_fwd_rpath (vnet_gpe_native_fwd_rpath_args_t * a); +u32 vnet_lisp_gpe_add_nsh_iface (lisp_gpe_main_t * lgm); +void vnet_lisp_gpe_del_nsh_iface (lisp_gpe_main_t * lgm); #endif /* included_vnet_lisp_gpe_h */