net: buf: POOL_FIXED_DEFINE explicit user data

Update the macro prototype to explicitly require the length of the
desired user data. Update all in-tree usage of this macro.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2021-11-21 12:23:19 +10:00 committed by Johan Hedberg
parent d17e0439c2
commit df327eeb58
28 changed files with 60 additions and 60 deletions

View file

@ -1133,24 +1133,24 @@ extern const struct net_buf_data_cb net_buf_fixed_cb;
* @param _name Name of the pool variable.
* @param _count Number of buffers in the pool.
* @param _data_size Maximum data payload per buffer.
* @param _ud_size User data space to reserve per buffer.
* @param _destroy Optional destroy callback when buffer is freed.
*/
#define NET_BUF_POOL_FIXED_DEFINE(_name, _count, _data_size, _destroy) \
_NET_BUF_ARRAY_DEFINE(_name, _count, CONFIG_NET_BUF_USER_DATA_SIZE); \
static uint8_t __noinit net_buf_data_##_name[_count][_data_size]; \
static const struct net_buf_pool_fixed net_buf_fixed_##_name = { \
.data_size = _data_size, \
.data_pool = (uint8_t *)net_buf_data_##_name, \
}; \
static const struct net_buf_data_alloc net_buf_fixed_alloc_##_name = {\
.cb = &net_buf_fixed_cb, \
.alloc_data = (void *)&net_buf_fixed_##_name, \
}; \
static struct net_buf_pool _name __net_buf_align \
__in_section(_net_buf_pool, static, _name) = \
NET_BUF_POOL_INITIALIZER(_name, &net_buf_fixed_alloc_##_name, \
_net_buf_##_name, _count, \
CONFIG_NET_BUF_USER_DATA_SIZE, \
#define NET_BUF_POOL_FIXED_DEFINE(_name, _count, _data_size, _ud_size, _destroy) \
_NET_BUF_ARRAY_DEFINE(_name, _count, _ud_size); \
static uint8_t __noinit net_buf_data_##_name[_count][_data_size]; \
static const struct net_buf_pool_fixed net_buf_fixed_##_name = { \
.data_size = _data_size, \
.data_pool = (uint8_t *)net_buf_data_##_name, \
}; \
static const struct net_buf_data_alloc net_buf_fixed_alloc_##_name = { \
.cb = &net_buf_fixed_cb, \
.alloc_data = (void *)&net_buf_fixed_##_name, \
}; \
static struct net_buf_pool _name __net_buf_align \
__in_section(_net_buf_pool, static, _name) = \
NET_BUF_POOL_INITIALIZER(_name, &net_buf_fixed_alloc_##_name, \
_net_buf_##_name, _count, _ud_size, \
_destroy)
/** @cond INTERNAL_HIDDEN */
@ -1217,7 +1217,7 @@ extern const struct net_buf_data_cb net_buf_var_cb;
*/
#define NET_BUF_POOL_DEFINE(_name, _count, _size, _ud_size, _destroy) \
BUILD_ASSERT(_ud_size <= CONFIG_NET_BUF_USER_DATA_SIZE); \
NET_BUF_POOL_FIXED_DEFINE(_name, _count, _size, _destroy)
NET_BUF_POOL_FIXED_DEFINE(_name, _count, _size, _ud_size, _destroy)
/**
* @brief Looks up a pool based on its ID.

View file

@ -23,7 +23,7 @@ static void start_scan(void);
static struct bt_conn *default_conn;
static struct k_work_delayable iso_send_work;
static struct bt_iso_chan iso_chan;
NET_BUF_POOL_FIXED_DEFINE(tx_pool, 1, BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
NET_BUF_POOL_FIXED_DEFINE(tx_pool, 1, BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8,
NULL);
/**

View file

@ -12,7 +12,7 @@
#define BIS_ISO_CHAN_COUNT 1
NET_BUF_POOL_FIXED_DEFINE(bis_tx_pool, BIS_ISO_CHAN_COUNT,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), NULL);
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
static K_SEM_DEFINE(sem_big_cmplt, 0, 1);
static K_SEM_DEFINE(sem_big_term, 0, 1);

View file

@ -24,7 +24,7 @@ LOG_MODULE_REGISTER(iso_broadcast_broadcaster, LOG_LEVEL_DBG);
#define DEFAULT_BIS_COUNT CONFIG_BT_ISO_MAX_CHAN
NET_BUF_POOL_FIXED_DEFINE(bis_tx_pool, CONFIG_BT_ISO_TX_BUF_COUNT,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), NULL);
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
static K_SEM_DEFINE(sem_big_complete, 0, 1);
static K_SEM_DEFINE(sem_big_term, 0, 1);

View file

@ -59,7 +59,7 @@ static uint32_t iso_send_count;
static struct bt_iso_cig *cig;
NET_BUF_POOL_FIXED_DEFINE(tx_pool, 1, BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
NULL);
8, NULL);
static uint8_t iso_data[CONFIG_BT_ISO_TX_MTU];
static K_SEM_DEFINE(sem_adv, 0, 1);

View file

@ -34,7 +34,7 @@
#define OTS_CLIENT_INST_COUNT 1
NET_BUF_POOL_FIXED_DEFINE(ots_c_read_queue, 1,
sizeof(struct bt_gatt_read_params), NULL);
sizeof(struct bt_gatt_read_params), 8, NULL);
#define OTS_WORK(_w) CONTAINER_OF(_w, struct otc_instance_t, work)
@ -49,7 +49,7 @@ static void l2cap_disconnected(struct bt_l2cap_chan *chan);
#define CREDITS 10
#define DATA_MTU (BT_OTC_MAX_WRITE_SIZE * CREDITS)
NET_BUF_POOL_FIXED_DEFINE(otc_l2cap_pool, 1, DATA_MTU, NULL);
NET_BUF_POOL_FIXED_DEFINE(otc_l2cap_pool, 1, DATA_MTU, 8, NULL);
struct l2ch {
struct k_delayed_work recv_work;

View file

@ -35,12 +35,12 @@
* Having a dedicated pool for it ensures that exhaustion of the RX pool
* cannot block the delivery of this priority event.
*/
NET_BUF_POOL_FIXED_DEFINE(num_complete_pool, 1, NUM_COMLETE_EVENT_SIZE, NULL);
NET_BUF_POOL_FIXED_DEFINE(num_complete_pool, 1, NUM_COMLETE_EVENT_SIZE, 8, NULL);
#endif /* CONFIG_BT_CONN || CONFIG_BT_ISO */
#if defined(CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT)
NET_BUF_POOL_FIXED_DEFINE(discardable_pool, CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT,
BT_BUF_EVT_SIZE(CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE),
BT_BUF_EVT_SIZE(CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE), 8,
NULL);
#endif /* CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT */
@ -50,12 +50,12 @@ NET_BUF_POOL_DEFINE(acl_in_pool, CONFIG_BT_BUF_ACL_RX_COUNT,
sizeof(struct acl_data), bt_hci_host_num_completed_packets);
NET_BUF_POOL_FIXED_DEFINE(evt_pool, CONFIG_BT_BUF_EVT_RX_COUNT,
BT_BUF_EVT_RX_SIZE,
BT_BUF_EVT_RX_SIZE, 8,
NULL);
#else
#define BT_BUF_RX_COUNT MAX(CONFIG_BT_BUF_EVT_RX_COUNT, CONFIG_BT_BUF_ACL_RX_COUNT)
NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, BT_BUF_RX_COUNT,
BT_BUF_RX_SIZE,
BT_BUF_RX_SIZE, 8,
NULL);
#endif /* CONFIG_BT_HCI_ACL_FLOW_CONTROL */

View file

@ -68,7 +68,7 @@ NET_BUF_POOL_DEFINE(acl_tx_pool, CONFIG_BT_L2CAP_TX_BUF_COUNT,
* another buffer from the acl_tx_pool would result in a deadlock.
*/
NET_BUF_POOL_FIXED_DEFINE(frag_pool, CONFIG_BT_L2CAP_TX_FRAG_COUNT,
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE), NULL);
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE), 8, NULL);
#endif /* CONFIG_BT_L2CAP_TX_FRAG_COUNT > 0 */

View file

@ -128,7 +128,7 @@ void bt_hci_cmd_state_set_init(struct net_buf *buf,
*/
#define CMD_BUF_SIZE MAX(BT_BUF_EVT_RX_SIZE, BT_BUF_CMD_TX_SIZE)
NET_BUF_POOL_FIXED_DEFINE(hci_cmd_pool, CONFIG_BT_BUF_CMD_TX_COUNT,
CMD_BUF_SIZE, NULL);
CMD_BUF_SIZE, 8, NULL);
struct event_handler {
uint8_t event;

View file

@ -40,14 +40,14 @@ static uint8_t raw_mode;
#define BT_BUF_RX_COUNT MAX(CONFIG_BT_BUF_EVT_RX_COUNT, CONFIG_BT_BUF_ACL_RX_COUNT)
NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, BT_BUF_RX_COUNT,
BT_BUF_RX_SIZE, NULL);
BT_BUF_RX_SIZE, 8, NULL);
NET_BUF_POOL_FIXED_DEFINE(hci_cmd_pool, CONFIG_BT_BUF_CMD_TX_COUNT,
BT_BUF_CMD_SIZE(CONFIG_BT_BUF_CMD_TX_SIZE), NULL);
BT_BUF_CMD_SIZE(CONFIG_BT_BUF_CMD_TX_SIZE), 8, NULL);
NET_BUF_POOL_FIXED_DEFINE(hci_acl_pool, CONFIG_BT_BUF_ACL_TX_COUNT,
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE), NULL);
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE), 8, NULL);
#if defined(CONFIG_BT_ISO)
NET_BUF_POOL_FIXED_DEFINE(hci_iso_pool, CONFIG_BT_ISO_TX_BUF_COUNT,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), NULL);
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
#endif /* CONFIG_BT_ISO */
struct bt_dev_raw bt_dev;

View file

@ -33,7 +33,7 @@
struct bt_hfp_hf_cb *bt_hf;
NET_BUF_POOL_FIXED_DEFINE(hf_pool, CONFIG_BT_MAX_CONN + 1,
BT_RFCOMM_BUF_SIZE(BT_HF_CLIENT_MAX_PDU), NULL);
BT_RFCOMM_BUF_SIZE(BT_HF_CLIENT_MAX_PDU), 8, NULL);
static struct bt_hfp_hf bt_hfp_hf_pool[CONFIG_BT_MAX_CONN];

View file

@ -28,7 +28,7 @@
#if defined(CONFIG_BT_ISO_UNICAST) || defined(CONFIG_BT_ISO_SYNC_RECEIVER)
NET_BUF_POOL_FIXED_DEFINE(iso_rx_pool, CONFIG_BT_ISO_RX_BUF_COUNT,
CONFIG_BT_ISO_RX_MTU, NULL);
CONFIG_BT_ISO_RX_MTU, 8, NULL);
static struct bt_iso_recv_info iso_info_data[CONFIG_BT_ISO_RX_BUF_COUNT];
#define iso_info(buf) (&iso_info_data[net_buf_id(buf)])
@ -36,11 +36,11 @@ static struct bt_iso_recv_info iso_info_data[CONFIG_BT_ISO_RX_BUF_COUNT];
#if defined(CONFIG_BT_ISO_UNICAST) || defined(CONFIG_BT_ISO_BROADCAST)
NET_BUF_POOL_FIXED_DEFINE(iso_tx_pool, CONFIG_BT_ISO_TX_BUF_COUNT,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), NULL);
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
#if CONFIG_BT_ISO_TX_FRAG_COUNT > 0
NET_BUF_POOL_FIXED_DEFINE(iso_frag_pool, CONFIG_BT_ISO_TX_FRAG_COUNT,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), NULL);
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
#endif /* CONFIG_BT_ISO_TX_FRAG_COUNT > 0 */
#endif /* CONFIG_BT_ISO_UNICAST || CONFIG_BT_ISO_BROADCAST */

View file

@ -59,7 +59,7 @@ NET_BUF_POOL_FIXED_DEFINE(disc_pool, 1,
BT_L2CAP_BUF_SIZE(
sizeof(struct bt_l2cap_sig_hdr) +
sizeof(struct bt_l2cap_disconn_req)),
NULL);
8, NULL);
#define L2CAP_ECRED_CHAN_MAX 5

View file

@ -77,7 +77,7 @@ static sys_slist_t br_servers;
/* Pool for outgoing BR/EDR signaling packets, min MTU is 48 */
NET_BUF_POOL_FIXED_DEFINE(br_sig_pool, CONFIG_BT_MAX_CONN,
BT_L2CAP_BUF_SIZE(L2CAP_BR_MIN_MTU), NULL);
BT_L2CAP_BUF_SIZE(L2CAP_BR_MIN_MTU), 8, NULL);
/* BR/EDR L2CAP signalling channel specific context */
struct bt_l2cap_br {

View file

@ -70,7 +70,7 @@ static struct bt_sdp bt_sdp_pool[CONFIG_BT_MAX_CONN];
/* Pool for outgoing SDP packets */
NET_BUF_POOL_FIXED_DEFINE(sdp_pool, CONFIG_BT_MAX_CONN,
BT_L2CAP_BUF_SIZE(SDP_MTU), NULL);
BT_L2CAP_BUF_SIZE(SDP_MTU), 8, NULL);
#define SDP_CLIENT_CHAN(_ch) CONTAINER_OF(_ch, struct bt_sdp_client, chan.chan)

