> -----Original Message----- > From: Petr Machata [mailto:pe...@mellanox.com] > Sent: Monday, September 02, 2019 2:39 AM > To: linuxptp-devel@lists.sourceforge.net > Subject: [Linuxptp-devel] [PATCH 0/2] Introduce per-port stats for received > and > transmitted messages > > 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 used to turn a Linux machine (be it a switch or a host) into > a PTP clock, there is no easy way to get at these stats. It would certainly > be possible to parse ingressing and egressing traffic using e.g. a u32 > classifier, or create an ad-hoc eBPF-based tool, or something similar. But > all these approaches have to work hard to extract the knowledge that ptp4l > already has. ptp4l needs to parse the traffic anyway, and for transmitted > packets obviously knows what it is sending. It is thus the natural place > where the stats should be present. > > To that end, patch #1 introduces the message stats into linuxptp. A natural > way to obtain these stats is then through pmc, which is implemented in > patch #2, by way of a new TLV type. >
Nice! I like this. > Petr Machata (2): > port: Introduce per-port stats for received and transmitted messages > pmc: Add a new TLV to obtain per-port statistics > > ddt.h | 5 +++++ > pmc.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > pmc_common.c | 1 + > port.c | 32 ++++++++++++++++++++++++++++++-- > port_private.h | 1 + > tlv.c | 15 +++++++++++++++ > tlv.h | 6 ++++++ > 7 files changed, 105 insertions(+), 2 deletions(-) > > -- > 2.20.1 > > > > _______________________________________________ > Linuxptp-devel mailing list > Linuxptp-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-devel _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel