FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
b
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
Functions
d
f
g
l
m
n
o
p
t
v
Variables
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
c
e
g
h
k
m
n
o
r
s
Related Functions
c
d
e
h
i
m
o
p
r
s
v
Source
Files
Symbols
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
ip_flow_hash.h
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
16
#ifndef __IP_FLOW_HASH_H__
17
#define __IP_FLOW_HASH_H__
18
19
#include <
vnet/ip/ip_types.h
>
20
21
/** Default: 5-tuple + flowlabel without the "reverse" bit */
22
#define IP_FLOW_HASH_DEFAULT (0x9F)
23
24
#define foreach_flow_hash_bit_v1 \
25
_ (src, IP_FLOW_HASH_SRC_ADDR) \
26
_ (dst, IP_FLOW_HASH_DST_ADDR) \
27
_ (sport, IP_FLOW_HASH_SRC_PORT) \
28
_ (dport, IP_FLOW_HASH_DST_PORT) \
29
_ (proto, IP_FLOW_HASH_PROTO) \
30
_ (reverse, IP_FLOW_HASH_REVERSE_SRC_DST) \
31
_ (symmetric, IP_FLOW_HASH_SYMMETRIC)
32
33
#define foreach_flow_hash_bit \
34
_ (src, 0, IP_FLOW_HASH_SRC_ADDR) \
35
_ (dst, 1, IP_FLOW_HASH_DST_ADDR) \
36
_ (sport, 2, IP_FLOW_HASH_SRC_PORT) \
37
_ (dport, 3, IP_FLOW_HASH_DST_PORT) \
38
_ (proto, 4, IP_FLOW_HASH_PROTO) \
39
_ (reverse, 5, IP_FLOW_HASH_REVERSE_SRC_DST) \
40
_ (symmetric, 6, IP_FLOW_HASH_SYMMETRIC) \
41
_ (flowlabel, 7, IP_FLOW_HASH_FL)
42
43
/**
44
* A flow hash configuration is a mask of the flow hash options
45
*/
46
typedef
enum
flow_hash_config_t_
47
{
48
#define _(a, b, c) c = (1 << b),
49
foreach_flow_hash_bit
50
#undef _
51
}
flow_hash_config_t
;
52
53
/* Router ID mixed into the flow hash to prevent network polarisation */
54
extern
u32
ip_flow_hash_router_id
;
55
56
int
ip_flow_hash_set
(
ip_address_family_t
af
,
u32
table_id
,
57
flow_hash_config_t
flow_hash_config);
58
void
ip_flow_hash_router_id_set
(
u32
router_id);
59
60
#endif
/* __IP_TYPES_H__ */
61
62
/*
63
* fd.io coding-style-patch-verification: ON
64
*
65
* Local Variables:
66
* eval: (c-set-style "gnu")
67
* End:
68
*/
ip_flow_hash_set
int ip_flow_hash_set(ip_address_family_t af, u32 table_id, flow_hash_config_t flow_hash_config)
flow_hash_config_t_
flow_hash_config_t_
A flow hash configuration is a mask of the flow hash options.
Definition:
ip_flow_hash.h:46
flow_hash_config_t
enum flow_hash_config_t_ flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
ip_flow_hash_router_id_set
void ip_flow_hash_router_id_set(u32 router_id)
Definition:
ip.c:209
ip_types.h
ip_flow_hash_router_id
u32 ip_flow_hash_router_id
Definition:
ip.c:19
foreach_flow_hash_bit
#define foreach_flow_hash_bit
Definition:
ip_flow_hash.h:33
u32
unsigned int u32
Definition:
types.h:88
af
vl_api_address_family_t af
Definition:
ip.api:619
table_id
u32 table_id
Definition:
wireguard.api:102
ip_address_family_t
enum ip_address_family_t_ ip_address_family_t
src
vnet
ip
ip_flow_hash.h
Generated on Sat Jan 8 2022 10:36:37 for FD.io VPP by
1.8.17