qcacmn: Add API qdf_nbuf_reset to reset netbuf

This API makes the reuse of sk_buff possible, by resetting
it with the reserve and align arguments passed by the caller.

This brings back the skb to the original state as
returned by qdf_nbuf_alloc without allocating the skb again.

Change-Id: Idefcbd4be9fae5d140805d55207dec01bdc90237
CRs-Fixed: 2301899
This commit is contained in:
Alok Kumar
2018-08-21 14:31:18 +05:30
committed by nshrivas
parent e03102f60d
commit d32e9abf63
2 changed files with 52 additions and 0 deletions

View File

@@ -1569,6 +1569,19 @@ static inline void qdf_nbuf_reserve(qdf_nbuf_t buf, qdf_size_t size)
__qdf_nbuf_reserve(buf, size);
}
/**
* qdf_nbuf_reset() - reset the buffer data and pointer
* @buf: Network buf instance
* @reserve: reserve
* @align: align
*
* Return: none
*/
static inline void qdf_nbuf_reset(qdf_nbuf_t buf, int reserve, int align)
{
__qdf_nbuf_reset(buf, reserve, align);
}
/**
* qdf_nbuf_peek_header() - return the data pointer & length of the header
* @buf: Network nbuf