FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
gbp_fwd.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 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 #include <plugins/gbp/gbp.h>
16 #include <vnet/l2/l2_input.h>
17 #include <plugins/gbp/gbp_learn.h>
18 
19 /**
20  * Grouping of global data for the GBP source EPG classification feature
21  */
22 typedef struct gbp_fwd_main_t_
23 {
24  /**
25  * Next nodes for L2 output features
26  */
29 
31 
32 static clib_error_t *
34 {
36  vlib_node_t *node = vlib_get_node_by_name (vm, (u8 *) "gbp-fwd");
37 
38  /* Initialize the feature next-node indices */
40  node->index,
43  gpm->l2_input_feat_next);
44 
45  return 0;
46 }
47 
49 
50 /*
51  * fd.io coding-style-patch-verification: ON
52  *
53  * Local Variables:
54  * eval: (c-set-style "gnu")
55  * End:
56  */
gbp_fwd_main_t gbp_fwd_main
Definition: gbp_fwd.c:30
struct gbp_fwd_main_t_ gbp_fwd_main_t
Grouping of global data for the GBP source EPG classification feature.
u32 index
Definition: node.h:282
unsigned char u8
Definition: types.h:56
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:173
unsigned int u32
Definition: types.h:88
static clib_error_t * gbp_fwd_init(vlib_main_t *vm)
Definition: gbp_fwd.c:33
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
Definition: node.c:45
vlib_main_t * vm
Definition: in2out_ed.c:1599
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
char ** l2input_get_feat_names(void)
Return an array of strings containing graph node names of each feature.
Definition: l2_input.c:62
vlib_main_t vlib_node_runtime_t * node
Definition: in2out_ed.c:1599
Grouping of global data for the GBP source EPG classification feature.
Definition: gbp_fwd.c:22
u32 l2_input_feat_next[32]
Next nodes for L2 output features.
Definition: gbp_fwd.c:27