The following patch introduce the new PORTS_STATS_2_NP that offers 
additional counters useful for debug and troubleshooting.

The PORTS_STATS_2_NP carries all the PORTS_STATS_NP RX/TX counters
adding room for extra counters (up to 16 counters for RX and TX).
Not all counters are filled yet.

The PORTS_STATS_2_NP TLV has the following definition:

struct port_stats_2_np {
        struct PortIdentity portIdentity; // As PORT_STATS_NP
        struct PortStats stats;           // As PORT_STATS_NP
        struct PortStats extraStats;      // Extra room
} PACKED;

The proposed implementation add the following counters:

Offset Dir Description
 0     RX  Bad Message
 1     RX  Bad Protocol
 2     RX  Fail on Receive
 3     RX  Missing Timestamp
 4     RX  Announce from Foreign Masters (used by 1588-2019 Annex J)
 5     RX  Announce from current Master
 2     TX  Fail on Transmit
 3     TX  Missing Timestamp

The counters are properly updated by runtime when required.

History:
v1: Initial version
v2: Beautify the code

Luigi Mantellini (1):
  Add the PORTS_STATS_2_NP Management message.

 ddt.h          |  10 +++++
 pmc.c          | 115 +++++++++++++++++++++++++++++++------------------
 pmc_common.c   |   4 ++
 port.c         |  51 +++++++++++++++++-----
 port_private.h |   1 +
 tlv.c          |  28 ++++++++++++
 tlv.h          |   7 +++
 7 files changed, 163 insertions(+), 53 deletions(-)

-- 
2.42.0



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

Reply via email to