Support DPDK 19.11 rc0
[samplevnf.git] / VNFs / DPPD-PROX / vxlangpe_nsh.h
1 /*
2 // Copyright (c) 2010-2017 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 #ifndef _VXLANGPE_NSH_H_
18 #define _VXLANGPE_NSH_H_
19
20 #include <rte_version.h>
21
22 struct nsh_hdr {
23         uint16_t version :2;
24         uint16_t oa_flag :1;
25         uint16_t cm_flag :1;
26         uint16_t reserved :6;
27         uint16_t length :6;
28         uint8_t md_type;
29         uint8_t next_proto;
30         uint32_t sfp_index :24;
31         uint32_t sf_index :8;
32         uint32_t ctx_1;
33         uint32_t ctx_2;
34         uint32_t ctx_3;
35         uint32_t ctx_4;
36 } __attribute__((__packed__));
37
38 #if RTE_VERSION < RTE_VERSION_NUM(18,5,0,0)
39 typedef struct prox_rte_vxlan_gpe_hdr {
40         uint8_t flag_0;
41         uint8_t flag_1;
42         uint8_t reserved;
43         uint8_t proto;
44         uint32_t vni_res;
45 } __attribute__((__packed__)) prox_rte_vxlan_gpe_hdr;
46 #endif
47 #endif /* _VXLANGPE_NSH_H_ */