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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #include <plugins/gbp/gbp.h>
17 #include <plugins/gbp/gbp_policy_dpo.h>
19 gbp_policy_main_t gbp_policy_main;
22 gbp_policy_init (vlib_main_t * vm)
24 gbp_policy_main_t *gpm = &gbp_policy_main;
25 clib_error_t *error = 0;
27 /* Initialize the feature next-node indexes */
28 vlib_node_t *node = vlib_get_node_by_name (vm, (u8 *) "gbp-policy-port");
29 feat_bitmap_init_next_nodes (vm,
32 l2output_get_feat_names (),
33 gpm->l2_output_feat_next[GBP_POLICY_PORT]);
35 node = vlib_get_node_by_name (vm, (u8 *) "gbp-policy-mac");
36 feat_bitmap_init_next_nodes (vm,
39 l2output_get_feat_names (),
40 gpm->l2_output_feat_next[GBP_POLICY_MAC]);
42 node = vlib_get_node_by_name (vm, (u8 *) "gbp-policy-lpm");
43 feat_bitmap_init_next_nodes (vm,
46 l2output_get_feat_names (),
47 gpm->l2_output_feat_next[GBP_POLICY_LPM]);
52 VLIB_INIT_FUNCTION (gbp_policy_init);
55 * fd.io coding-style-patch-verification: ON
58 * eval: (c-set-style "gnu")