FD.io VPP
v16.06
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
policer.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 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
#ifndef __included_policer_h__
16
#define __included_policer_h__
17
18
#include <
vlib/vlib.h
>
19
#include <
vnet/vnet.h
>
20
21
#include <
vnet/policer/xlate.h
>
22
#include <
vnet/policer/police.h
>
23
24
typedef
struct
{
25
/* policer pool, aligned */
26
policer_read_response_type_st
*
policers
;
27
28
/* config + template h/w policer instance parallel pools */
29
sse2_qos_pol_cfg_params_st
*
configs
;
30
policer_read_response_type_st
*
policer_templates
;
31
32
/* Config by name hash */
33
uword
*
policer_config_by_name
;
34
35
/* Policer by sw_if_index vector */
36
u32
*
policer_index_by_sw_if_index
;
37
38
/* convenience */
39
vlib_main_t
*
vlib_main
;
40
vnet_main_t
*
vnet_main
;
41
}
vnet_policer_main_t
;
42
43
vnet_policer_main_t
vnet_policer_main
;
44
45
typedef
enum
{
46
VNET_POLICER_INDEX_BY_SW_IF_INDEX
,
47
VNET_POLICER_INDEX_BY_OPAQUE
,
48
VNET_POLICER_INDEX_BY_EITHER
,
49
}
vnet_policer_index_t
;
50
51
typedef
52
enum
{
53
VNET_POLICER_NEXT_TRANSMIT
,
54
VNET_POLICER_NEXT_DROP
,
55
VNET_POLICER_N_NEXT
,
56
}
vnet_policer_next_t
;
57
58
u8
*
format_policer_instance
(
u8
* s, va_list * va);
59
clib_error_t
*
policer_add_del
(
vlib_main_t
*vm,
60
u8
* name,
sse2_qos_pol_cfg_params_st
* cfg,
61
u8
is_add);
62
63
#endif
/* __included_policer_h__ */
police.h
vnet_policer_main_t::configs
sse2_qos_pol_cfg_params_st * configs
Definition:
policer.h:29
vnet_policer_main_t::policer_config_by_name
uword * policer_config_by_name
Definition:
policer.h:33
vnet_policer_next_t
vnet_policer_next_t
Definition:
policer.h:51
format_policer_instance
u8 * format_policer_instance(u8 *s, va_list *va)
Definition:
policer.c:68
vnet_policer_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
policer.h:40
VNET_POLICER_NEXT_TRANSMIT
Definition:
policer.h:53
xlate.h
VNET_POLICER_INDEX_BY_SW_IF_INDEX
Definition:
policer.h:46
VNET_POLICER_N_NEXT
Definition:
policer.h:55
sse2_qos_pol_cfg_params_st_
Definition:
xlate.h:97
vnet_policer_main_t::policers
policer_read_response_type_st * policers
Definition:
policer.h:26
vnet.h
vnet_policer_main_t::policer_index_by_sw_if_index
u32 * policer_index_by_sw_if_index
Definition:
policer.h:36
vnet_policer_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
policer.h:39
policer_add_del
clib_error_t * policer_add_del(vlib_main_t *vm, u8 *name, sse2_qos_pol_cfg_params_st *cfg, u8 is_add)
Definition:
policer.c:19
vlib.h
vnet_main_t
Definition:
vnet.h:58
u32
unsigned int u32
Definition:
types.h:88
VNET_POLICER_NEXT_DROP
Definition:
policer.h:54
uword
u64 uword
Definition:
types.h:112
clib_error_t
Definition:
error.h:75
u8
unsigned char u8
Definition:
types.h:56
vlib_main_t
Definition:
main.h:59
vnet_policer_main_t::policer_templates
policer_read_response_type_st * policer_templates
Definition:
policer.h:30
vnet_policer_main_t
Definition:
policer.h:24
VNET_POLICER_INDEX_BY_EITHER
Definition:
policer.h:48
policer_read_response_type_st
Definition:
police.h:59
VNET_POLICER_INDEX_BY_OPAQUE
Definition:
policer.h:47
vnet_policer_main
vnet_policer_main_t vnet_policer_main
Definition:
policer.h:43
vnet_policer_index_t
vnet_policer_index_t
Definition:
policer.h:45
vnet
vnet
policer
policer.h
Generated on Thu Sep 1 2016 09:11:45 for FD.io VPP by
1.8.11