Lines Matching refs:frag
586 void net_buf_frag_insert(struct net_buf *parent, struct net_buf *frag) in net_buf_frag_insert() argument
589 __ASSERT_NO_MSG(frag); in net_buf_frag_insert()
592 net_buf_frag_last(frag)->frags = parent->frags; in net_buf_frag_insert()
595 parent->frags = frag; in net_buf_frag_insert()
598 struct net_buf *net_buf_frag_add(struct net_buf *head, struct net_buf *frag) in net_buf_frag_add() argument
600 __ASSERT_NO_MSG(frag); in net_buf_frag_add()
603 return net_buf_ref(frag); in net_buf_frag_add()
606 net_buf_frag_insert(net_buf_frag_last(head), frag); in net_buf_frag_add()
613 struct net_buf *frag, in net_buf_frag_del_debug() argument
616 struct net_buf *net_buf_frag_del(struct net_buf *parent, struct net_buf *frag) in net_buf_frag_del_debug()
621 __ASSERT_NO_MSG(frag); in net_buf_frag_del_debug()
625 __ASSERT_NO_MSG(parent->frags == frag); in net_buf_frag_del_debug()
626 parent->frags = frag->frags; in net_buf_frag_del_debug()
629 next_frag = frag->frags; in net_buf_frag_del_debug()
631 frag->frags = NULL; in net_buf_frag_del_debug()
634 net_buf_unref_debug(frag, func, line); in net_buf_frag_del_debug()
636 net_buf_unref(frag); in net_buf_frag_del_debug()
645 const struct net_buf *frag; in net_buf_linearize() local
651 frag = src; in net_buf_linearize()
654 while (frag && offset >= frag->len) { in net_buf_linearize()
655 offset -= frag->len; in net_buf_linearize()
656 frag = frag->frags; in net_buf_linearize()
661 while (frag && len > 0) { in net_buf_linearize()
662 to_copy = MIN(len, frag->len - offset); in net_buf_linearize()
663 memcpy((uint8_t *)dst + copied, frag->data + offset, to_copy); in net_buf_linearize()
669 frag = frag->frags; in net_buf_linearize()
686 struct net_buf *frag = net_buf_frag_last(buf); in net_buf_append_bytes() local
692 uint16_t count = MIN(len, net_buf_tailroom(frag)); in net_buf_append_bytes()
694 net_buf_add_mem(frag, value8, count); in net_buf_append_bytes()
704 frag = allocate_cb(timeout, user_data); in net_buf_append_bytes()
713 frag = net_buf_alloc_len(pool, in net_buf_append_bytes()
718 if (!frag) { in net_buf_append_bytes()
722 net_buf_frag_add(buf, frag); in net_buf_append_bytes()