public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] monitor: Print unacked frame when releasing them
@ 2025-08-14 15:41 Luiz Augusto von Dentz
  2025-08-14 17:10 ` [BlueZ,v1] " bluez.test.bot
  2025-08-14 17:20 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-14 15:41 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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

> 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(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index d259bf9e9a25..ca7eaea21138 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -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);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v1] monitor: Print unacked frame when releasing them
  2025-08-14 15:41 [PATCH BlueZ v1] monitor: Print unacked frame when releasing them Luiz Augusto von Dentz
@ 2025-08-14 17:10 ` bluez.test.bot
  2025-08-14 17:20 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-08-14 17:10 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v1] monitor: Print unacked frame when releasing them
  2025-08-14 15:41 [PATCH BlueZ v1] monitor: Print unacked frame when releasing them Luiz Augusto von Dentz
  2025-08-14 17:10 ` [BlueZ,v1] " bluez.test.bot
@ 2025-08-14 17:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-08-14 17:20 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 14 Aug 2025 11:41:56 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This attempts to print the frame number of frames considered unacked
> (missing NOCP):
> 
> > 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
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-14 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 15:41 [PATCH BlueZ v1] monitor: Print unacked frame when releasing them Luiz Augusto von Dentz
2025-08-14 17:10 ` [BlueZ,v1] " bluez.test.bot
2025-08-14 17:20 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox