[Linuxptp-devel] [PATCH 0/2] Introduce per-port stats for received and transmitted messages

2019-09-02 Thread Petr Machata
Black-box switches with PTP support commonly provide per-port statistics of number of messages sent and received, split by the message type. Like other statistics (ip link, ethtool, etc. etc.), network operators use the PTP message stats to monitor the (PTP) network and debug issues. When ptp4l is

[Linuxptp-devel] [PATCH 2/2] pmc: Add a new TLV to obtain per-port statistics

2019-09-02 Thread Petr Machata
Add an ability of pmc to query per-port stats added in the previous patch. Signed-off-by: Petr Machata --- pmc.c| 47 +++ pmc_common.c | 1 + port.c | 7 +++ tlv.c| 15 +++ tlv.h| 6 ++ 5 files chang

[Linuxptp-devel] [PATCH 1/2] port: Introduce per-port stats for received and transmitted messages

2019-09-02 Thread Petr Machata
Add struct PortStats to keep per-port number of messages sent and received, split by message type. Bump TX counters after messages are sent successfully, and RX counters after a message is received. To keep things simple, reserve one counter for each theoretically possible message type, including t