> -----Original Message-----
> From: Petr Machata [mailto:pe...@mellanox.com]
> Sent: Tuesday, September 10, 2019 5:24 AM
> To: linuxptp-devel@lists.sourceforge.net
> Cc: Petr Machata <pe...@mellanox.com>; Keller, Jacob E
> <jacob.e.kel...@intel.com>
> Subject: [PATCH v2 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
> to place the stats.
> 
> To that end, patch #1 introduces the message stats into linuxptp. A logical
> way to obtain these stats is then through pmc, which is implemented in
> patch #2, by way of a new TLV type.
> 

Great!

One thing (unrelated to this patch) I would love to see in the future is a bit 
more of an indepth "tutorial" style manpage or readme that explains how to use 
pmc, as opposed to trying to parse the output of the ptp4l log files all the 
time. I know we have the pmc man page, but something very introductory that is 
like a "if you're new to using ptp4l, here are some good practices..."

It's something that I know I forget about a lot, and would definitely be useful 
for others who don't know as much, and might not even be away of management 
interface at all.

Thanks,
Jake

> v2:
> - Patch #1:
>     - Add MAX_MESSAGE_TYPES with comment instead of using a bare constant.
> 
> 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          |  7 +++++++
>  pmc.c          | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>  pmc_common.c   |  1 +
>  port.c         | 32 ++++++++++++++++++++++++++++++--
>  port_private.h |  1 +
>  tlv.c          | 15 +++++++++++++++
>  tlv.h          |  6 ++++++
>  7 files changed, 107 insertions(+), 2 deletions(-)
> 
> --
> 2.20.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to