Lines Matching +full:check +full:- +full:pr

5  * SPDX-License-Identifier: Apache-2.0
15 size_t last_offset = (slab->info.num_blocks - 1) * slab->info.block_size; in is_pkt_part_of_slab()
18 /* Check if pointer fits into slab buffer area. */ in is_pkt_part_of_slab()
19 if ((ptr < slab->buffer) || (ptr > slab->buffer + last_offset)) { in is_pkt_part_of_slab()
23 /* Check if pointer offset is correct. */ in is_pkt_part_of_slab()
24 ptr_offset = ptr - slab->buffer; in is_pkt_part_of_slab()
25 if (ptr_offset % slab->info.block_size != 0) { in is_pkt_part_of_slab()
44 if (context->tx_slab) { in check_context_pool()
46 struct k_mem_slab *slab = context->tx_slab(); in check_context_pool()
48 if (is_pkt_part_of_slab(slab, info->ptr)) { in check_context_pool()
49 info->pkt_source_found = true; in check_context_pool()
97 for (i = len - 1; i >= 0; i--) { in get_net_pkt()
98 ptr |= buf[i] << 8 * (len - 1 - i); in get_net_pkt()
106 struct net_buf *buf = pkt->buffer; in net_pkt_buffer_info()
108 PR("net_pkt %p buffer chain:\n", pkt); in net_pkt_buffer_info()
109 PR("%p[%ld]", pkt, atomic_get(&pkt->atomic_ref)); in net_pkt_buffer_info()
112 PR("->"); in net_pkt_buffer_info()
116 PR("%p[%ld/%u (%u/%u)]", buf, atomic_get(&pkt->atomic_ref), in net_pkt_buffer_info()
117 buf->len, net_buf_max_len(buf), buf->size); in net_pkt_buffer_info()
119 buf = buf->frags; in net_pkt_buffer_info()
121 PR("->"); in net_pkt_buffer_info()
125 PR("\n"); in net_pkt_buffer_info()
131 struct net_buf *buf = pkt->buffer; in net_pkt_buffer_hexdump()
134 if (!buf || buf->ref == 0) { in net_pkt_buffer_hexdump()
138 PR("net_pkt %p buffer chain hexdump:\n", pkt); in net_pkt_buffer_hexdump()
141 PR("net_buf[%d] %p\n", i++, buf); in net_pkt_buffer_hexdump()
142 shell_hexdump(sh, buf->data, buf->len); in net_pkt_buffer_hexdump()
143 buf = buf->frags; in net_pkt_buffer_hexdump()
156 return -ENOEXEC; in cmd_net_pkt()
163 return -ENOEXEC; in cmd_net_pkt()
167 PR("\n"); in cmd_net_pkt()
174 SHELL_CMD(--help, NULL,