From 6dc0c8d14745e1d55f62415a3a40454ff820d9ad Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 26 Nov 2020 14:15:33 +0000 Subject: ip: Sub Address Family types. Feature enable for each SAFI Type: improvement Signed-off-by: Neale Ranns Change-Id: I318424ffa569d9a09187066d6ba15576757c1cf6 --- src/vnet/qos/qos_record.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/vnet/qos') diff --git a/src/vnet/qos/qos_record.c b/src/vnet/qos/qos_record.c index 40e6b0778bb..d52c1442d8d 100644 --- a/src/vnet/qos/qos_record.c +++ b/src/vnet/qos/qos_record.c @@ -34,14 +34,12 @@ qos_record_feature_config (u32 sw_if_index, switch (input_source) { case QOS_SOURCE_IP: - vnet_feature_enable_disable ("ip6-unicast", "ip6-qos-record", - sw_if_index, enable, NULL, 0); - vnet_feature_enable_disable ("ip6-multicast", "ip6-qos-record", - sw_if_index, enable, NULL, 0); - vnet_feature_enable_disable ("ip4-unicast", "ip4-qos-record", - sw_if_index, enable, NULL, 0); - vnet_feature_enable_disable ("ip4-multicast", "ip4-qos-record", - sw_if_index, enable, NULL, 0); + ip_feature_enable_disable (AF_IP6, N_SAFI, IP_FEATURE_INPUT, + "ip6-qos-record", + sw_if_index, enable, NULL, 0); + ip_feature_enable_disable (AF_IP4, N_SAFI, IP_FEATURE_INPUT, + "ip4-qos-record", + sw_if_index, enable, NULL, 0); l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_L2_IP_QOS_RECORD, enable); break; @@ -50,14 +48,12 @@ qos_record_feature_config (u32 sw_if_index, sw_if_index, enable, NULL, 0); break; case QOS_SOURCE_VLAN: - vnet_feature_enable_disable ("ip6-unicast", "vlan-ip6-qos-record", - sw_if_index, enable, NULL, 0); - vnet_feature_enable_disable ("ip6-multicast", "vlan-ip6-qos-record", - sw_if_index, enable, NULL, 0); - vnet_feature_enable_disable ("ip4-unicast", "vlan-ip4-qos-record", - sw_if_index, enable, NULL, 0); - vnet_feature_enable_disable ("ip4-multicast", "vlan-ip4-qos-record", - sw_if_index, enable, NULL, 0); + ip_feature_enable_disable (AF_IP6, N_SAFI, IP_FEATURE_INPUT, + "vlan-ip6-qos-record", + sw_if_index, enable, NULL, 0); + ip_feature_enable_disable (AF_IP4, N_SAFI, IP_FEATURE_INPUT, + "vlan-ip4-qos-record", + sw_if_index, enable, NULL, 0); vnet_feature_enable_disable ("mpls-input", "vlan-mpls-qos-record", sw_if_index, enable, NULL, 0); break; -- cgit 1.2.3-korg