Home
last modified time | relevance | path

Searched refs:packet (Results 1 – 25 of 207) sorted by relevance

123456789

/Zephyr-latest/samples/drivers/peci/src/
Dmain.c38 struct peci_msg packet; in peci_ping() local
42 packet.addr = PECI_HOST_ADDR; in peci_ping()
43 packet.cmd_code = PECI_CMD_PING; in peci_ping()
44 packet.tx_buffer.buf = NULL; in peci_ping()
45 packet.tx_buffer.len = PECI_PING_WR_LEN; in peci_ping()
46 packet.rx_buffer.buf = NULL; in peci_ping()
47 packet.rx_buffer.len = PECI_PING_RD_LEN; in peci_ping()
49 ret = peci_transfer(peci_dev, &packet); in peci_ping()
63 struct peci_msg packet; in peci_get_tjmax() local
72 packet.tx_buffer.buf = peci_req_buf; in peci_get_tjmax()
[all …]
/Zephyr-latest/subsys/net/lib/mqtt/
Dmqtt.c76 struct buf_ctx packet; in client_connect() local
83 tx_buf_init(client, &packet); in client_connect()
86 err_code = connect_request_encode(client, &packet); in client_connect()
92 err_code = mqtt_transport_write(client, packet.cur, in client_connect()
93 packet.end - packet.cur); in client_connect()
243 struct buf_ctx packet; in mqtt_publish() local
257 tx_buf_init(client, &packet); in mqtt_publish()
264 err_code = publish_encode(param, &packet); in mqtt_publish()
269 io_vector[0].iov_base = packet.cur; in mqtt_publish()
270 io_vector[0].iov_len = packet.end - packet.cur; in mqtt_publish()
[all …]
/Zephyr-latest/tests/kernel/fifo/fifo_timeout/src/
Dmain.c90 void *packet = k_fifo_get(&scratch_fifo_packets_fifo, K_NO_WAIT); in get_scratch_packet() local
92 zassert_true(packet != NULL); in get_scratch_packet()
93 return packet; in get_scratch_packet()
96 static void put_scratch_packet(void *packet) in put_scratch_packet() argument
98 k_fifo_put(&scratch_fifo_packets_fifo, packet); in put_scratch_packet()
126 void *packet; in test_thread_pend_and_timeout() local
131 packet = k_fifo_get(d->fifo, K_MSEC(d->timeout)); in test_thread_pend_and_timeout()
132 zassert_true(packet == NULL); in test_thread_pend_and_timeout()
203 void *packet; in test_thread_pend_and_get_data() local
205 packet = k_fifo_get(d->fifo, K_MSEC(d->timeout)); in test_thread_pend_and_get_data()
[all …]
/Zephyr-latest/doc/kernel/data_structures/
Dmpsc_pbuf.rst12 producer fills the data and commits it. Consuming a packet is also performed in
13 two steps: consumer claims the packet, gets pointer to it and length and later
14 on packet is freed. This approach reduces memory copying.
18 * Allocate, commit scheme used for packet producing.
19 * Claim, free scheme used for packet consuming.
24 be allocated. For each dropped packet user callback is called.
33 Each packet in the buffer contains ``MPSC_PBUF`` specific header which is used
39 * valid - bit set to one when packet contains valid user packet
40 * busy - bit set when packet is being consumed (claimed but not free)
49 | 1 | 0 | valid packet |
[all …]
/Zephyr-latest/tests/kernel/lifo/lifo_usage/src/
Dmain.c81 void *packet = k_lifo_get(&scratch_lifo_packets_lifo, K_NO_WAIT); in get_scratch_packet() local
83 zassert_true(packet != NULL); in get_scratch_packet()
84 return packet; in get_scratch_packet()
87 static void put_scratch_packet(void *packet) in put_scratch_packet() argument
89 k_lifo_put(&scratch_lifo_packets_lifo, packet); in put_scratch_packet()
270 void *packet; in ZTEST() local
278 packet = k_lifo_get(&lifo_timeout[0], K_MSEC(timeout)); in ZTEST()
280 zassert_is_null(packet); in ZTEST()
285 packet = k_lifo_get(&lifo_timeout[0], K_NO_WAIT); in ZTEST()
286 zassert_is_null(packet); in ZTEST()
[all …]
/Zephyr-latest/tests/lib/mpsc_pbuf/src/
Dconcurrent.c115 static void test_fail(int line, struct test_packet *packet) in test_fail() argument
119 test_failed_cnt = packet->data; in test_fail()
120 test_failed_ctx = packet->ctx; in test_fail()
125 static void consume_check(struct test_packet *packet) in consume_check() argument
127 bool res = track_consume(packet->ctx, packet->data); in consume_check()
130 test_fail(__LINE__, packet); in consume_check()
134 for (int i = 0; i < packet->len - 1; i++) { in consume_check()
135 if (packet->buf[i] != packet->data + i) { in consume_check()
136 test_fail(__LINE__, packet); in consume_check()
143 struct test_packet *packet = (struct test_packet *)item; in drop() local
[all …]
Dmain.c61 struct test_data_var *packet = (struct test_data_var *)item; in drop() local
64 zassert_equal(packet->hdr.len, exp_dropped_len[drop_cnt], in drop()
66 drop_cnt, packet->hdr.len, exp_dropped_len[drop_cnt]); in drop()
67 zassert_equal(packet->hdr.data, exp_dropped_data[drop_cnt], in drop()
69 drop_cnt, packet->hdr.data, exp_dropped_data[drop_cnt]); in drop()
71 int err = memcmp(packet->data, &exp_dropped_data[drop_cnt], in drop()
524 struct test_data_var *packet; in item_alloc_commit() local
529 packet = (struct test_data_var *)mpsc_pbuf_alloc(&buffer, len, in item_alloc_commit()
531 packet->hdr.len = len; in item_alloc_commit()
533 packet->data[j] = i + j; in item_alloc_commit()
[all …]
/Zephyr-latest/samples/net/sockets/packet/
DREADME.rst1 .. zephyr:code-sample:: packet-socket
5 Use raw packet sockets over Ethernet.
10 This sample is a simple packet socket application showing usage
11 of packet sockets over Ethernet. The sample prints every packet
12 received, and sends a dummy packet every 5 seconds.
19 When the application is run, it opens a packet socket and prints
20 the length of the packet it receives. After that it sends a dummy
21 packet every 5 seconds. You can use Wireshark to observe these
/Zephyr-latest/subsys/net/pkt_filter/
DKconfig8 bool "Network packet filtering"
11 to construct custom rules for accepting and/or denying packet
17 bool "Additional network packet filtering hook inside IPv4 stack"
21 rules on the IP packet.
24 bool "Additional network packet filtering hook inside IPv6 stack"
28 rules on the IP packet.
31 bool "Additional network packet filtering hook for connection input"
39 module-str = Log level for packet filtering
40 module-help = Enables packet filter output debug messages
/Zephyr-latest/tests/subsys/logging/log_frontend_stmesp_demux/src/
Dmain.c40 union log_frontend_stmesp_demux_packet packet = log_frontend_stmesp_demux_claim(); in claim_packet() local
42 if (packet.generic == NULL) { in claim_packet()
47 zassert_equal(packet.generic_packet->type, LOG_FRONTEND_STMESP_DEMUX_TYPE_LOG); in claim_packet()
48 zassert_equal(exp_ts, packet.log->timestamp, "%d: Unexpected ts %llu/%x (exp:%llu/%x)", in claim_packet()
49 line, packet.log->timestamp, packet.log->timestamp, exp_ts, exp_ts); in claim_packet()
50 zassert_equal(exp_m_idx, ids[packet.log->hdr.major], "%d: Unexpected major:%d (exp:%d)", in claim_packet()
51 line, packet.log->hdr.major, exp_m_idx); in claim_packet()
52 zassert_equal(exp_len, packet.log->hdr.total_len, "%d: Unexpected len:%d (exp:%d)", line, in claim_packet()
53 packet.log->hdr.total_len, exp_len); in claim_packet()
55 zassert_equal(packet.log->data[i], i + exp_id, in claim_packet()
[all …]
/Zephyr-latest/drivers/flash/
Dflash_mspi_emul_device.c47 struct mspi_xfer_packet packet; member
119 const struct mspi_xfer_packet *packet = &packets[count]; in emul_mspi_device_transceive() local
121 if (packet->address > cfg->size || in emul_mspi_device_transceive()
122 packet->address + packet->num_bytes > cfg->size) { in emul_mspi_device_transceive()
126 if (packet->dir == MSPI_RX) { in emul_mspi_device_transceive()
127 memcpy(packet->data_buf, data->mem + packet->address, in emul_mspi_device_transceive()
128 packet->num_bytes); in emul_mspi_device_transceive()
129 } else if (packet->dir == MSPI_TX) { in emul_mspi_device_transceive()
130 memcpy(data->mem + packet->address, packet->data_buf, in emul_mspi_device_transceive()
131 packet->num_bytes); in emul_mspi_device_transceive()
[all …]
Dflash_mspi_atxp032.c71 struct mspi_xfer_packet packet; member
118 data->packet.dir = MSPI_TX; in flash_mspi_atxp032_command_write()
119 data->packet.cmd = cmd; in flash_mspi_atxp032_command_write()
120 data->packet.address = addr; in flash_mspi_atxp032_command_write()
121 data->packet.data_buf = wdata; in flash_mspi_atxp032_command_write()
122 data->packet.num_bytes = length; in flash_mspi_atxp032_command_write()
130 data->trans.packets = &data->packet; in flash_mspi_atxp032_command_write()
150 data->packet.dir = MSPI_RX; in flash_mspi_atxp032_command_read()
151 data->packet.cmd = cmd; in flash_mspi_atxp032_command_read()
152 data->packet.address = addr; in flash_mspi_atxp032_command_read()
[all …]
/Zephyr-latest/subsys/logging/frontends/
Dlog_frontend_stmesp_demux.c42 struct log_frontend_stmesp_demux_log *packet; member
91 const union mpsc_pbuf_generic *packet) in notify_drop() argument
135 static uint32_t get_wlen(const union mpsc_pbuf_generic *packet) in get_wlen() argument
137 union log_frontend_stmesp_demux_packet p = {.rgeneric = packet}; in get_wlen()
264 struct log_frontend_stmesp_demux_trace_point packet = { in store_turbo_log0() local
274 static const size_t wlen = sizeof(packet) / sizeof(uint32_t); in store_turbo_log0()
276 mpsc_pbuf_put_data(&demux.pbuf, (const uint32_t *)&packet, wlen); in store_turbo_log0()
281 struct log_frontend_stmesp_demux_trace_point packet = { in store_turbo_log1() local
291 static const size_t wlen = sizeof(packet) / sizeof(uint32_t); in store_turbo_log1()
293 mpsc_pbuf_put_data(&demux.pbuf, (const uint32_t *)&packet, wlen); in store_turbo_log1()
[all …]
/Zephyr-latest/doc/connectivity/networking/
Dnet_pkt_processing_stats.rst10 This page describes how to get information about network packet processing
13 Network stack contains infrastructure to figure out how long the network packet
18 network packet statistics is collected. For RX, only UDP, TCP or raw packet
19 type network packet statistics is collected.
33 The TX time tells how long it took for network packet from its creation to
42 information for TX or RX network packets are collected when the network packet
54 took for a network packet to go from previous state to next.
61 packet creation to this state, is **22** microseconds in this example.
62 * The correct TX thread is invoked, and the packet is read from the transmit
64 * The network packet was just sent and the network stack is about to free the
[all …]
Dnet-stack-architecture.rst88 1. A network data packet is received by a device driver.
91 data. The network packet is placed in the proper RX queue (implemented by
100 3. The network packet is then passed to the correct L2 driver. The L2 driver
101 can check if the packet is proper and modify it if needed, e.g. strip L2
104 4. The packet is processed by a network interface. The network statistics are
107 5. The packet is then passed to L3 processing. If the packet is IP based,
108 then the L3 layer checks if the packet is a proper IPv6 or IPv4 packet.
110 6. A socket handler then finds an active socket to which the network packet
140 4. An IP header is added to the network packet for a UDP or TCP packet.
143 for the network packet, and also will make sure that the network interface
[all …]
/Zephyr-latest/drivers/misc/coresight/
Dnrf_etr.c180 static void log_message_process(struct log_frontend_stmesp_demux_log *packet) in log_message_process() argument
184 uint64_t ts = packet->timestamp; in log_message_process()
185 uint8_t level = packet->hdr.level; in log_message_process()
186 uint16_t plen = packet->hdr.package_len; in log_message_process()
187 const char *dname = stm_m_name[packet->hdr.major]; in log_message_process()
188 const uint8_t *package = packet->data; in log_message_process()
189 const char *sname = &packet->data[plen]; in log_message_process()
191 uint16_t dlen = packet->hdr.total_len - (plen + sname_len); in log_message_process()
192 uint8_t *data = dlen ? &packet->data[plen + sname_len] : NULL; in log_message_process()
198 static void trace_point_process(struct log_frontend_stmesp_demux_trace_point *packet) in trace_point_process() argument
[all …]
/Zephyr-latest/include/zephyr/sys/
Dmpsc_pbuf.h78 typedef uint32_t (*mpsc_pbuf_get_wlen)(const union mpsc_pbuf_generic *packet);
87 const union mpsc_pbuf_generic *packet);
181 union mpsc_pbuf_generic *packet);
241 const union mpsc_pbuf_generic *packet);
/Zephyr-latest/samples/net/sockets/packet/src/
Dpacket.c89 static int recv_packet_socket(struct packet_data *packet) in recv_packet_socket() argument
102 received = recv(packet->recv_sock, packet->recv_buffer, in recv_packet_socket()
103 sizeof(packet->recv_buffer), 0); in recv_packet_socket()
151 static int send_packet_socket(struct packet_data *packet) in send_packet_socket() argument
182 ret = sendto(packet->send_sock, lorem_ipsum, send, 0, in send_packet_socket()
200 ret = recv(packet->send_sock, recv_buffer, in send_packet_socket()
/Zephyr-latest/drivers/ethernet/
DKconfig.enc424j60018 int "Stack size for internal incoming packet handler"
22 incoming packet processing.
25 int "Priority for internal incoming packet handler"
29 packet processing.
DKconfig.lan925019 int "Stack size for internal incoming packet handler"
23 incoming packet processing.
26 int "Priority for internal incoming packet handler"
30 packet processing.
DKconfig.w550017 int "Stack size for internal incoming packet handler"
22 incoming packet processing.
25 int "Priority for internal incoming packet handler"
30 packet processing.
/Zephyr-latest/subsys/dap/
DKconfig14 int "Maximum packet buffers for request and response data."
18 Maximum packet buffers for request and response data.
21 int "Maximum packet size for request and response data."
25 Maximum packet size for request and response data.
/Zephyr-latest/samples/bluetooth/iso_receive/
DKconfig9 int "Interval between each packet report"
13 Only print the packet report once in a given interval of ISO packets.
18 Align interval-counter with packet number from incoming ISO packets.
/Zephyr-latest/lib/os/
DKconfig32 bool "Multi producer, single consumer packet buffer"
35 Enable usage of mpsc packet buffer. Packet buffer is capable of
40 bool "Single producer, single consumer packet buffer"
42 Enable usage of spsc packet buffer. Packet buffer is capable of
64 be used only if all packet buffer instances are used for data sharing
87 If a packet buffer is used for data sharing between two cores then
98 determine the size of the packet buffer.
104 bool "Clear allocated packet"
106 When enabled packet space is zeroed before returning from allocation.
/Zephyr-latest/drivers/memc/
Dmemc_mspi_aps6404l.c63 struct mspi_xfer_packet packet; member
76 data->packet.dir = MSPI_TX; in memc_mspi_aps6404l_command_write()
77 data->packet.cmd = cmd; in memc_mspi_aps6404l_command_write()
78 data->packet.address = addr; in memc_mspi_aps6404l_command_write()
79 data->packet.data_buf = buffer; in memc_mspi_aps6404l_command_write()
80 data->packet.num_bytes = length; in memc_mspi_aps6404l_command_write()
88 data->trans.packets = &data->packet; in memc_mspi_aps6404l_command_write()
113 data->packet.dir = MSPI_RX; in memc_mspi_aps6404l_command_read()
114 data->packet.cmd = cmd; in memc_mspi_aps6404l_command_read()
115 data->packet.address = addr; in memc_mspi_aps6404l_command_read()
[all …]

123456789