net: net_pkt: Simplify net_pkt_compact() API
Since db11fcd174 [net/net_pkt: Fully
separate struct net_pkt from struct net_buf], net_pkt_compact() can not
fail anymore.
This commit acknowledges this and simplifies the API accordingly.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This commit is contained in:
parent
79f864028d
commit
b11ba9ddc8
2 changed files with 2 additions and 6 deletions
|
|
@ -1555,10 +1555,8 @@ void net_pkt_frag_insert(struct net_pkt *pkt, struct net_buf *frag);
|
||||||
*
|
*
|
||||||
* @details After this there is no more any free space in individual fragments.
|
* @details After this there is no more any free space in individual fragments.
|
||||||
* @param pkt Network packet.
|
* @param pkt Network packet.
|
||||||
*
|
|
||||||
* @return True if compact success, False otherwise.
|
|
||||||
*/
|
*/
|
||||||
bool net_pkt_compact(struct net_pkt *pkt);
|
void net_pkt_compact(struct net_pkt *pkt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get information about predefined RX, TX and DATA pools.
|
* @brief Get information about predefined RX, TX and DATA pools.
|
||||||
|
|
|
||||||
|
|
@ -756,7 +756,7 @@ void net_pkt_frag_insert(struct net_pkt *pkt, struct net_buf *frag)
|
||||||
pkt->frags = frag;
|
pkt->frags = frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool net_pkt_compact(struct net_pkt *pkt)
|
void net_pkt_compact(struct net_pkt *pkt)
|
||||||
{
|
{
|
||||||
struct net_buf *frag, *prev;
|
struct net_buf *frag, *prev;
|
||||||
|
|
||||||
|
|
@ -812,8 +812,6 @@ bool net_pkt_compact(struct net_pkt *pkt)
|
||||||
prev = frag;
|
prev = frag;
|
||||||
frag = frag->frags;
|
frag = frag->frags;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void net_pkt_get_info(struct k_mem_slab **rx,
|
void net_pkt_get_info(struct k_mem_slab **rx,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue