Lines Matching full:header
12 #include "packet-header-definitions.h"
15 static void serialize_async_header_common(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_common()
20 async_header_set_destination(header, dst_id); in serialize_async_header_common()
21 async_header_set_tlabel(header, tlabel); in serialize_async_header_common()
22 async_header_set_retry(header, retry); in serialize_async_header_common()
23 async_header_set_tcode(header, tcode); in serialize_async_header_common()
24 async_header_set_priority(header, priority); in serialize_async_header_common()
25 async_header_set_source(header, src_id); in serialize_async_header_common()
28 static void serialize_async_header_request(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_request()
33 serialize_async_header_common(header, dst_id, tlabel, retry, tcode, priority, src_id); in serialize_async_header_request()
34 async_header_set_offset(header, offset); in serialize_async_header_request()
37 static void serialize_async_header_quadlet_request(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_quadlet_request()
43 serialize_async_header_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in serialize_async_header_quadlet_request()
47 static void serialize_async_header_block_request(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_block_request()
54 serialize_async_header_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in serialize_async_header_block_request()
56 async_header_set_data_length(header, data_length); in serialize_async_header_block_request()
57 async_header_set_extended_tcode(header, extended_tcode); in serialize_async_header_block_request()
60 static void serialize_async_header_response(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_response()
66 serialize_async_header_common(header, dst_id, tlabel, retry, tcode, priority, src_id); in serialize_async_header_response()
67 async_header_set_rcode(header, rcode); in serialize_async_header_response()
70 static void serialize_async_header_quadlet_response(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_quadlet_response()
76 serialize_async_header_response(header, dst_id, tlabel, retry, tcode, priority, src_id, in serialize_async_header_quadlet_response()
80 static void serialize_async_header_block_response(u32 header[ASYNC_HEADER_QUADLET_COUNT], in serialize_async_header_block_response()
87 serialize_async_header_response(header, dst_id, tlabel, retry, tcode, priority, src_id, in serialize_async_header_block_response()
89 async_header_set_data_length(header, data_length); in serialize_async_header_block_response()
90 async_header_set_extended_tcode(header, extended_tcode); in serialize_async_header_block_response()
93 static void deserialize_async_header_common(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_common()
98 *dst_id = async_header_get_destination(header); in deserialize_async_header_common()
99 *tlabel = async_header_get_tlabel(header); in deserialize_async_header_common()
100 *retry = async_header_get_retry(header); in deserialize_async_header_common()
101 *tcode = async_header_get_tcode(header); in deserialize_async_header_common()
102 *priority = async_header_get_priority(header); in deserialize_async_header_common()
103 *src_id = async_header_get_source(header); in deserialize_async_header_common()
106 static void deserialize_async_header_request(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_request()
112 deserialize_async_header_common(header, dst_id, tlabel, retry, tcode, priority, src_id); in deserialize_async_header_request()
113 *offset = async_header_get_offset(header); in deserialize_async_header_request()
116 static void deserialize_async_header_quadlet_request(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_quadlet_request()
122 deserialize_async_header_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in deserialize_async_header_quadlet_request()
126 static void deserialize_async_header_block_request(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_block_request()
134 deserialize_async_header_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in deserialize_async_header_block_request()
136 *data_length = async_header_get_data_length(header); in deserialize_async_header_block_request()
137 *extended_tcode = async_header_get_extended_tcode(header); in deserialize_async_header_block_request()
140 static void deserialize_async_header_response(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_response()
146 deserialize_async_header_common(header, dst_id, tlabel, retry, tcode, priority, src_id); in deserialize_async_header_response()
147 *rcode = async_header_get_rcode(header); in deserialize_async_header_response()
150 static void deserialize_async_header_quadlet_response(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_quadlet_response()
156 deserialize_async_header_response(header, dst_id, tlabel, retry, tcode, priority, src_id, rcode); in deserialize_async_header_quadlet_response()
159 static void deserialize_async_header_block_response(const u32 header[ASYNC_HEADER_QUADLET_COUNT], in deserialize_async_header_block_response()
166 deserialize_async_header_response(header, dst_id, tlabel, retry, tcode, priority, src_id, rcode); in deserialize_async_header_block_response()
167 *data_length = async_header_get_data_length(header); in deserialize_async_header_block_response()
168 *extended_tcode = async_header_get_extended_tcode(header); in deserialize_async_header_block_response()
171 static void serialize_isoc_header(u32 *header, unsigned int data_length, unsigned int tag, in serialize_isoc_header() argument
174 isoc_header_set_data_length(header, data_length); in serialize_isoc_header()
175 isoc_header_set_tag(header, tag); in serialize_isoc_header()
176 isoc_header_set_channel(header, channel); in serialize_isoc_header()
177 isoc_header_set_tcode(header, tcode); in serialize_isoc_header()
178 isoc_header_set_sy(header, sy); in serialize_isoc_header()
181 static void deserialize_isoc_header(u32 header, unsigned int *data_length, unsigned int *tag, in deserialize_isoc_header() argument
184 *data_length = isoc_header_get_data_length(header); in deserialize_isoc_header()
185 *tag = isoc_header_get_tag(header); in deserialize_isoc_header()
186 *channel = isoc_header_get_channel(header); in deserialize_isoc_header()
187 *tcode = isoc_header_get_tcode(header); in deserialize_isoc_header()
188 *sy = isoc_header_get_sy(header); in deserialize_isoc_header()
282 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_write_quadlet_request() local
306 serialize_async_header_quadlet_request(header, dst_id, tlabel, retry, tcode, priority, in test_async_header_write_quadlet_request()
308 async_header_set_quadlet_data(header, quadlet_data); in test_async_header_write_quadlet_request()
310 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_write_quadlet_request()
321 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_write_block_request() local
347 serialize_async_header_block_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in test_async_header_write_block_request()
350 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_write_block_request()
361 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_write_response() local
382 serialize_async_header_quadlet_response(header, dst_id, tlabel, retry, tcode, priority, in test_async_header_write_response()
385 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected) - sizeof(expected[0])); in test_async_header_write_response()
396 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_read_quadlet_request() local
417 serialize_async_header_quadlet_request(header, dst_id, tlabel, retry, tcode, priority, in test_async_header_read_quadlet_request()
420 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_read_quadlet_request()
431 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_read_quadlet_response() local
455 serialize_async_header_quadlet_response(header, dst_id, tlabel, retry, tcode, priority, in test_async_header_read_quadlet_response()
457 async_header_set_quadlet_data(header, quadlet_data); in test_async_header_read_quadlet_response()
459 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_read_quadlet_response()
470 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_read_block_request() local
496 serialize_async_header_block_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in test_async_header_read_block_request()
499 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_read_block_request()
510 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_read_block_response() local
536 serialize_async_header_block_response(header, dst_id, tlabel, retry, tcode, priority, in test_async_header_read_block_response()
539 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_read_block_response()
550 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_lock_request() local
576 serialize_async_header_block_request(header, dst_id, tlabel, retry, tcode, priority, src_id, in test_async_header_lock_request()
579 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_lock_request()
590 u32 header[ASYNC_HEADER_QUADLET_COUNT] = {0, 0, 0, 0}; in test_async_header_lock_response() local
616 serialize_async_header_block_response(header, dst_id, tlabel, retry, tcode, priority, in test_async_header_lock_response()
619 KUNIT_EXPECT_MEMEQ(test, header, expected, sizeof(expected)); in test_async_header_lock_response()
625 u32 header = 0; in test_isoc_header() local
641 serialize_isoc_header(&header, data_length, tag, channel, tcode, sy); in test_isoc_header()
643 KUNIT_EXPECT_EQ(test, header, expected); in test_isoc_header()