[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240418092303.19725-1-o-takashi@sakamocchi.jp>
Date: Thu, 18 Apr 2024 18:22:50 +0900
From: Takashi Sakamoto <o-takashi@...amocchi.jp>
To: linux1394-devel@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org
Subject: [RFC PATCH 00/13] firewire: add tracepoints events for asynchronous communication
Hi,
In a view of IEEE 1394 bus, the main function of kernel core is to
provide transaction service to the bus. It is helpful to have some
mechanisms to trace any action of the service.
This series of changes adds some tracepoints events for the purpose.
It adds the following tracepoints events via firewire subsystem:
* For outbound transactions (e.g. initiated by user process)
* async_request_outbound_initiate
* async_request_outbound_complete
* async_response_inbound
* For inbound transactions (e.g. initiated by the other nodes in the bus)
* async_request_inbound
* async_response_outbound_initiate
* async_response_outbound_complete
When probing these tracepoints events, the content of 'struct fw_packet'
passed between the core function and 1394 OHCI driver is recorded with
the fields of header and packet data. For example of the outbound
transaction:
async_request_outbound_initiate: \
transaction=0xffffb7e382373718 scode=2 generation=6 dst_id=0xffc0 \
tlabel=59 retry=1 tcode=1 priority=0 src_id=0xffc1 \
offset=0xecc000000000 \
data={0x6000000,0x1000000,0x40000100,0x3000000,0x1000000,0x0}
async_request_outbound_complete: \
transaction=0xffffb7e382373718 scode=2 generation=6 ack=2 \
timestamp=0x2296
async_response_inbound: \
transaction=0xffffb7e382373718 scode=2 timestamp=0x2297 dst_id=0xffc1 \
tlabel=59 retry=1 tcode=2 priority=0 src_id=0xffc0 rcode=0 data={}
To provide the parsed fields of header, the series adds some helper
incline functions for this purpose, then refactors the existent code in
both core and 1394 OHCI driver with sufficient tests.
Takashi Sakamoto (13):
firewire: core: add common inline functions to serialize/deserialize
asynchronous packet header
firewire: core: replace local macros with common inline functions for
asynchronous packet header
firewire: ohci: replace local macros with common inline functions for
asynchronous packet header
firewire: ohci: replace hard-coded values with inline functions for
asynchronous packet header
firewire: ohci: replace hard-coded values with common macros
firewire: core: obsolete tcode check macros with inline functions
firewire: core: add common macro to serialize/deserialize isochronous
packet header
firewire: core: replace local macros with common inline functions for
isochronous packet header
firewire: core: add support for Linux kernel tracepoints
firewire: core: add tracepoints events for asynchronous outbound
request
firewire: core: add tracepoints event for asynchronous inbound
response
firewire: core: add tracepoint event for asynchronous inbound request
firewire: core: add tracepoints events for asynchronous outbound
response
drivers/firewire/.kunitconfig | 1 +
drivers/firewire/Kconfig | 16 +
drivers/firewire/Makefile | 8 +-
drivers/firewire/core-transaction.c | 239 ++++----
drivers/firewire/core.h | 21 +-
drivers/firewire/ohci.c | 78 +--
drivers/firewire/packet-header-definitions.h | 234 ++++++++
drivers/firewire/packet-serdes-test.c | 582 +++++++++++++++++++
drivers/firewire/trace.c | 5 +
drivers/firewire/trace.h | 265 +++++++++
10 files changed, 1280 insertions(+), 169 deletions(-)
create mode 100644 drivers/firewire/packet-header-definitions.h
create mode 100644 drivers/firewire/packet-serdes-test.c
create mode 100644 drivers/firewire/trace.c
create mode 100644 drivers/firewire/trace.h
--
2.43.0
Powered by blists - more mailing lists