Skip to contentSkip to conversation

monitor: Print unacked frame when releasing them

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Aug 14, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 monitor: Print unacked frame when releasing them

From: Luiz Augusto von Dentz <[email protected]>

This attempts to print the frame number of frames considered unacked (missing NOCP):

Quoted 1 line

HCI Event: Disconnect Complete (0x05) plen 4

        Status: Success (0x00)
        Handle: 2304 Address: XX:XX:XX:XX:XX:XX
        Reason: Connection Terminated By Local Host (0x16)
        [0]#102132 unacked
        [1]#102137 unacked
        [2]#102139 unacked
        [3]#102141 unacked
        [4]#102143 unacked
        [5]#102145 unacked
        [6]#102147 unacked
        [7]#102150 unacked
---
 monitor/packet.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
monitor/packet.c +14 -1
index d259bf9e9a25..ca7eaea21138 100644
@@ -240,6 +240,14 @@ static struct index_buf_pool *get_pool(uint16_t index, uint8_t type)
 	return NULL;
 }
 
+static void print_unacked_frame(void *data, void *user_data)
+{
+	struct packet_frame *frame = data;
+	int *i = user_data;
+
+	print_field("[%d]#%zu unacked", (*i)++, frame->num);
+}
+
 static struct packet_conn_data *release_handle(uint16_t handle)
 {
 	int i;
@@ -254,8 +262,13 @@ static struct packet_conn_data *release_handle(uint16_t handle)
 				conn->destroy(conn, conn->data);
 
 			pool = get_pool(conn->index, conn->type);
-			if (pool)
+			if (pool) {
+				int i = 0;
+
+				queue_foreach(conn->tx_q, print_unacked_frame,
+						&i);
 				pool->tx -= queue_length(conn->tx_q);
+			}
 
 			queue_destroy(conn->tx_q, free);
 			queue_destroy(conn->chan_q, free);
Signature · 1 line
2.50.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=991602

---Test result---

Test Summary:

CheckPatch                    PENDING   0.36 seconds
GitLint                       PENDING   0.37 seconds
BuildEll                      PASS      20.42 seconds
BluezMake                     PASS      2637.32 seconds
MakeCheck                     PASS      20.53 seconds
MakeDistcheck                 PASS      186.87 seconds
CheckValgrind                 PASS      236.95 seconds
CheckSmatch                   WARNING   306.24 seconds
bluezmakeextell               PASS      129.44 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      919.01 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1931:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3822:52: warning: array of flexible structuresmonitor/bt.h:3810:40: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 18 lines · On Thu, 14 Aug 2025 11:41:56 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

This attempts to print the frame number of frames considered unacked (missing NOCP):

Quoted 1 line

HCI Event: Disconnect Complete (0x05) plen 4

        Status: Success (0x00)
        Handle: 2304 Address: XX:XX:XX:XX:XX:XX
        Reason: Connection Terminated By Local Host (0x16)
        [0]#102132 unacked
        [1]#102137 unacked
        [2]#102139 unacked
        [3]#102141 unacked
        [4]#102143 unacked
        [5]#102145 unacked
        [6]#102147 unacked
        [7]#102150 unacked
Quoted 1 line

[...]

Here is the summary with links:
- [BlueZ,v1] monitor: Print unacked frame when releasing them

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ce82168f9f70

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html