X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fgbp%2Fgbp_learn.h;h=a000905e63a327f54130f63eabd48d92fa4cb296;hb=59f71132e;hp=836daf808865f5bab90b79aca7152d42458f2f0b;hpb=93cc3ee3b3a9c9224a1446625882205f3282a949;p=vpp.git diff --git a/src/plugins/gbp/gbp_learn.h b/src/plugins/gbp/gbp_learn.h index 836daf80886..a000905e63a 100644 --- a/src/plugins/gbp/gbp_learn.h +++ b/src/plugins/gbp/gbp_learn.h @@ -18,16 +18,37 @@ #include -typedef enum gbp_learn_mode_t_ +/** + * The maximum learning rate per-hashed EP + */ +#define GBP_ENDPOINT_HASH_LEARN_RATE (1e-2) + +/** + * Grouping of global data for the GBP source EPG classification feature + */ +typedef struct gbp_learn_main_t_ { - GBP_LEARN_MODE_L2, - GBP_LEARN_MODE_L3, -} gbb_learn_mode_t; + /** + * Next nodes for L2 output features + */ + u32 gl_l2_input_feat_next[32]; + + /** + * logger - VLIB log class + */ + vlib_log_class_t gl_logger; + + /** + * throttles for the DP leanring + */ + throttle_t gl_l2_throttle; + throttle_t gl_l3_throttle; +} gbp_learn_main_t; -extern void gbp_learn_enable (u32 sw_if_index, gbb_learn_mode_t mode); -extern void gbp_learn_disable (u32 sw_if_index, gbb_learn_mode_t mode); +extern gbp_learn_main_t gbp_learn_main; -extern void gbp_learn_set_inactive_threshold (u32 max_age); +extern void gbp_learn_enable (u32 sw_if_index); +extern void gbp_learn_disable (u32 sw_if_index); #endif