FD.io VPP
v17.04.2-2-ga8f93f8
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
mpls_lookup.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
16
#ifndef __MPLS_LOOKUP_H__
17
#define __MPLS_LOOKUP_H__
18
19
#include <
vnet/mpls/mpls.h
>
20
#include <
vnet/ip/ip.h
>
21
22
/*
23
* Compute flow hash.
24
* We'll use it to select which adjacency to use for this flow. And other things.
25
*/
26
always_inline
u32
27
mpls_compute_flow_hash
(
const
mpls_unicast_header_t
* hdr,
28
flow_hash_config_t
flow_hash_config)
29
{
30
return
(
vnet_mpls_uc_get_label
(hdr->
label_exp_s_ttl
));
31
}
32
33
#endif
/* __MPLS_LOOKUP_H__ */
ip.h
always_inline
#define always_inline
Definition:
clib.h:84
mpls_compute_flow_hash
static u32 mpls_compute_flow_hash(const mpls_unicast_header_t *hdr, flow_hash_config_t flow_hash_config)
Definition:
mpls_lookup.h:27
vnet_mpls_uc_get_label
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
Definition:
packet.h:77
u32
unsigned int u32
Definition:
types.h:88
mpls_unicast_header_t
Definition:
packet.h:26
mpls_unicast_header_t::label_exp_s_ttl
mpls_label_t label_exp_s_ttl
Definition:
packet.h:31
flow_hash_config_t
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
Definition:
lookup.h:165
mpls.h
src
vnet
mpls
mpls_lookup.h
Generated on Sat Jul 1 2017 12:02:27 for FD.io VPP by
1.8.11