aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/classify/input_acl.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-11-09 19:54:20 +0100
committerDave Barach <openvpp@barachs.net>2016-11-11 14:39:00 +0000
commit8b3191e6d715760deefe550b59c7d92be4b5cda9 (patch)
tree721dd977986d12864346081fec6b245ea5a250e0 /vnet/vnet/classify/input_acl.c
parent0178d52384e0428368f1acf3163e664ecda7b64c (diff)
feature: convert all feature nodes to new feature infra
Change-Id: I34c527ba910fb282a95458b78d1d684eb337905e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/classify/input_acl.c')
-rw-r--r--vnet/vnet/classify/input_acl.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/vnet/vnet/classify/input_acl.c b/vnet/vnet/classify/input_acl.c
index ddb4332767a..c446f2d687c 100644
--- a/vnet/vnet/classify/input_acl.c
+++ b/vnet/vnet/classify/input_acl.c
@@ -33,34 +33,24 @@ vnet_inacl_ip_feature_enable (vlib_main_t * vnm,
}
else
{ /* IP[46] */
- ip_lookup_main_t * lm;
- vnet_feature_config_main_t * ipcm;
- u32 ftype;
- u32 ci;
+ vnet_feature_config_main_t *fcm;
+ u8 arc;
if (tid == INPUT_ACL_TABLE_IP4)
- {
- lm = &ip4_main.lookup_main;
- ftype = ip4_main.ip4_unicast_rx_feature_check_access;
- }
+ {
+ vnet_feature_enable_disable ("ip4-unicast", "ip4-inacl",
+ sw_if_index, feature_enable, 0, 0);
+ arc = vnet_get_feature_arc_index ("ip4-unicast");
+ }
else
- {
- lm = &ip6_main.lookup_main;
- ftype = ip6_main.ip6_unicast_rx_feature_check_access;
- }
-
- ipcm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
-
- ci = ipcm->config_index_by_sw_if_index[sw_if_index];
- ci = ((feature_enable)
- ? vnet_config_add_feature
- : vnet_config_del_feature)
- (vnm, &ipcm->config_main, ci, ftype,
- /* config data */ 0,
- /* # bytes of config data */ 0);
-
- ipcm->config_index_by_sw_if_index[sw_if_index] = ci;
- am->vnet_config_main[tid] = &ipcm->config_main;
+ {
+ vnet_feature_enable_disable ("ip6-unicast", "ip6-inacl",
+ sw_if_index, feature_enable, 0, 0);
+ arc = vnet_get_feature_arc_index ("ip6-unicast");
+ }
+
+ fcm = vnet_get_feature_arc_config_main (arc);
+ am->vnet_config_main[tid] = &fcm->config_main;
}
return 0;