DPDK 25.03.0-rc0
rte_ecpri.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2020 Mellanox Technologies, Ltd
3 */
4
5#ifndef _RTE_ECPRI_H_
6#define _RTE_ECPRI_H_
7
17#include <stdint.h>
18#include <rte_byteorder.h>
19
20/*
21 * eCPRI Protocol Revision 1.0, 1.1, 1.2, 2.0: 0001b
22 * Other values are reserved for future
23 */
24#define RTE_ECPRI_REV_UP_TO_20 1
25
26/*
27 * eCPRI message types in specifications
28 * IWF* types will only be supported from rev.2
29 * 12-63: Reserved for future revision
30 * 64-255: Vendor Specific
31 */
32#define RTE_ECPRI_MSG_TYPE_IQ_DATA 0
33#define RTE_ECPRI_MSG_TYPE_BIT_SEQ 1
34#define RTE_ECPRI_MSG_TYPE_RTC_CTRL 2
35#define RTE_ECPRI_MSG_TYPE_GEN_DATA 3
36#define RTE_ECPRI_MSG_TYPE_RM_ACC 4
37#define RTE_ECPRI_MSG_TYPE_DLY_MSR 5
38#define RTE_ECPRI_MSG_TYPE_RMT_RST 6
39#define RTE_ECPRI_MSG_TYPE_EVT_IND 7
40#define RTE_ECPRI_MSG_TYPE_IWF_UP 8
41#define RTE_ECPRI_MSG_TYPE_IWF_OPT 9
42#define RTE_ECPRI_MSG_TYPE_IWF_MAP 10
43#define RTE_ECPRI_MSG_TYPE_IWF_DCTRL 11
44
45/*
46 * Event Type of Message Type #7: Event Indication
47 * 0x00: Fault(s) Indication
48 * 0x01: Fault(s) Indication Acknowledge
49 * 0x02: Notification(s) Indication
50 * 0x03: Synchronization Request
51 * 0x04: Synchronization Acknowledge
52 * 0x05: Synchronization End Indication
53 * 0x06...0xFF: Reserved
54 */
55#define RTE_ECPRI_EVT_IND_FAULT_IND 0x00
56#define RTE_ECPRI_EVT_IND_FAULT_ACK 0x01
57#define RTE_ECPRI_EVT_IND_NTFY_IND 0x02
58#define RTE_ECPRI_EVT_IND_SYNC_REQ 0x03
59#define RTE_ECPRI_EVT_IND_SYNC_ACK 0x04
60#define RTE_ECPRI_EVT_IND_SYNC_END 0x05
61
66 union {
68 struct {
69#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
70 uint32_t size:16;
71 uint32_t type:8;
72 uint32_t c:1;
73 uint32_t res:3;
74 uint32_t revision:4;
75#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
76 uint32_t revision:4;
77 uint32_t res:3;
78 uint32_t c:1;
79 uint32_t type:8;
80 uint32_t size:16;
81#endif
82 };
83 };
84};
85
92};
93
100};
101
108};
109
116};
117
122#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
123 uint32_t ele_id:16;
124 uint32_t rr:4;
125 uint32_t rw:4;
126 uint32_t rma_id:8;
127#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
128 uint32_t rma_id:8;
129 uint32_t rw:4;
130 uint32_t rr:4;
131 uint32_t ele_id:16;
132#endif
133 uint8_t addr[6];
135};
136
141 uint8_t msr_id;
142 uint8_t act_type;
143};
144
150 uint8_t rst_op;
151};
152
157 uint8_t evt_id;
158 uint8_t evt_type;
159 uint8_t seq;
160 uint8_t number;
161};
162
167 struct rte_ecpri_common_hdr common;
168 union {
169 struct rte_ecpri_msg_iq_data type0;
170 struct rte_ecpri_msg_bit_seq type1;
171 struct rte_ecpri_msg_rtc_ctrl type2;
172 struct rte_ecpri_msg_gen_data type3;
173 struct rte_ecpri_msg_rm_access type4;
174 struct rte_ecpri_msg_delay_measure type5;
175 struct rte_ecpri_msg_remote_reset type6;
176 struct rte_ecpri_msg_event_ind type7;
177 rte_be32_t dummy[3];
178 };
179};
180
181#endif /* _RTE_ECPRI_H_ */
uint32_t rte_be32_t
uint16_t rte_be16_t
rte_be32_t u32
Definition: rte_ecpri.h:67
rte_be16_t pc_id
Definition: rte_ecpri.h:98
rte_be16_t seq_id
Definition: rte_ecpri.h:99
rte_be16_t pc_id
Definition: rte_ecpri.h:90
rte_be16_t seq_id
Definition: rte_ecpri.h:91