FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
gbp_classify.c
Go to the documentation of this file.
1 /*
2  * gbp.h : Group Based Policy
3  *
4  * Copyright (c) 2018 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include <plugins/gbp/gbp.h>
20 #include <vnet/l2/l2_input.h>
21 
23 
24 static clib_error_t *
26 {
28 
29  vlib_node_t *node = vlib_get_node_by_name (vm, (u8 *) "gbp-src-classify");
30 
31  /* Initialize the feature next-node indexes */
33  node->index,
37 
38  node = vlib_get_node_by_name (vm, (u8 *) "gbp-null-classify");
40  node->index,
44 
45  node = vlib_get_node_by_name (vm, (u8 *) "l2-gbp-lpm-classify");
47  node->index,
51 
52  node = vlib_get_node_by_name (vm, (u8 *) "l2-gbp-lpm-anon-classify");
54  node->index,
59 
60  return 0;
61 }
62 
64 
65 /*
66  * fd.io coding-style-patch-verification: ON
67  *
68  * Local Variables:
69  * eval: (c-set-style "gnu")
70  * End:
71  */
gbp_classify.h
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
gbp.h
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
gbp_src_classify_main
gbp_src_classify_main_t gbp_src_classify_main
Definition: gbp_classify.c:22
gbp_src_classify_init
static clib_error_t * gbp_src_classify_init(vlib_main_t *vm)
Definition: gbp_classify.c:25
GBP_SRC_CLASSIFY_LPM
@ GBP_SRC_CLASSIFY_LPM
Definition: gbp_classify.h:28
GBP_SRC_CLASSIFY_NULL
@ GBP_SRC_CLASSIFY_NULL
Definition: gbp_classify.h:26
GBP_SRC_CLASSIFY_PORT
@ GBP_SRC_CLASSIFY_PORT
Definition: gbp_classify.h:27
l2input_get_feat_names
char ** l2input_get_feat_names(void)
Return an array of strings containing graph node names of each feature.
Definition: l2_input.c:59
GBP_SRC_CLASSIFY_LPM_ANON
@ GBP_SRC_CLASSIFY_LPM_ANON
Definition: gbp_classify.h:29
L2INPUT_N_FEAT
@ L2INPUT_N_FEAT
Definition: l2_input.h:163
l2_input.h
vlib_get_node_by_name
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
Definition: node.c:45
VLIB_INIT_FUNCTION
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:172
gbp_src_classify_main_t_
Grouping of global data for the GBP source EPG classification feature.
Definition: gbp_classify.h:37
vlib_main_t
Definition: main.h:102
vlib_node_t
Definition: node.h:247
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
vlib_init_function_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51
gbp_src_classify_main_t_::l2_input_feat_next
u32 l2_input_feat_next[GBP_SRC_N_CLASSIFY][32]
Next nodes for L2 output features.
Definition: gbp_classify.h:42
feat_bitmap_init_next_nodes
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