GBP: fix UT after multi-arch change
[vpp.git] / src / plugins / gbp / gbp_policy.c
1 /*
2  * Copyright (c) 2018 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 #include <plugins/gbp/gbp.h>
17 #include <plugins/gbp/gbp_policy_dpo.h>
18
19 gbp_policy_main_t gbp_policy_main;
20
21 static clib_error_t *
22 gbp_policy_init (vlib_main_t * vm)
23 {
24   gbp_policy_main_t *gpm = &gbp_policy_main;
25   clib_error_t *error = 0;
26
27   vlib_node_t *node = vlib_get_node_by_name (vm, (u8 *) "gbp-policy-port");
28
29   /* Initialize the feature next-node indexes */
30   feat_bitmap_init_next_nodes (vm,
31                                node->index,
32                                L2OUTPUT_N_FEAT,
33                                l2output_get_feat_names (),
34                                gpm->l2_output_feat_next[1]);
35
36   node = vlib_get_node_by_name (vm, (u8 *) "gbp-policy-mac");
37   feat_bitmap_init_next_nodes (vm,
38                                node->index,
39                                L2OUTPUT_N_FEAT,
40                                l2output_get_feat_names (),
41                                gpm->l2_output_feat_next[0]);
42
43   return error;
44 }
45
46 VLIB_INIT_FUNCTION (gbp_policy_init);
47
48 /*
49  * fd.io coding-style-patch-verification: ON
50  *
51  * Local Variables:
52  * eval: (c-set-style "gnu")
53  * End:
54  */