FD.io VPP
v16.09
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
ila.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 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
#ifndef ILA_H
17
#define ILA_H
18
19
#include <
vnet/vnet.h
>
20
#include <
vnet/ip/ip.h
>
21
22
#include <
vppinfra/bihash_24_8.h
>
23
#include <
vppinfra/bihash_template.h
>
24
25
#define ila_foreach_type \
26
_(IID, 0, "iid") \
27
_(LUID, 1, "luid") \
28
_(VNID4, 2, "vnid-ip4") \
29
_(VNID6, 3, "vnid-ip6") \
30
_(VNIDM, 4, "vnid-multicast")
31
32
#define ila_type_list "iid,luid,vnid-ip4,vnid-ip6,vnid-multicast"
33
34
typedef
enum
35
{
36
#define _(i,n,s) ILA_TYPE_##i = n,
37
ila_foreach_type
38
#undef _
39
}
ila_type_t
;
40
41
#define ila_csum_foreach_type \
42
_(NO_ACTION, 0, "no-action") \
43
_(NEUTRAL_MAP, 1, "neutral-map") \
44
_(ADJUST_TRANSPORT, 2, "adjust-transport")
45
46
#define ila_csum_list "no-action,neutral-map,adjust-transport"
47
48
typedef
enum
49
{
50
#define _(i,n,s) ILA_CSUM_MODE_##i = n,
51
ila_csum_foreach_type
52
#undef _
53
ILA_CSUM_N_TYPES
54
}
ila_csum_mode_t
;
55
56
#define ila_foreach_direction \
57
_(BIDIR, 0, "bidir") \
58
_(SIR2ILA, 1, "sir2ila") \
59
_(ILA2SIR, 2, "ila2sir")
60
61
#define ila_direction_list "bidir,sir2ila,ila2sir"
62
63
typedef
enum
64
{
65
#define _(i,n,s) ILA_DIR_##i = n,
66
ila_foreach_direction
67
#undef _
68
}
ila_direction_t
;
69
70
typedef
struct
71
{
72
ila_type_t
type
;
73
ip6_address_t
sir_address
;
74
ip6_address_t
ila_address
;
75
u32
ila_adj_index
;
76
ila_csum_mode_t
csum_mode
;
77
ila_direction_t
dir
;
78
}
ila_entry_t
;
79
80
typedef
struct
81
{
82
u32
entry_index
;
83
}
ila_adj_data_t
;
84
85
typedef
struct
86
{
87
ila_entry_t
*
entries
;
//Pool of ILA entries
88
89
u64
lookup_table_nbuckets
;
90
u64
lookup_table_size
;
91
clib_bihash_24_8_t
id_to_entry_table
;
92
93
u32
ila_sir2ila_feature_index
;
94
95
u32
ip6_lookup_next_index
;
96
}
ila_main_t
;
97
98
99
typedef
struct
100
{
101
ila_type_t
type
;
102
ip6_address_t
sir_address
;
103
u64
locator
;
104
u32
vnid
;
105
u32
local_adj_index
;
106
ila_csum_mode_t
csum_mode
;
107
ila_direction_t
dir
;
108
u8
is_del
;
109
}
ila_add_del_entry_args_t
;
110
111
int
ila_add_del_entry
(
ila_add_del_entry_args_t
* args);
112
int
ila_interface
(
u32
sw_if_index,
u8
disable);
113
114
u8
*
format_half_ip6_address
(
u8
* s, va_list * va);
115
u8
*
format_ila_direction
(
u8
* s, va_list * args);
116
u8
*
format_ila_csum_mode
(
u8
* s, va_list * va);
117
u8
*
format_ila_type
(
u8
* s, va_list * args);
118
119
#endif //ILA_H
ila_adj_data_t::entry_index
u32 entry_index
Definition:
ila.h:82
ila_entry_t::dir
ila_direction_t dir
Definition:
ila.h:77
format_ila_type
u8 * format_ila_type(u8 *s, va_list *args)
Definition:
ila.c:106
ila_main_t::id_to_entry_table
clib_bihash_24_8_t id_to_entry_table
Definition:
ila.h:91
ila_add_del_entry_args_t::dir
ila_direction_t dir
Definition:
ila.h:107
bihash_24_8.h
ila_add_del_entry_args_t
Definition:
ila.h:99
ila_entry_t::ila_address
ip6_address_t ila_address
Definition:
ila.h:74
ila_csum_mode_t
ila_csum_mode_t
Definition:
ila.h:48
ip.h
ila_entry_t::sir_address
ip6_address_t sir_address
Definition:
ila.h:73
format_half_ip6_address
u8 * format_half_ip6_address(u8 *s, va_list *va)
Definition:
ila.c:63
ila_foreach_direction
#define ila_foreach_direction
Definition:
ila.h:56
ila_entry_t::type
ila_type_t type
Definition:
ila.h:72
ila_add_del_entry_args_t::is_del
u8 is_del
Definition:
ila.h:108
ila_add_del_entry
int ila_add_del_entry(ila_add_del_entry_args_t *args)
Definition:
ila.c:619
u64
unsigned long u64
Definition:
types.h:89
ila_add_del_entry_args_t::local_adj_index
u32 local_adj_index
Definition:
ila.h:105
ila_direction_t
ila_direction_t
Definition:
ila.h:63
ila_main_t::lookup_table_nbuckets
u64 lookup_table_nbuckets
Definition:
ila.h:89
ila_csum_foreach_type
#define ila_csum_foreach_type
Definition:
ila.h:41
ila_entry_t
Definition:
ila.h:70
ila_add_del_entry_args_t::vnid
u32 vnid
Definition:
ila.h:104
format_ila_direction
u8 * format_ila_direction(u8 *s, va_list *args)
Definition:
ila.c:73
ila_foreach_type
#define ila_foreach_type
Definition:
ila.h:25
ILA_CSUM_N_TYPES
Definition:
ila.h:53
ila_add_del_entry_args_t::csum_mode
ila_csum_mode_t csum_mode
Definition:
ila.h:106
vnet.h
ila_main_t::entries
ila_entry_t * entries
Definition:
ila.h:87
ila_interface
int ila_interface(u32 sw_if_index, u8 disable)
Definition:
ila.c:793
ila_add_del_entry_args_t::type
ila_type_t type
Definition:
ila.h:101
ila_main_t::ila_sir2ila_feature_index
u32 ila_sir2ila_feature_index
Definition:
ila.h:93
ila_adj_data_t
Definition:
ila.h:80
u32
unsigned int u32
Definition:
types.h:88
ila_main_t::lookup_table_size
u64 lookup_table_size
Definition:
ila.h:90
ila_add_del_entry_args_t::sir_address
ip6_address_t sir_address
Definition:
ila.h:102
ila_main_t
Definition:
ila.h:85
ila_entry_t::ila_adj_index
u32 ila_adj_index
Definition:
ila.h:75
ila_main_t::ip6_lookup_next_index
u32 ip6_lookup_next_index
Definition:
ila.h:95
format_ila_csum_mode
u8 * format_ila_csum_mode(u8 *s, va_list *va)
Definition:
ila.c:85
u8
unsigned char u8
Definition:
types.h:56
ila_add_del_entry_args_t::locator
u64 locator
Definition:
ila.h:103
ila_entry_t::csum_mode
ila_csum_mode_t csum_mode
Definition:
ila.h:76
bihash_template.h
ila_type_t
ila_type_t
Definition:
ila.h:34
ip6_address_t
Definition:
ip6_packet.h:46
plugins
ila-plugin
ila
ila.h
Generated on Fri Nov 18 2016 06:17:26 for FD.io VPP by
1.8.11