DPDK  19.11.14
rte_higig.h
1 
2 /* SPDX-License-Identifier: BSD-3-Clause
3  * Copyright(C) 2019 Marvell International Ltd.
4  */
5 
6 #ifndef _RTE_HIGIG_H_
7 #define _RTE_HIGIG_H_
8 
9 #include <stdint.h>
10 #include <rte_byteorder.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
21 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
22  uint32_t ksop:8;
23  uint32_t tc:4;
24  uint32_t mcst:1;
25  uint32_t resv:3;
26  uint32_t dst_modid:8;
27  uint32_t dst_pid:8;
28  uint32_t src_modid:8;
29  uint32_t src_pid:8;
30  uint32_t lbid:8;
31  uint32_t ppd_type:3;
32  uint32_t resv1:3;
33  uint32_t dp:2;
34 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
35  uint32_t ksop:8;
36  uint32_t resv:3;
37  uint32_t mcst:1;
38  uint32_t tc:4;
39  uint32_t dst_modid:8;
40  uint32_t dst_pid:8;
41  uint32_t src_modid:8;
42  uint32_t src_pid:8;
43  uint32_t lbid:8;
44  uint32_t dp:2;
45  uint32_t resv1:3;
46  uint32_t ppd_type:3;
47 #endif
48 };
49 
50 
56 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
57  uint32_t mirror:1;
58  uint32_t mirror_done:1;
59  uint32_t mirror_only:1;
60  uint32_t ingress_tagged:1;
61  uint32_t dst_tgid:3;
62  uint32_t dst_t:1;
63  uint32_t vc_label2:4;
64  uint32_t label_present:1;
65  uint32_t l3:1;
66  uint32_t res:2;
67  uint32_t vc_label1:8;
68  uint32_t vc_label0:8;
69  uint32_t vid_high:8;
70  uint32_t vid_low:8;
71  uint32_t opc:3;
72  uint32_t res1:2;
73  uint32_t srce_t:1;
74  uint32_t pf:2;
75  uint32_t res2:5;
76  uint32_t hdr_ext_length:3;
77 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
78  uint32_t dst_t:1;
79  uint32_t dst_tgid:3;
80  uint32_t ingress_tagged:1;
81  uint32_t mirror_only:1;
82  uint32_t mirror_done:1;
83  uint32_t mirror:1;
84  uint32_t res:2;
85  uint32_t l3:1;
86  uint32_t label_present:1;
87  uint32_t vc_label2:4;
88  uint32_t vc_label1:8;
89  uint32_t vc_label0:8;
90  uint32_t vid_high:8;
91  uint32_t vid_low:8;
92  uint32_t pf:2;
93  uint32_t srce_t:1;
94  uint32_t res1:2;
95  uint32_t opc:3;
96  uint32_t hdr_ext_length:3;
97  uint32_t res2:5;
98 #endif
99 };
100 
101 
106 __extension__
108  uint16_t classification;
109  uint16_t resv;
110  uint16_t vid;
111 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
112  uint16_t opcode:3;
113  uint16_t resv1:2;
114  uint16_t src_t:1;
115  uint16_t pfm:2;
116  uint16_t resv2:5;
117  uint16_t hdr_ext_len:3;
118 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
119  uint16_t pfm:2;
120  uint16_t src_t:1;
121  uint16_t resv1:2;
122  uint16_t opcode:3;
123  uint16_t hdr_ext_len:3;
124  uint16_t resv2:5;
125 #endif
126 };
127 
134  struct rte_higig2_frc fcr;
135  union {
136  struct rte_higig2_ppt_type0 ppt0;
137  struct rte_higig2_ppt_type1 ppt1;
138  };
139 };
140 
141 #ifdef __cplusplus
142 }
143 #endif
144 
145 #endif /* RTE_HIGIG_H_ */
#define RTE_STD_C11
Definition: rte_common.h:40