All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/13] firewire: add tracepoints events for asynchronous communication
@ 2024-04-18  9:22 Takashi Sakamoto
  2024-04-18  9:22 ` [RFC PATCH 01/13] firewire: core: add common inline functions to serialize/deserialize asynchronous packet header Takashi Sakamoto
  0 siblings, 1 reply; 14+ messages in thread
From: Takashi Sakamoto @ 2024-04-18  9:22 UTC (permalink / raw
  To: linux1394-devel; +Cc: linux-kernel

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


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

end of thread, other threads:[~2024-04-18  9:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18  9:22 [RFC PATCH 00/13] firewire: add tracepoints events for asynchronous communication Takashi Sakamoto
2024-04-18  9:22 ` [RFC PATCH 01/13] firewire: core: add common inline functions to serialize/deserialize asynchronous packet header Takashi Sakamoto
2024-04-18  9:22   ` [RFC PATCH 02/13] firewire: core: replace local macros with common inline functions for " Takashi Sakamoto
2024-04-18  9:22     ` [RFC PATCH 03/13] firewire: ohci: " Takashi Sakamoto
2024-04-18  9:22       ` [RFC PATCH 04/13] firewire: ohci: replace hard-coded values with " Takashi Sakamoto
2024-04-18  9:22         ` [RFC PATCH 05/13] firewire: ohci: replace hard-coded values with common macros Takashi Sakamoto
2024-04-18  9:22           ` [RFC PATCH 06/13] firewire: core: obsolete tcode check macros with inline functions Takashi Sakamoto
2024-04-18  9:22             ` [RFC PATCH 07/13] firewire: core: add common macro to serialize/deserialize isochronous packet header Takashi Sakamoto
2024-04-18  9:22               ` [RFC PATCH 08/13] firewire: core: replace local macros with common inline functions for " Takashi Sakamoto
2024-04-18  9:22                 ` [RFC PATCH 09/13] firewire: core: add support for Linux kernel tracepoints Takashi Sakamoto
2024-04-18  9:23                   ` [RFC PATCH 10/13] firewire: core: add tracepoints events for asynchronous outbound request Takashi Sakamoto
2024-04-18  9:23                     ` [RFC PATCH 11/13] firewire: core: add tracepoints event for asynchronous inbound response Takashi Sakamoto
2024-04-18  9:23                       ` [RFC PATCH 12/13] firewire: core: add tracepoint event for asynchronous inbound request Takashi Sakamoto
2024-04-18  9:23                         ` [RFC PATCH 13/13] firewire: core: add tracepoints events for asynchronous outbound response Takashi Sakamoto

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.