FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
gbp_policy.c
Go to the documentation of this file.
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>
18 
20 
21 static clib_error_t *
23 {
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 */
31  node->index,
34  gpm->l2_output_feat_next[1]);
35 
36  node = vlib_get_node_by_name (vm, (u8 *) "gbp-policy-mac");
38  node->index,
41  gpm->l2_output_feat_next[0]);
42 
43  return error;
44 }
45 
47 
48 /*
49  * fd.io coding-style-patch-verification: ON
50  *
51  * Local Variables:
52  * eval: (c-set-style "gnu")
53  * End:
54  */
char ** l2output_get_feat_names(void)
Definition: l2_output.c:39
u32 index
Definition: node.h:279
unsigned char u8
Definition: types.h:56
u32 l2_output_feat_next[2][32]
Next nodes for L2 output features.
Definition: gbp.h:59
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:163
static clib_error_t * gbp_policy_init(vlib_main_t *vm)
Definition: gbp_policy.c:22
vlib_main_t * vm
Definition: buffer.c:312
static void feat_bitmap_init_next_nodes(vlib_main_t *vm, u32 node_index, u32 num_features, char **feat_names, u32 *next_nodes)
Initialize the feature next-node indexes of a graph node.
Definition: feat_bitmap.h:43
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
Definition: node.c:45
gbp_policy_main_t gbp_policy_main
Definition: gbp_policy.c:19
Grouping of global data for the GBP source EPG classification feature.
Definition: gbp.h:54