summaryrefslogtreecommitdiffstats
path: root/vpp/vpp-api/api.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-08-30 17:01:52 -0400
committerKeith Burns <alagalah@gmail.com>2016-08-31 21:53:01 +0000
commitb84a3e56e1287389528b188aefc4f69bc0bb8ae7 (patch)
treed5642e2e4738b230aacad640134852cebc3cccea /vpp/vpp-api/api.c
parent1edfba9a6394128ee5fad2b413e9e0a05972ef48 (diff)
VPP-369 Add an L2 output classification feature
Change-Id: If03162d328c1ea179249e734537ebb01bade3331 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vpp/vpp-api/api.c')
-rw-r--r--vpp/vpp-api/api.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index 00988184..fbebfa6b 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -3996,8 +3996,14 @@ static void vl_api_classify_set_interface_l2_tables_t_handler
VALIDATE_SW_IF_INDEX (mp);
- rv = vnet_l2_classify_set_tables (sw_if_index, ip4_table_index,
- ip6_table_index, other_table_index);
+ if (mp->is_input)
+ rv = vnet_l2_input_classify_set_tables (sw_if_index, ip4_table_index,
+ ip6_table_index,
+ other_table_index);
+ else
+ rv = vnet_l2_output_classify_set_tables (sw_if_index, ip4_table_index,
+ ip6_table_index,
+ other_table_index);
if (rv == 0)
{
@@ -4007,7 +4013,10 @@ static void vl_api_classify_set_interface_l2_tables_t_handler
else
enable = 0;
- vnet_l2_classify_enable_disable (sw_if_index, enable);
+ if (mp->is_input)
+ vnet_l2_input_classify_enable_disable (sw_if_index, enable);
+ else
+ vnet_l2_output_classify_enable_disable (sw_if_index, enable);
}
BAD_SW_IF_INDEX_LABEL;