* [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header
@ 2024-07-26 10:43 Kiran K
2024-07-26 10:43 ` [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets Kiran K
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Kiran K @ 2024-07-26 10:43 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan,
chandrashekar.devegowda, Kiran K
Add a helper function hci_iso_hdr() to extract iso header from skb.
Signed-off-by: Kiran K <kiran.k@intel.com>
---
include/net/bluetooth/hci.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index e372a88e8c3f..ace5d210af38 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -2898,6 +2898,11 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb)
return (struct hci_sco_hdr *) skb->data;
}
+static inline struct hci_iso_hdr *hci_iso_hdr(const struct sk_buff *skb)
+{
+ return (struct hci_iso_hdr *)skb->data;
+}
+
/* Command opcode pack/unpack */
#define hci_opcode_pack(ogf, ocf) ((__u16) ((ocf & 0x03ff)|(ogf << 10)))
#define hci_opcode_ogf(op) (op >> 10)
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets
2024-07-26 10:43 [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header Kiran K
@ 2024-07-26 10:43 ` Kiran K
2024-08-06 14:22 ` Luiz Augusto von Dentz
2024-07-26 10:43 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Add support for ISO data Kiran K
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Kiran K @ 2024-07-26 10:43 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan,
chandrashekar.devegowda, Kiran K
Add counters in hci_dev_stats to track iso tx and rx packets.
Signed-off-by: Kiran K <kiran.k@intel.com>
---
include/net/bluetooth/hci_sock.h | 2 ++
net/bluetooth/hci_core.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/include/net/bluetooth/hci_sock.h b/include/net/bluetooth/hci_sock.h
index 13e8cd4414a1..98991a11844a 100644
--- a/include/net/bluetooth/hci_sock.h
+++ b/include/net/bluetooth/hci_sock.h
@@ -101,6 +101,8 @@ struct hci_dev_stats {
__u32 acl_rx;
__u32 sco_tx;
__u32 sco_rx;
+ __u32 iso_tx;
+ __u32 iso_rx;
__u32 byte_rx;
__u32 byte_tx;
};
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8a4ebd93adfc..b0d40b62238b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3858,6 +3858,8 @@ static void hci_isodata_packet(struct hci_dev *hdev, struct sk_buff *skb)
bt_dev_dbg(hdev, "len %d handle 0x%4.4x flags 0x%4.4x", skb->len,
handle, flags);
+ hdev->stat.iso_rx++;
+
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, handle);
hci_dev_unlock(hdev);
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 3/3] Bluetooth: btintel_pcie: Add support for ISO data
2024-07-26 10:43 [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header Kiran K
2024-07-26 10:43 ` [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets Kiran K
@ 2024-07-26 10:43 ` Kiran K
2024-07-26 11:04 ` [v1,1/3] Bluetooth: Add a helper function to extract iso header bluez.test.bot
2024-08-06 20:29 ` [PATCH v1 1/3] " patchwork-bot+bluetooth
3 siblings, 0 replies; 6+ messages in thread
From: Kiran K @ 2024-07-26 10:43 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan,
chandrashekar.devegowda, Kiran
From: Kiran <kiran.k@intel.com>
Add support for handling ISO RX and TX packets.
Signed-off-by: Kiran <kiran.k@intel.com>
---
drivers/bluetooth/btintel_pcie.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 0d1a0415557b..8a5b5bce0a7d 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -46,6 +46,7 @@ MODULE_DEVICE_TABLE(pci, btintel_pcie_table);
#define BTINTEL_PCIE_HCI_ACL_PKT 0x00000002
#define BTINTEL_PCIE_HCI_SCO_PKT 0x00000003
#define BTINTEL_PCIE_HCI_EVT_PKT 0x00000004
+#define BTINTEL_PCIE_HCI_ISO_PKT 0x00000005
static inline void ipc_print_ia_ring(struct hci_dev *hdev, struct ia *ia,
u16 queue_num)
@@ -423,6 +424,18 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
goto exit_error;
}
break;
+
+ case BTINTEL_PCIE_HCI_ISO_PKT:
+ if (skb->len >= HCI_ISO_HDR_SIZE) {
+ plen = HCI_ISO_HDR_SIZE + __le16_to_cpu(hci_iso_hdr(skb)->dlen);
+ pkt_type = HCI_ISODATA_PKT;
+ } else {
+ bt_dev_err(hdev, "ISO packet is too short");
+ ret = -EILSEQ;
+ goto exit_error;
+ }
+ break;
+
default:
bt_dev_err(hdev, "Invalid packet type received: 0x%4.4x",
pcie_pkt_type);
@@ -1082,6 +1095,10 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
type = BTINTEL_PCIE_HCI_SCO_PKT;
hdev->stat.sco_tx++;
break;
+ case HCI_ISODATA_PKT:
+ type = BTINTEL_PCIE_HCI_ISO_PKT;
+ hdev->stat.iso_tx++;
+ break;
default:
bt_dev_err(hdev, "Unknown HCI packet type");
return -EILSEQ;
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [v1,1/3] Bluetooth: Add a helper function to extract iso header
2024-07-26 10:43 [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header Kiran K
2024-07-26 10:43 ` [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets Kiran K
2024-07-26 10:43 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Add support for ISO data Kiran K
@ 2024-07-26 11:04 ` bluez.test.bot
2024-08-06 20:29 ` [PATCH v1 1/3] " patchwork-bot+bluetooth
3 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2024-07-26 11:04 UTC (permalink / raw)
To: linux-bluetooth, kiran.k
[-- Attachment #1: Type: text/plain, Size: 1694 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=874047
---Test result---
Test Summary:
CheckPatch PASS 2.08 seconds
GitLint PASS 0.93 seconds
SubjectPrefix PASS 0.35 seconds
BuildKernel PASS 29.56 seconds
CheckAllWarning PASS 32.00 seconds
CheckSparse PASS 37.29 seconds
CheckSmatch PASS 102.80 seconds
BuildKernel32 PASS 28.72 seconds
TestRunnerSetup PASS 527.14 seconds
TestRunner_l2cap-tester PASS 19.91 seconds
TestRunner_iso-tester PASS 28.97 seconds
TestRunner_bnep-tester PASS 4.86 seconds
TestRunner_mgmt-tester PASS 119.13 seconds
TestRunner_rfcomm-tester PASS 7.46 seconds
TestRunner_sco-tester PASS 15.08 seconds
TestRunner_ioctl-tester PASS 8.02 seconds
TestRunner_mesh-tester FAIL 8.17 seconds
TestRunner_smp-tester PASS 6.91 seconds
TestRunner_userchan-tester PASS 6.66 seconds
IncrementalBuild PASS 57.24 seconds
Details
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Failed 0.100 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets
2024-07-26 10:43 ` [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets Kiran K
@ 2024-08-06 14:22 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2024-08-06 14:22 UTC (permalink / raw)
To: Kiran K
Cc: linux-bluetooth, ravishankar.srivatsa, chethan.tumkur.narayan,
chandrashekar.devegowda
Hi Kiran,
On Fri, Jul 26, 2024 at 6:30 AM Kiran K <kiran.k@intel.com> wrote:
>
> Add counters in hci_dev_stats to track iso tx and rx packets.
>
> Signed-off-by: Kiran K <kiran.k@intel.com>
> ---
> include/net/bluetooth/hci_sock.h | 2 ++
> net/bluetooth/hci_core.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/include/net/bluetooth/hci_sock.h b/include/net/bluetooth/hci_sock.h
> index 13e8cd4414a1..98991a11844a 100644
> --- a/include/net/bluetooth/hci_sock.h
> +++ b/include/net/bluetooth/hci_sock.h
> @@ -101,6 +101,8 @@ struct hci_dev_stats {
> __u32 acl_rx;
> __u32 sco_tx;
> __u32 sco_rx;
> + __u32 iso_tx;
> + __u32 iso_rx;
> __u32 byte_rx;
> __u32 byte_tx;
> };
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 8a4ebd93adfc..b0d40b62238b 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -3858,6 +3858,8 @@ static void hci_isodata_packet(struct hci_dev *hdev, struct sk_buff *skb)
> bt_dev_dbg(hdev, "len %d handle 0x%4.4x flags 0x%4.4x", skb->len,
> handle, flags);
>
> + hdev->stat.iso_rx++;
> +
> hci_dev_lock(hdev);
> conn = hci_conn_hash_lookup_handle(hdev, handle);
> hci_dev_unlock(hdev);
> --
> 2.40.1
This breaks HCIGETDEVINFO since it changes its size, not really sure
how ioctl-tester pass it but perhaps it is not really checking the
size, anyway that's why Ive left it unchanged since otherwise we have
to break ioctl APIs which are considered deprecated anyway.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header
2024-07-26 10:43 [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header Kiran K
` (2 preceding siblings ...)
2024-07-26 11:04 ` [v1,1/3] Bluetooth: Add a helper function to extract iso header bluez.test.bot
@ 2024-08-06 20:29 ` patchwork-bot+bluetooth
3 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2024-08-06 20:29 UTC (permalink / raw)
To: Kiran K
Cc: linux-bluetooth, ravishankar.srivatsa, chethan.tumkur.narayan,
chandrashekar.devegowda
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 26 Jul 2024 16:13:24 +0530 you wrote:
> Add a helper function hci_iso_hdr() to extract iso header from skb.
>
> Signed-off-by: Kiran K <kiran.k@intel.com>
> ---
> include/net/bluetooth/hci.h | 5 +++++
> 1 file changed, 5 insertions(+)
Here is the summary with links:
- [v1,1/3] Bluetooth: Add a helper function to extract iso header
https://git.kernel.org/bluetooth/bluetooth-next/c/54aca0cc489f
- [v1,2/3] Bluetooth: Add tx/rx counters to track iso packets
(no matching commit)
- [v1,3/3] Bluetooth: btintel_pcie: Add support for ISO data
(no matching commit)
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] 6+ messages in thread
end of thread, other threads:[~2024-08-06 20:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 10:43 [PATCH v1 1/3] Bluetooth: Add a helper function to extract iso header Kiran K
2024-07-26 10:43 ` [PATCH v1 2/3] Bluetooth: Add tx/rx counters to track iso packets Kiran K
2024-08-06 14:22 ` Luiz Augusto von Dentz
2024-07-26 10:43 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Add support for ISO data Kiran K
2024-07-26 11:04 ` [v1,1/3] Bluetooth: Add a helper function to extract iso header bluez.test.bot
2024-08-06 20:29 ` [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.