File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed
tests/bsim/bluetooth/host/l2cap/stress Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -46,3 +46,10 @@ CONFIG_BT_MAX_CONN=10
4646CONFIG_LOG=y
4747CONFIG_ASSERT=y
4848CONFIG_NET_BUF_POOL_USAGE=y
49+
50+ CONFIG_BT_L2CAP_LOG_LEVEL_DBG=y
51+ # CONFIG_BT_CONN_LOG_LEVEL_DBG=y
52+ CONFIG_LOG_THREAD_ID_PREFIX=y
53+ CONFIG_THREAD_NAME=y
54+
55+ CONFIG_ARCH_POSIX_TRAP_ON_FATAL=y
Original file line number Diff line number Diff line change @@ -23,20 +23,41 @@ CREATE_FLAG(flag_l2cap_connected);
2323#define NUM_SEGMENTS 10
2424#define RESCHEDULE_DELAY K_MSEC(100)
2525
26+ static void sdu_destroy (struct net_buf * buf )
27+ {
28+ LOG_DBG ("%p" , buf );
29+
30+ net_buf_destroy (buf );
31+ }
32+
33+ static void segment_destroy (struct net_buf * buf )
34+ {
35+ LOG_DBG ("%p" , buf );
36+
37+ net_buf_destroy (buf );
38+ }
39+
40+ static void rx_destroy (struct net_buf * buf )
41+ {
42+ LOG_DBG ("%p" , buf );
43+
44+ net_buf_destroy (buf );
45+ }
46+
2647/* Only one SDU per link will be transmitted at a time */
2748NET_BUF_POOL_DEFINE (sdu_tx_pool ,
2849 CONFIG_BT_MAX_CONN , BT_L2CAP_SDU_BUF_SIZE (SDU_LEN ),
29- CONFIG_BT_CONN_TX_USER_DATA_SIZE , NULL );
50+ CONFIG_BT_CONN_TX_USER_DATA_SIZE , sdu_destroy );
3051
3152NET_BUF_POOL_DEFINE (segment_pool ,
3253 /* MTU + 4 l2cap hdr + 4 ACL hdr */
3354 NUM_SEGMENTS , BT_L2CAP_BUF_SIZE (CONFIG_BT_L2CAP_TX_MTU ),
34- CONFIG_BT_CONN_TX_USER_DATA_SIZE , NULL );
55+ CONFIG_BT_CONN_TX_USER_DATA_SIZE , segment_destroy );
3556
3657/* Only one SDU per link will be received at a time */
3758NET_BUF_POOL_DEFINE (sdu_rx_pool ,
3859 CONFIG_BT_MAX_CONN , BT_L2CAP_SDU_BUF_SIZE (SDU_LEN ),
39- 8 , NULL );
60+ 8 , rx_destroy );
4061
4162static uint8_t tx_data [SDU_LEN ];
4263static uint16_t rx_cnt ;
You can’t perform that action at this time.
0 commit comments