* [PATCH 1/2] monitor: Add control packet count to analyze command
@ 2021-04-13 18:04 Tedd Ho-Jeong An
2021-04-13 18:04 ` [PATCH 2/2] monitor: Add iso " Tedd Ho-Jeong An
2021-04-13 18:51 ` [1/2] monitor: Add control " bluez.test.bot
0 siblings, 2 replies; 3+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-13 18:04 UTC (permalink / raw)
To: linux-bluetooth
From: Tedd Ho-Jeong An <tedd.an@intel.com>
This patch adds control packets(open, close, command, event) count to
analyze command.
---
monitor/analyze.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/monitor/analyze.c b/monitor/analyze.c
index 784f9a0a4..022761c21 100644
--- a/monitor/analyze.c
+++ b/monitor/analyze.c
@@ -37,6 +37,10 @@ struct hci_dev {
unsigned long vendor_diag;
unsigned long system_note;
unsigned long user_log;
+ unsigned long ctrl_open;
+ unsigned long ctrl_close;
+ unsigned long ctrl_cmd;
+ unsigned long ctrl_evt;
unsigned long unknown;
uint16_t manufacturer;
};
@@ -76,6 +80,10 @@ static void dev_destroy(void *data)
printf(" %lu vendor diagnostics\n", dev->vendor_diag);
printf(" %lu system notes\n", dev->system_note);
printf(" %lu user logs\n", dev->user_log);
+ printf(" %lu control open\n", dev->ctrl_open);
+ printf(" %lu control close\n", dev->ctrl_close);
+ printf(" %lu control commands\n", dev->ctrl_cmd);
+ printf(" %lu control events\n", dev->ctrl_evt);
printf(" %lu unknown opcodes\n", dev->unknown);
printf("\n");
@@ -299,6 +307,54 @@ static void user_log(struct timeval *tv, uint16_t index,
dev->user_log++;
}
+static void ctrl_open(struct timeval *tv, uint16_t index,
+ const void *data, uint16_t size)
+{
+ struct hci_dev *dev;
+
+ dev = dev_lookup(index);
+ if (!dev)
+ return;
+
+ dev->ctrl_open++;
+}
+
+static void ctrl_close(struct timeval *tv, uint16_t index,
+ const void *data, uint16_t size)
+{
+ struct hci_dev *dev;
+
+ dev = dev_lookup(index);
+ if (!dev)
+ return;
+
+ dev->ctrl_close++;
+}
+
+static void ctrl_cmd(struct timeval *tv, uint16_t index,
+ const void *data, uint16_t size)
+{
+ struct hci_dev *dev;
+
+ dev = dev_lookup(index);
+ if (!dev)
+ return;
+
+ dev->ctrl_cmd++;
+}
+
+static void ctrl_evt(struct timeval *tv, uint16_t index,
+ const void *data, uint16_t size)
+{
+ struct hci_dev *dev;
+
+ dev = dev_lookup(index);
+ if (!dev)
+ return;
+
+ dev->ctrl_evt++;
+}
+
static void unknown_opcode(struct timeval *tv, uint16_t index,
const void *data, uint16_t size)
{
@@ -380,6 +436,18 @@ void analyze_trace(const char *path)
case BTSNOOP_OPCODE_USER_LOGGING:
user_log(&tv, index, buf, pktlen);
break;
+ case BTSNOOP_OPCODE_CTRL_OPEN:
+ ctrl_open(&tv, index, buf, pktlen);
+ break;
+ case BTSNOOP_OPCODE_CTRL_CLOSE:
+ ctrl_close(&tv, index, buf, pktlen);
+ break;
+ case BTSNOOP_OPCODE_CTRL_COMMAND:
+ ctrl_cmd(&tv, index, buf, pktlen);
+ break;
+ case BTSNOOP_OPCODE_CTRL_EVENT:
+ ctrl_evt(&tv, index, buf, pktlen);
+ break;
default:
fprintf(stderr, "Unknown opcode %u\n", opcode);
unknown_opcode(&tv, index, buf, pktlen);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] monitor: Add iso packet count to analyze command
2021-04-13 18:04 [PATCH 1/2] monitor: Add control packet count to analyze command Tedd Ho-Jeong An
@ 2021-04-13 18:04 ` Tedd Ho-Jeong An
2021-04-13 18:51 ` [1/2] monitor: Add control " bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: Tedd Ho-Jeong An @ 2021-04-13 18:04 UTC (permalink / raw)
To: linux-bluetooth
From: Tedd Ho-Jeong An <tedd.an@intel.com>
This patch adds iso tx/rx packet count to analyze command.
---
monitor/analyze.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/monitor/analyze.c b/monitor/analyze.c
index 022761c21..225a37ffa 100644
--- a/monitor/analyze.c
+++ b/monitor/analyze.c
@@ -34,6 +34,7 @@ struct hci_dev {
unsigned long num_evt;
unsigned long num_acl;
unsigned long num_sco;
+ unsigned long num_iso;
unsigned long vendor_diag;
unsigned long system_note;
unsigned long user_log;
@@ -77,6 +78,7 @@ static void dev_destroy(void *data)
printf(" %lu events\n", dev->num_evt);
printf(" %lu ACL packets\n", dev->num_acl);
printf(" %lu SCO packets\n", dev->num_sco);
+ printf(" %lu ISO packets\n", dev->num_iso);
printf(" %lu vendor diagnostics\n", dev->vendor_diag);
printf(" %lu system notes\n", dev->system_note);
printf(" %lu user logs\n", dev->user_log);
@@ -255,6 +257,22 @@ static void sco_pkt(struct timeval *tv, uint16_t index,
dev->num_sco++;
}
+static void iso_pkt(struct timeval *tv, uint16_t index,
+ const void *data, uint16_t size)
+{
+ const struct bt_hci_iso_hdr *hdr = data;
+ struct hci_dev *dev;
+
+ data += sizeof(*hdr);
+ size -= sizeof(*hdr);
+
+ dev = dev_lookup(index);
+ if (!dev)
+ return;
+
+ dev->num_iso++;
+}
+
static void info_index(struct timeval *tv, uint16_t index,
const void *data, uint16_t size)
{
@@ -448,6 +466,10 @@ void analyze_trace(const char *path)
case BTSNOOP_OPCODE_CTRL_EVENT:
ctrl_evt(&tv, index, buf, pktlen);
break;
+ case BTSNOOP_OPCODE_ISO_TX_PKT:
+ case BTSNOOP_OPCODE_ISO_RX_PKT:
+ iso_pkt(&tv, index, buf, pktlen);
+ break;
default:
fprintf(stderr, "Unknown opcode %u\n", opcode);
unknown_opcode(&tv, index, buf, pktlen);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [1/2] monitor: Add control packet count to analyze command
2021-04-13 18:04 [PATCH 1/2] monitor: Add control packet count to analyze command Tedd Ho-Jeong An
2021-04-13 18:04 ` [PATCH 2/2] monitor: Add iso " Tedd Ho-Jeong An
@ 2021-04-13 18:51 ` bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-04-13 18:51 UTC (permalink / raw)
To: linux-bluetooth, hj.tedd.an
[-- Attachment #1: Type: text/plain, Size: 2296 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=466569
---Test result---
Test Summary:
CheckPatch PASS 0.62 seconds
GitLint PASS 0.23 seconds
Prep - Setup ELL PASS 46.93 seconds
Build - Prep PASS 0.11 seconds
Build - Configure PASS 8.36 seconds
Build - Make PASS 195.90 seconds
Make Check PASS 9.40 seconds
Make Dist PASS 12.67 seconds
Make Dist - Configure PASS 5.45 seconds
Make Dist - Make PASS 80.33 seconds
Build w/ext ELL - Configure PASS 8.59 seconds
Build w/ext ELL - Make PASS 186.31 seconds
Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint
##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL
##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build
##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree
##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree
##############################
Test: Make Check - PASS
Desc: Run 'make check'
##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball
##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball
##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball
##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration
##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-13 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 18:04 [PATCH 1/2] monitor: Add control packet count to analyze command Tedd Ho-Jeong An
2021-04-13 18:04 ` [PATCH 2/2] monitor: Add iso " Tedd Ho-Jeong An
2021-04-13 18:51 ` [1/2] monitor: Add control " bluez.test.bot
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.