FD.io VPP  v21.01.1
Vector Packet Processing
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 /** Flow hash configuration */
20 #define IP_FLOW_HASH_SRC_ADDR (1<<0)
21 #define IP_FLOW_HASH_DST_ADDR (1<<1)
22 #define IP_FLOW_HASH_PROTO (1<<2)
23 #define IP_FLOW_HASH_SRC_PORT (1<<3)
24 #define IP_FLOW_HASH_DST_PORT (1<<4)
25 #define IP_FLOW_HASH_REVERSE_SRC_DST (1<<5)
26 #define IP_FLOW_HASH_SYMMETRIC (1<<6)
27 
28 /** Default: 5-tuple without the "reverse" bit */
29 #define IP_FLOW_HASH_DEFAULT (0x1F)
30 
31 #define foreach_flow_hash_bit \
32 _(src, IP_FLOW_HASH_SRC_ADDR) \
33 _(dst, IP_FLOW_HASH_DST_ADDR) \
34 _(sport, IP_FLOW_HASH_SRC_PORT) \
35 _(dport, IP_FLOW_HASH_DST_PORT) \
36 _(proto, IP_FLOW_HASH_PROTO) \
37 _(reverse, IP_FLOW_HASH_REVERSE_SRC_DST) \
38 _(symmetric, IP_FLOW_HASH_SYMMETRIC)
39 
40 /**
41  * A flow hash configuration is a mask of the flow hash options
42  */
44 
45 #endif /* __IP_TYPES_H__ */
46 
47 /*
48  * fd.io coding-style-patch-verification: ON
49  *
50  * Local Variables:
51  * eval: (c-set-style "gnu")
52  * End:
53  */
unsigned int u32
Definition: types.h:88
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
Definition: ip_flow_hash.h:43