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
46
46
CONFIG_LOG=y
47
47
CONFIG_ASSERT=y
48
48
CONFIG_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);
23
23
#define NUM_SEGMENTS 10
24
24
#define RESCHEDULE_DELAY K_MSEC(100)
25
25
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
+
26
47
/* Only one SDU per link will be transmitted at a time */
27
48
NET_BUF_POOL_DEFINE (sdu_tx_pool ,
28
49
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 );
30
51
31
52
NET_BUF_POOL_DEFINE (segment_pool ,
32
53
/* MTU + 4 l2cap hdr + 4 ACL hdr */
33
54
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 );
35
56
36
57
/* Only one SDU per link will be received at a time */
37
58
NET_BUF_POOL_DEFINE (sdu_rx_pool ,
38
59
CONFIG_BT_MAX_CONN , BT_L2CAP_SDU_BUF_SIZE (SDU_LEN ),
39
- 8 , NULL );
60
+ 8 , rx_destroy );
40
61
41
62
static uint8_t tx_data [SDU_LEN ];
42
63
static uint16_t rx_cnt ;
You can’t perform that action at this time.
0 commit comments