* [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg
@ 2025-08-27 16:05 Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q Luiz Augusto von Dentz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-27 16:05 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When enabling debug via CONFIG_BT_FEATURE_DEBUG include function and
line information by default otherwise it is hard to make any sense of
which function the logs comes from.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
include/net/bluetooth/bluetooth.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index e5751f3070b8..d46ed9011ee5 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -272,7 +272,8 @@ void bt_err_ratelimited(const char *fmt, ...);
#define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__)
#if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)
-#define BT_DBG(fmt, ...) bt_dbg(fmt "\n", ##__VA_ARGS__)
+#define BT_DBG(fmt, ...) \
+ bt_dbg("%s:%d: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
#else
#define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__)
#endif
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q
2025-08-27 16:05 [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
@ 2025-08-27 16:05 ` Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 3/3] Bluetooth: hci_core: Print information of hcon on hci_low_sent Luiz Augusto von Dentz
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-27 16:05 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attempts to print the number of packets pending to be transmitted
in the conn->data_q.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/hci_core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index f91ead01f261..5078d7de6a7b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3267,6 +3267,8 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
spin_unlock_bh(&queue->lock);
}
+
+ bt_dev_dbg(hdev, "chan %p queued %d", chan, skb_queue_len(queue));
}
void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags)
@@ -3298,6 +3300,10 @@ void hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
hci_skb_pkt_type(skb) = HCI_SCODATA_PKT;
skb_queue_tail(&conn->data_q, skb);
+
+ bt_dev_dbg(hdev, "hcon %p queued %d", conn,
+ skb_queue_len(&conn->data_q));
+
queue_work(hdev->workqueue, &hdev->tx_work);
}
@@ -3357,6 +3363,8 @@ static void hci_queue_iso(struct hci_conn *conn, struct sk_buff_head *queue,
__skb_queue_tail(queue, skb);
} while (list);
}
+
+ bt_dev_dbg(hdev, "hcon %p queued %d", conn, skb_queue_len(queue));
}
void hci_send_iso(struct hci_conn *conn, struct sk_buff *skb)
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 3/3] Bluetooth: hci_core: Print information of hcon on hci_low_sent
2025-08-27 16:05 [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q Luiz Augusto von Dentz
@ 2025-08-27 16:05 ` Luiz Augusto von Dentz
2025-08-27 16:39 ` [v1,1/3] Bluetooth: Add function and line information to bt_dbg bluez.test.bot
2025-08-27 19:10 ` [PATCH v1 1/3] " patchwork-bot+bluetooth
3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-27 16:05 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This prints the information about the hcon on hci_low_sent to confirm
all connection are being processed.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/hci_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5078d7de6a7b..ac49de2e7bc4 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3435,6 +3435,10 @@ static struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type,
skb_queue_empty(&c->data_q))
continue;
+ bt_dev_dbg(hdev, "hcon %p state %s queued %d", c,
+ state_to_string(c->state),
+ skb_queue_len(&c->data_q));
+
if (c->state != BT_CONNECTED && c->state != BT_CONFIG)
continue;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [v1,1/3] Bluetooth: Add function and line information to bt_dbg
2025-08-27 16:05 [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 3/3] Bluetooth: hci_core: Print information of hcon on hci_low_sent Luiz Augusto von Dentz
@ 2025-08-27 16:39 ` bluez.test.bot
2025-08-27 19:10 ` [PATCH v1 1/3] " patchwork-bot+bluetooth
3 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2025-08-27 16:39 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 3075 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=996139
---Test result---
Test Summary:
CheckPatch PENDING 0.38 seconds
GitLint PENDING 0.50 seconds
SubjectPrefix PASS 0.16 seconds
BuildKernel PASS 24.36 seconds
CheckAllWarning PASS 26.65 seconds
CheckSparse WARNING 30.33 seconds
BuildKernel32 PASS 24.07 seconds
TestRunnerSetup PASS 477.79 seconds
TestRunner_l2cap-tester PASS 24.88 seconds
TestRunner_iso-tester PASS 41.15 seconds
TestRunner_bnep-tester PASS 5.98 seconds
TestRunner_mgmt-tester FAIL 126.58 seconds
TestRunner_rfcomm-tester PASS 9.28 seconds
TestRunner_sco-tester PASS 14.55 seconds
TestRunner_ioctl-tester PASS 10.10 seconds
TestRunner_mesh-tester FAIL 9.57 seconds
TestRunner_smp-tester PASS 8.48 seconds
TestRunner_userchan-tester PASS 6.15 seconds
IncrementalBuild PENDING 0.70 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_core.c:85:9: warning: context imbalance in '__hci_dev_get' - different lock contexts for basic blocknet/bluetooth/hci_core.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, include/linux/radix-tree.h, ...):net/bluetooth/hci_core.c:85:9: warning: context imbalance in '__hci_dev_get' - different lock contexts for basic blocknet/bluetooth/hci_core.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, include/linux/radix-tree.h, ...):
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.101 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.076 seconds
Mesh - Send cancel - 2 Failed 0.135 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg
2025-08-27 16:05 [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
` (2 preceding siblings ...)
2025-08-27 16:39 ` [v1,1/3] Bluetooth: Add function and line information to bt_dbg bluez.test.bot
@ 2025-08-27 19:10 ` patchwork-bot+bluetooth
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2025-08-27 19:10 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 27 Aug 2025 12:05:53 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> When enabling debug via CONFIG_BT_FEATURE_DEBUG include function and
> line information by default otherwise it is hard to make any sense of
> which function the logs comes from.
>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> [...]
Here is the summary with links:
- [v1,1/3] Bluetooth: Add function and line information to bt_dbg
https://git.kernel.org/bluetooth/bluetooth-next/c/e845c8526165
- [v1,2/3] Bluetooth: hci_core: Print number of packets in conn->data_q
https://git.kernel.org/bluetooth/bluetooth-next/c/628a96509cab
- [v1,3/3] Bluetooth: hci_core: Print information of hcon on hci_low_sent
https://git.kernel.org/bluetooth/bluetooth-next/c/bc606b7bec57
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] 5+ messages in thread
end of thread, other threads:[~2025-08-27 19:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 16:05 [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 3/3] Bluetooth: hci_core: Print information of hcon on hci_low_sent Luiz Augusto von Dentz
2025-08-27 16:39 ` [v1,1/3] Bluetooth: Add function and line information to bt_dbg bluez.test.bot
2025-08-27 19:10 ` [PATCH v1 1/3] " patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.