Use TailQ in mbuf
This commit is contained in:
+2
-1
@@ -43,13 +43,14 @@ uint8_t *uc_mbuf_pull(struct MBuf *mbuf, uint32_t size)
|
||||
void uc_mbuf_init(struct MBuf *mbuf, uint8_t *buf, uint32_t len, uint32_t headroom, uint32_t flags)
|
||||
{
|
||||
mbuf->bufstart = buf;
|
||||
mbuf->next = NULL;
|
||||
mbuf->p1 = mbuf->p2 = mbuf->p3 = mbuf->p4 = NULL;
|
||||
mbuf->cookie = NULL;
|
||||
mbuf->flags = flags;
|
||||
mbuf->allocated = len + headroom;
|
||||
mbuf->head = mbuf->bufstart + headroom;
|
||||
mbuf->tail = mbuf->head;
|
||||
mbuf->entry.next = NULL;
|
||||
mbuf->entry.prev = NULL;
|
||||
}
|
||||
|
||||
struct MBuf *uc_mbuf_new_hr(uint32_t len, uint32_t headroom)
|
||||
|
||||
Reference in New Issue
Block a user