DPDK  23.07.0
rte_pdcp_hdr.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2023 Marvell.
3  */
4 
5 #ifndef RTE_PDCP_HDR_H
6 #define RTE_PDCP_HDR_H
7 
17 #include <rte_byteorder.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
28 #define RTE_PDCP_CTRL_PDU_SIZE_MAX 9000u
29 
35 #define RTE_PDCP_MAC_I_LEN 4
36 
42  RTE_PDCP_CTRL_PDU_TYPE_STATUS_REPORT = 0,
43  RTE_PDCP_CTRL_PDU_TYPE_ROHC_FEEDBACK = 1,
44  RTE_PDCP_CTRL_PDU_TYPE_EHC_FEEDBACK = 2,
45  RTE_PDCP_CRTL_PDU_TYPE_UDC_FEEDBACK = 3,
46 };
47 
55  RTE_PDCP_PDU_TYPE_CTRL = 0,
56  RTE_PDCP_PDU_TYPE_DATA = 1,
57 };
58 
62 __extension__
64 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
65  uint8_t sn_11_8 : 4;
66  uint8_t r : 4;
67 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
68  uint8_t r : 4;
69  uint8_t sn_11_8 : 4;
70 #endif
71  uint8_t sn_7_0;
72 } __rte_packed;
73 
77 __extension__
79 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
80  uint8_t sn_11_8 : 4;
81  uint8_t r : 3;
82  uint8_t d_c : 1;
83 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
84  uint8_t d_c : 1;
85  uint8_t r : 3;
86  uint8_t sn_11_8 : 4;
87 #endif
88  uint8_t sn_7_0;
89 } __rte_packed;
90 
94 __extension__
96 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
97  uint8_t sn_17_16 : 2;
98  uint8_t r : 5;
99  uint8_t d_c : 1;
100 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
101  uint8_t d_c : 1;
102  uint8_t r : 5;
103  uint8_t sn_17_16 : 2;
104 #endif
105  uint8_t sn_15_8;
106  uint8_t sn_7_0;
107 } __rte_packed;
108 
112 __extension__
114 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
115  uint8_t r : 4;
116  uint8_t pdu_type : 3;
117  uint8_t d_c : 1;
118 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
119  uint8_t d_c : 1;
120  uint8_t pdu_type : 3;
121  uint8_t r : 4;
122 #endif
123 
140  uint8_t bitmap[];
141 } __rte_packed;
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif /* RTE_PDCP_HDR_H */
uint32_t rte_be32_t
#define __rte_packed
Definition: rte_common.h:83
rte_pdcp_ctrl_pdu_type
Definition: rte_pdcp_hdr.h:41
rte_pdcp_pdu_type
Definition: rte_pdcp_hdr.h:54