Hello all, I am in need to find out whether a particular feature is enabled on an interface during run time.
So if I understand correctly we have to get the corresponding 'feature arc index '. Then get the config index by using 'config_index_by_sw_if_index' then get the config_pool and then iterate through the features list to check whether the given feature is there or not. What I would like to know, is this is the correct approach or is there any optimized and a better performing alternative for achieving the same current_config_index = vec_elt (cm[feature_arc].config_index_by_sw_if_index, sw_if_index); cfg_index = vcm->config_pool_index_by_user_index[current_config_index]; cfg = pool_elt_at_index (vcm->config_pool, cfg_index); for (i = 0; i < vec_len (cfg->features); i++) { feat = cfg->features + i; node_index = feat->node_index; n = vlib_get_node (vm, node_index); if (0 == memcmp (n->name, input_feat, sizeof("ip4-policer-classify") - 1)) return 1; } Thanks and Regards, Raj
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13392): https://lists.fd.io/g/vpp-dev/message/13392 Mute This Topic: https://lists.fd.io/mt/32241517/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-