X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fgbp%2Fgbp_endpoint.c;fp=src%2Fplugins%2Fgbp%2Fgbp_endpoint.c;h=d759da2bece4657504498afb1867860893bdca1b;hb=3eea9de899f4affbe6695bb314989981fca8f234;hp=da15b49d81bd50192d1df35a495fd5e9eeaa4ba1;hpb=7bf7ea3ce39c1d70c0409dcbecd5c4aaf26fae13;p=vpp.git diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c index da15b49d81b..d759da2bece 100644 --- a/src/plugins/gbp/gbp_endpoint.c +++ b/src/plugins/gbp/gbp_endpoint.c @@ -101,6 +101,16 @@ gbp_endpoint_is_external (const gbp_endpoint_t * ge) return (! !(ge->ge_fwd.gef_flags & GBP_ENDPOINT_FLAG_EXTERNAL)); } +int +gbp_endpoint_is_learnt (const gbp_endpoint_t * ge) +{ + if (0 == vec_len (ge->ge_locs)) + return 0; + + /* DP is the highest source so if present it will be first */ + return (ge->ge_locs[0].gel_src == GBP_ENDPOINT_SRC_DP); +} + static void gbp_endpoint_extract_key_mac_itf (const clib_bihash_kv_16_8_t * key, mac_address_t * mac, u32 * sw_if_index)