net/bufpool: Call init automatically on alloc

Note: Initialize function of protocols (tcp, udp, pkt, etc.) are kept empty.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng
2025-01-02 12:10:09 +08:00
committed by Xiang Xiao
parent f702f1705f
commit 50b3ab7671
27 changed files with 23 additions and 272 deletions
-13
View File
@@ -162,19 +162,6 @@ EXTERN const struct sock_intf_s g_icmp_sockif;
void icmp_input(FAR struct net_driver_s *dev);
/****************************************************************************
* Name: icmp_sock_initialize
*
* Description:
* Initialize the IPPROTO_ICMP socket connection structures. Called once
* and only from the network initialization layer.
*
****************************************************************************/
#ifdef CONFIG_NET_ICMP_SOCKET
void icmp_sock_initialize(void);
#endif
/****************************************************************************
* Name: icmp_alloc
*
-14
View File
@@ -72,20 +72,6 @@ static dq_queue_t g_active_icmp_connections;
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: icmp_sock_initialize
*
* Description:
* Initialize the IPPROTO_ICMP socket connection structures. Called once
* and only from the network initialization layer.
*
****************************************************************************/
void icmp_sock_initialize(void)
{
NET_BUFPOOL_INIT(g_icmp_connections);
}
/****************************************************************************
* Name: icmp_alloc
*