vlib: prevent some signals from being executed on workers
[vpp.git] / src / vnet / policer / policer_types.api
1 /*
2  * Copyright (c) 2020 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 option version = "1.0.0";
16
17 enum sse2_qos_rate_type : u8
18 {
19   SSE2_QOS_RATE_API_KBPS = 0,
20   SSE2_QOS_RATE_API_PPS,
21   SSE2_QOS_RATE_API_INVALID,
22 };
23
24 enum sse2_qos_round_type : u8
25 {
26   SSE2_QOS_ROUND_API_TO_CLOSEST = 0,
27   SSE2_QOS_ROUND_API_TO_UP,
28   SSE2_QOS_ROUND_API_TO_DOWN,
29   SSE2_QOS_ROUND_API_INVALID,
30 };
31
32 enum sse2_qos_policer_type : u8
33 {
34   SSE2_QOS_POLICER_TYPE_API_1R2C = 0,
35   SSE2_QOS_POLICER_TYPE_API_1R3C_RFC_2697 = 1,
36   SSE2_QOS_POLICER_TYPE_API_2R3C_RFC_2698 = 2,
37   SSE2_QOS_POLICER_TYPE_API_2R3C_RFC_4115 = 3,
38   SSE2_QOS_POLICER_TYPE_API_2R3C_RFC_MEF5CF1 = 4,
39   SSE2_QOS_POLICER_TYPE_API_MAX,
40 };
41
42 enum sse2_qos_action_type : u8
43 {
44   SSE2_QOS_ACTION_API_DROP = 0,
45   SSE2_QOS_ACTION_API_TRANSMIT,
46   SSE2_QOS_ACTION_API_MARK_AND_TRANSMIT,
47 };
48
49 /** \brief QOS action
50     @param conform_action_type - conform action type
51     @param conform_dscp - DSCP for conform mark-and-transmit action
52 */
53 typedef sse2_qos_action
54 {
55   vl_api_sse2_qos_action_type_t type;
56   u8 dscp;
57 };
58
59 /** \brief Policer configuration
60     @param cir - CIR
61     @param eir - EIR
62     @param cb - Committed Burst
63     @param eb - Excess or Peak Burst
64     @param rate_type - rate type
65     @param round_type - rounding type
66     @param type - policer algorithm
67     @param color_aware - 0=color-blind, 1=color-aware
68     @param conform_action - conform action
69     @param exceed_action - exceed action type
70     @param violate_action - violate action type
71 */
72 typedef policer_config
73 {
74   u32 cir;
75   u32 eir;
76   u64 cb;
77   u64 eb;
78   vl_api_sse2_qos_rate_type_t rate_type;
79   vl_api_sse2_qos_round_type_t round_type;
80   vl_api_sse2_qos_policer_type_t type;
81   bool color_aware;
82   vl_api_sse2_qos_action_t conform_action;
83   vl_api_sse2_qos_action_t exceed_action;
84   vl_api_sse2_qos_action_t violate_action;
85 };
86
87 /*
88  * Local Variables:
89  * eval: (c-set-style "gnu")
90  * End:
91  */