View file

@ -50,7 +50,7 @@ struct friend_pdu_info {
};
NET_BUF_POOL_FIXED_DEFINE(friend_buf_pool, FRIEND_BUF_COUNT,
BT_MESH_ADV_DATA_SIZE, NULL);
BT_MESH_ADV_DATA_SIZE, 8, NULL);
static struct friend_adv {
uint16_t app_idx;

View file

@ -28,11 +28,11 @@ LOG_MODULE_DECLARE(bt_ots, CONFIG_BT_OTS_LOG_LEVEL);
NET_BUF_POOL_FIXED_DEFINE(ot_chan_tx_pool, 1,
BT_L2CAP_SDU_BUF_SIZE(CONFIG_BT_OTS_L2CAP_CHAN_TX_MTU),
BT_L2CAP_SDU_BUF_SIZE(CONFIG_BT_OTS_L2CAP_CHAN_TX_MTU), 8,
NULL);
#if (CONFIG_BT_OTS_L2CAP_CHAN_RX_MTU > BT_L2CAP_SDU_RX_MTU)
NET_BUF_POOL_FIXED_DEFINE(ot_chan_rx_pool, 1, CONFIG_BT_OTS_L2CAP_CHAN_RX_MTU,
NET_BUF_POOL_FIXED_DEFINE(ot_chan_rx_pool, 1, CONFIG_BT_OTS_L2CAP_CHAN_RX_MTU, 8,
NULL);
#endif

View file

@ -38,11 +38,11 @@ static struct bt_conn *pairing_conn;
#define DATA_BREDR_MTU 48
NET_BUF_POOL_FIXED_DEFINE(data_pool, 1, DATA_BREDR_MTU, NULL);
NET_BUF_POOL_FIXED_DEFINE(data_pool, 1, DATA_BREDR_MTU, 8, NULL);
#define SDP_CLIENT_USER_BUF_LEN 512
NET_BUF_POOL_FIXED_DEFINE(sdp_client_pool, CONFIG_BT_MAX_CONN,
SDP_CLIENT_USER_BUF_LEN, NULL);
SDP_CLIENT_USER_BUF_LEN, 8, NULL);
static int cmd_auth_pincode(const struct shell *sh,
size_t argc, char *argv[])

View file

@ -73,7 +73,7 @@ struct bt_iso_chan iso_chan = {
static struct bt_iso_cig *cig;
NET_BUF_POOL_FIXED_DEFINE(tx_pool, 1, BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
NET_BUF_POOL_FIXED_DEFINE(tx_pool, 1, BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8,
NULL);
static int iso_accept(const struct bt_iso_accept_info *info,
@ -349,7 +349,7 @@ static struct bt_iso_chan *bis_channels[BIS_ISO_CHAN_COUNT] = { &bis_iso_chan };
#if defined(CONFIG_BT_ISO_BROADCASTER)
NET_BUF_POOL_FIXED_DEFINE(bis_tx_pool, BIS_ISO_CHAN_COUNT,
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), NULL);
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
static int cmd_broadcast(const struct shell *sh, size_t argc, char *argv[])
{

View file

@ -39,8 +39,8 @@
#define L2CAP_POLICY_16BYTE_KEY 0x02
NET_BUF_POOL_FIXED_DEFINE(data_tx_pool, 1,
BT_L2CAP_SDU_BUF_SIZE(DATA_MTU), NULL);
NET_BUF_POOL_FIXED_DEFINE(data_rx_pool, 1, DATA_MTU, NULL);
BT_L2CAP_SDU_BUF_SIZE(DATA_MTU), 8, NULL);
NET_BUF_POOL_FIXED_DEFINE(data_rx_pool, 1, DATA_MTU, 8, NULL);
static uint8_t l2cap_policy;
static struct bt_conn *l2cap_allowlist[CONFIG_BT_MAX_CONN];

View file

@ -33,7 +33,7 @@
#define DATA_MTU 48
NET_BUF_POOL_FIXED_DEFINE(pool, 1, DATA_MTU, NULL);
NET_BUF_POOL_FIXED_DEFINE(pool, 1, DATA_MTU, 8, NULL);
static struct bt_sdp_attribute spp_attrs[] = {
BT_SDP_NEW_SERVICE,

View file

@ -119,9 +119,9 @@ K_MEM_SLAB_DEFINE(tx_pkts, sizeof(struct net_pkt), CONFIG_NET_PKT_TX_COUNT, 4);
#if defined(CONFIG_NET_BUF_FIXED_DATA_SIZE)
NET_BUF_POOL_FIXED_DEFINE(rx_bufs, CONFIG_NET_BUF_RX_COUNT,
CONFIG_NET_BUF_DATA_SIZE, NULL);
CONFIG_NET_BUF_DATA_SIZE, 4, NULL);
NET_BUF_POOL_FIXED_DEFINE(tx_bufs, CONFIG_NET_BUF_TX_COUNT,
CONFIG_NET_BUF_DATA_SIZE, NULL);
CONFIG_NET_BUF_DATA_SIZE, 4, NULL);
#else /* !CONFIG_NET_BUF_FIXED_DATA_SIZE */

View file

@ -42,7 +42,7 @@ NET_PKT_SLAB_DEFINE(capture_pkts, CONFIG_NET_CAPTURE_PKT_COUNT);
#if defined(CONFIG_NET_BUF_FIXED_DATA_SIZE)
NET_BUF_POOL_FIXED_DEFINE(capture_bufs, CONFIG_NET_CAPTURE_BUF_COUNT,
CONFIG_NET_BUF_DATA_SIZE, NULL);
CONFIG_NET_BUF_DATA_SIZE, 4, NULL);
#else
NET_BUF_POOL_VAR_DEFINE(capture_bufs, CONFIG_NET_CAPTURE_BUF_COUNT,
CONFIG_NET_BUF_DATA_POOL_SIZE, 4, NULL);

View file

@ -940,7 +940,7 @@ void usb_audio_register(const struct device *dev,
DUMMY_API)
#define DEFINE_BUF_POOL(name, size) \
NET_BUF_POOL_FIXED_DEFINE(name, 5, size, net_buf_destroy)
NET_BUF_POOL_FIXED_DEFINE(name, 5, size, 4, net_buf_destroy)
#define UNIDIR_DEVICE(dev, i, out_pool, in_size, it_type, ot_type, cb, addr) \
UTIL_EXPAND( \

View file

@ -153,11 +153,11 @@ static void echo(uint16_t size)
}
}
NET_BUF_POOL_FIXED_DEFINE(event_pool, 32, BT_BUF_RX_SIZE + 4, NULL);
NET_BUF_POOL_FIXED_DEFINE(event_pool, 32, BT_BUF_RX_SIZE + 4, 4, NULL);
static K_FIFO_DEFINE(event_queue);
static K_FIFO_DEFINE(rx_queue);
NET_BUF_POOL_FIXED_DEFINE(data_pool, CONFIG_BT_CTLR_RX_BUFFERS + 14,
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE) + 4, NULL);
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE) + 4, 4, NULL);
static K_FIFO_DEFINE(data_queue);
/**

View file

@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#define CHANNELS 2
#define SERVERS 1
NET_BUF_POOL_FIXED_DEFINE(data_pool, CHANNELS, DATA_BUF_SIZE, NULL);
NET_BUF_POOL_FIXED_DEFINE(data_pool, CHANNELS, DATA_BUF_SIZE, 8, NULL);
static bool authorize_flag;
static uint8_t req_keysize;

View file

@ -64,7 +64,7 @@ static void fixed_destroy(struct net_buf *buf);
static void var_destroy(struct net_buf *buf);
NET_BUF_POOL_HEAP_DEFINE(bufs_pool, 10, 0, buf_destroy);
NET_BUF_POOL_FIXED_DEFINE(fixed_pool, 10, 128, fixed_destroy);
NET_BUF_POOL_FIXED_DEFINE(fixed_pool, 10, 128, 0, fixed_destroy);
NET_BUF_POOL_VAR_DEFINE(var_pool, 10, 1024, 0, var_destroy);
static void buf_destroy(struct net_buf *buf)

View file

@ -791,7 +791,7 @@ void test_net_pkt_clone(void)
net_pkt_unref(cloned_pkt);
}
NET_BUF_POOL_FIXED_DEFINE(test_net_pkt_headroom_pool, 4, 2, NULL);
NET_BUF_POOL_FIXED_DEFINE(test_net_pkt_headroom_pool, 4, 2, 4, NULL);
void test_net_pkt_headroom(void)
{
struct net_pkt *pkt;
@ -867,7 +867,7 @@ void test_net_pkt_headroom(void)
net_pkt_unref(pkt);
}
NET_BUF_POOL_FIXED_DEFINE(test_net_pkt_headroom_copy_pool, 2, 4, NULL);
NET_BUF_POOL_FIXED_DEFINE(test_net_pkt_headroom_copy_pool, 2, 4, 4, NULL);
void test_net_pkt_headroom_copy(void)
{
struct net_pkt *pkt_src;