o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
fhi_lib
lib
api
xran_pkt.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (c) 2019 Intel.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*******************************************************************************/
18
26
/* ORAN-WG4.CUS.0-v01.00 O-RAN Fronthaul Working Group
27
Control, User and Synchronization Plane Specification
28
*/
29
30
/*
31
* Layer common to data and control packets
32
*/
33
34
#ifndef _XRAN_PKT_H_
35
#define _XRAN_PKT_H_
36
37
#ifdef __cplusplus
38
extern
"C"
{
39
#endif
40
41
#include <rte_common.h>
42
#include <rte_ether.h>
43
#include <rte_byteorder.h>
44
56
#define ECPRI_MAX_PAYLOAD_SIZE 65535
58
/* XRAN spec: For this encapsulation, either the eCPRI Ethertype or the IEEE 1914.3 Ethertype shall be use */
59
#define XRAN_ETHER_TYPE 0xAEFE
61
#define XRAN_ECPRI_VER 0x0001
62
#define XRAN_PAYLOAD_VER 0x0001
64
#define VLAN_ID 0
65
#define VLAN_PCP 7
75
enum ecpri_msg_type
76
{
77
ECPRI_IQ_DATA
= 0x00,
78
ECPRI_BIT_SEQUENCE
= 0x01,
/* msg type is not supported */
79
ECPRI_RT_CONTROL_DATA
= 0x02,
81
/* Below msg types are not supported */
82
ECPRI_GEN_DATA_TRANSFER
= 0x03,
83
ECPRI_REMOTE_MEM_ACCESS
= 0x04,
84
ECPRI_DELAY_MEASUREMENT
= 0x05,
85
ECPRI_REMOTE_RESET
= 0x06,
86
ECPRI_EVENT_INDICATION
= 0x07,
87
ECPRI_MSG_TYPE_MAX
88
};
89
97
struct
ecpri_seq_id
98
{
99
uint8_t
seq_id
:8;
100
uint8_t
sub_seq_id
:7;
101
uint8_t
e_bit
:1;
102
}
__rte_packed
;
103
104
113
struct
xran_ecpri_cmn_hdr
114
{
115
uint8_t
ecpri_concat
:1;
116
uint8_t
ecpri_resv
:3;
117
uint8_t
ecpri_ver
:4;
118
uint8_t
ecpri_mesg_type
;
119
uint16_t
ecpri_payl_size
;
120
}
__rte_packed
;
121
130
struct
xran_ecpri_hdr
131
{
132
struct
xran_ecpri_cmn_hdr
cmnhdr
;
133
rte_be16_t
ecpri_xtc_id
;
134
struct
ecpri_seq_id
ecpri_seq_id
;
135
}
__rte_packed
;
136
137
146
enum
xran_pkt_dir
147
{
148
XRAN_DIR_UL
= 0,
149
XRAN_DIR_DL
= 1,
150
XRAN_DIR_MAX
151
};
152
162
struct
radio_app_common_hdr
163
{
164
/* Octet 9 */
165
uint8_t
filter_id
:4;
170
uint8_t
payl_ver
:3;
173
uint8_t
data_direction
:1;
175
/* Octet 10 */
176
uint8_t
frame_id
:8;
178
/* Octet 11 */
179
/* Octet 12 */
180
union
{
181
uint16_t
value
;
182
struct
{
183
uint16_t
symb_id
:6;
185
uint16_t
slot_id
:6;
189
uint16_t
subframe_id
:4;
190
};
191
}sf_slot_sym;
192
193
}
__rte_packed
;
194
206
struct
compression_hdr
207
{
208
uint8_t
ud_iq_width
:4;
213
uint8_t
ud_comp_meth
:4;
223
}
__rte_packed
;
224
233
struct
xran_pkt_comm_hdr
234
{
235
struct
ether_hdr eth_hdr;
236
struct
xran_ecpri_hdr
ecpri_hdr;
237
}
__rte_packed
;
238
239
#ifdef __cplusplus
240
}
241
#endif
242
243
#endif
radio_app_common_hdr::data_direction
uint8_t data_direction
Definition:
xran_pkt.h:173
xran_ecpri_cmn_hdr::ecpri_concat
uint8_t ecpri_concat
Definition:
xran_pkt.h:115
ECPRI_BIT_SEQUENCE
Definition:
xran_pkt.h:78
xran_pkt_dir
xran_pkt_dir
Definition:
xran_pkt.h:146
ECPRI_REMOTE_RESET
Definition:
xran_pkt.h:85
ECPRI_DELAY_MEASUREMENT
Definition:
xran_pkt.h:84
radio_app_common_hdr::frame_id
uint8_t frame_id
Definition:
xran_pkt.h:176
ECPRI_RT_CONTROL_DATA
Definition:
xran_pkt.h:79
ecpri_seq_id::seq_id
uint8_t seq_id
Definition:
xran_pkt.h:99
XRAN_DIR_DL
Definition:
xran_pkt.h:149
xran_pkt_comm_hdr
Definition:
xran_pkt.h:233
cmnhdr
struct xran_cp_radioapp_common_header cmnhdr
Definition:
xran_pkt_cp.h:214
xran_ecpri_cmn_hdr::ecpri_ver
uint8_t ecpri_ver
Definition:
xran_pkt.h:117
ECPRI_EVENT_INDICATION
Definition:
xran_pkt.h:86
radio_app_common_hdr::payl_ver
uint8_t payl_ver
Definition:
xran_pkt.h:170
xran_ecpri_hdr
Definition:
xran_pkt.h:130
radio_app_common_hdr::value
uint16_t value
Definition:
xran_pkt.h:181
xran_ecpri_cmn_hdr::ecpri_resv
uint8_t ecpri_resv
Definition:
xran_pkt.h:116
xran_ecpri_cmn_hdr
Definition:
xran_pkt.h:113
radio_app_common_hdr::symb_id
uint16_t symb_id
Definition:
xran_pkt.h:183
ECPRI_REMOTE_MEM_ACCESS
Definition:
xran_pkt.h:83
compression_hdr::ud_iq_width
uint8_t ud_iq_width
Definition:
xran_pkt.h:208
ecpri_seq_id::e_bit
uint8_t e_bit
Definition:
xran_pkt.h:101
ecpri_seq_id::sub_seq_id
uint8_t sub_seq_id
Definition:
xran_pkt.h:100
compression_hdr::ud_comp_meth
uint8_t ud_comp_meth
Definition:
xran_pkt.h:213
__rte_packed
struct ecpri_seq_id __rte_packed
ecpri_seq_id
Definition:
xran_pkt.h:97
xran_ecpri_hdr::ecpri_xtc_id
rte_be16_t ecpri_xtc_id
Definition:
xran_pkt.h:133
radio_app_common_hdr::slot_id
uint16_t slot_id
Definition:
xran_pkt.h:185
radio_app_common_hdr::subframe_id
uint16_t subframe_id
Definition:
xran_pkt.h:189
radio_app_common_hdr::filter_id
uint8_t filter_id
Definition:
xran_pkt.h:165
XRAN_DIR_MAX
Definition:
xran_pkt.h:150
ECPRI_GEN_DATA_TRANSFER
Definition:
xran_pkt.h:82
ECPRI_MSG_TYPE_MAX
Definition:
xran_pkt.h:87
xran_ecpri_cmn_hdr::ecpri_mesg_type
uint8_t ecpri_mesg_type
Definition:
xran_pkt.h:118
XRAN_DIR_UL
Definition:
xran_pkt.h:148
ECPRI_IQ_DATA
Definition:
xran_pkt.h:77
radio_app_common_hdr
Definition:
xran_pkt.h:162
compression_hdr
Definition:
xran_pkt.h:206
xran_ecpri_cmn_hdr::ecpri_payl_size
uint16_t ecpri_payl_size
Definition:
xran_pkt.h:119
Generated by
1.8.13