TAS
TCP Acceleration as an OS Service
tas_trace.h
1 /*
2  * Copyright 2019 University of Washington, Max Planck Institute for
3  * Software Systems, and The University of Texas at Austin
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef FLEXNIC_TRACE_H_
26 #define FLEXNIC_TRACE_H_
27 
28 #include <stdint.h>
29 
30 #define FLEXNIC_TRACE_NAME "flexnic_trace_%u"
31 
32 #define FLEXNIC_TRACE_EV_RXPKT 1
33 #define FLEXNIC_TRACE_EV_TXPKT 2
34 #define FLEXNIC_TRACE_EV_DMARD 3
35 #define FLEXNIC_TRACE_EV_DMAWR 4
36 #define FLEXNIC_TRACE_EV_QMSET 6
37 #define FLEXNIC_TRACE_EV_QMEVT 7
38 
40  volatile uint64_t end_last;
41  uint64_t length;
42 } __attribute__((packed));
43 
45  uint64_t ts;
46  uint32_t seq;
47  uint16_t type;
48  uint16_t length;
49 } __attribute__((packed));
50 
52  uint16_t length;
53 } __attribute__((packed));
54 
56  uint64_t addr;
57  uint64_t len;
58  uint8_t data[];
59 } __attribute__((packed));
60 
62  uint32_t id;
63  uint32_t rate;
64  uint32_t avail;
65  uint16_t max_chunk;
66  uint8_t opaque;
67  uint8_t flags;
68 } __attribute__((packed));
69 
71  uint32_t id;
72  uint16_t bytes;
73  uint8_t opaque;
74  uint8_t pad;
75 } __attribute__((packed));
76 
77 
78 #define FLEXNIC_PL_TREV_ADB 0x100
79 #define FLEXNIC_PL_TREV_ATX 0x101
80 #define FLEXNIC_PL_TREV_ARX 0x102
81 #define FLEXNIC_PL_TREV_RXFS 0x103
82 #define FLEXNIC_PL_TREV_TXACK 0x104
83 #define FLEXNIC_PL_TREV_TXSEG 0x105
84 #define FLEXNIC_PL_TREV_ACTXQMAN 0x106
85 #define FLEXNIC_PL_TREV_AFLOQMAN 0x107
86 #define FLEXNIC_PL_TREV_REXMIT 0x108
87 
90  uint32_t rx_bump;
91  uint32_t tx_bump;
92  uint32_t bump_seq_ent;
93  uint32_t flags;
94 
95  uint32_t local_ip;
96  uint32_t remote_ip;
97  uint16_t local_port;
98  uint16_t remote_port;
99 
100  uint32_t flow_id;
101  uint32_t db_id;
102 
103  uint32_t tx_next_pos;
104  uint32_t tx_next_seq;
105  uint32_t tx_avail_prev;
106  uint32_t rx_next_pos;
107  uint32_t rx_avail;
108  uint32_t tx_len;
109  uint32_t rx_len;
110  uint32_t rx_remote_avail;
111  uint32_t tx_sent;
112  uint32_t bump_seq_flow;
113 } __attribute__((packed));
114 
117  uint64_t opaque;
118  uint32_t rx_bump;
119  uint32_t tx_bump;
120  uint32_t rx_pos;
121  uint32_t flags;
122 
123  uint32_t flow_id;
124  uint32_t db_id;
125 
126  uint32_t local_ip;
127  uint32_t remote_ip;
128  uint16_t local_port;
129  uint16_t remote_port;
130 } __attribute__((packed));
131 
134  uint32_t local_ip;
135  uint32_t remote_ip;
136  uint16_t local_port;
137  uint16_t remote_port;
138 
139  uint32_t flow_id;
140  uint32_t flow_seq;
141  uint32_t flow_ack;
142  uint16_t flow_flags;
143  uint16_t flow_len;
144 
145  uint32_t fs_rx_nextpos;
146  uint32_t fs_rx_nextseq;
147  uint32_t fs_rx_avail;
148  uint32_t fs_tx_nextpos;
149  uint32_t fs_tx_nextseq;
150  uint32_t fs_tx_sent;
151  uint32_t fs_tx_avail;
152 } __attribute__((packed));
153 
156  uint32_t local_ip;
157  uint32_t remote_ip;
158  uint16_t local_port;
159  uint16_t remote_port;
160 
161  uint32_t flow_seq;
162  uint32_t flow_ack;
163  uint16_t flow_flags;
164 } __attribute__((packed));
165 
166 /* tcp segment sent out */
168  uint32_t local_ip;
169  uint32_t remote_ip;
170  uint16_t local_port;
171  uint16_t remote_port;
172 
173  uint32_t flow_seq;
174  uint32_t flow_ack;
175  uint16_t flow_flags;
176  uint16_t flow_len;
177 } __attribute__((packed));
178 
179 /* queue manager event fetching flow payload */
181  uint64_t tx_base;
182  uint32_t tx_avail;
183  uint32_t tx_next_pos;
184  uint32_t tx_len;
185  uint32_t rx_remote_avail;
186  uint32_t tx_sent;
187 
188  uint32_t flow_id;
189 } __attribute__((packed));
190 
191 /* reset flow re-transmission */
193  uint32_t flow_id;
194  uint32_t tx_avail;
195  uint32_t tx_sent;
196  uint32_t tx_next_pos;
197  uint32_t tx_next_seq;
198  uint32_t rx_remote_avail;
199 } __attribute__((packed));
200 
201 
202 
203 
204 #endif
Definition: tas_trace.h:51
Definition: tas_trace.h:61
Definition: tas_trace.h:55
Definition: tas_trace.h:70
Definition: tas_trace.h:44