Skip to content

Commit

Permalink
Statistics support for Tx and Rx counters of different frame sizes (s…
Browse files Browse the repository at this point in the history
…onic-net#1536)

Added Statistics support for Tx and Rx counters of different frames sizes.

Depends on sonic-net/sonic-utilities#1299

Added below stats
SAI_PORT_STAT_ETHER_IN_PKTS_64_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_65_TO_127_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_256_TO_511_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_512_TO_1023_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_1024_TO_1518_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2047_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_2048_TO_4095_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_4096_TO_9216_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_9217_TO_16383_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_64_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_65_TO_127_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_128_TO_255_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_256_TO_511_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_512_TO_1023_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_1024_TO_1518_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2047_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_2048_TO_4095_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_4096_TO_9216_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_9217_TO_16383_OCTETS
SAI_PORT_STAT_ETHER_STATS_JABBERS
SAI_PORT_STAT_ETHER_STATS_FRAGMENTS
SAI_PORT_STAT_ETHER_STATS_UNDERSIZE_PKTS
SAI_PORT_STAT_IP_IN_RECEIVES

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
  • Loading branch information
AkhileshSamineni authored and arlakshm committed Dec 15, 2020
1 parent 08bf781 commit 5269383
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,26 @@ const vector<sai_port_stat_t> port_stat_ids =
SAI_PORT_STAT_IF_OUT_BROADCAST_PKTS,
SAI_PORT_STAT_ETHER_RX_OVERSIZE_PKTS,
SAI_PORT_STAT_ETHER_TX_OVERSIZE_PKTS,
SAI_PORT_STAT_ETHER_IN_PKTS_64_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_65_TO_127_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_128_TO_255_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_256_TO_511_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_512_TO_1023_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_1024_TO_1518_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2047_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_2048_TO_4095_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_4096_TO_9216_OCTETS,
SAI_PORT_STAT_ETHER_IN_PKTS_9217_TO_16383_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_64_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_65_TO_127_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_128_TO_255_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_256_TO_511_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_512_TO_1023_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_1024_TO_1518_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2047_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_2048_TO_4095_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_4096_TO_9216_OCTETS,
SAI_PORT_STAT_ETHER_OUT_PKTS_9217_TO_16383_OCTETS,
SAI_PORT_STAT_PFC_0_TX_PKTS,
SAI_PORT_STAT_PFC_1_TX_PKTS,
SAI_PORT_STAT_PFC_2_TX_PKTS,
Expand All @@ -147,7 +167,10 @@ const vector<sai_port_stat_t> port_stat_ids =
SAI_PORT_STAT_PAUSE_TX_PKTS,
SAI_PORT_STAT_ETHER_STATS_TX_NO_ERRORS,
SAI_PORT_STAT_IP_IN_UCAST_PKTS,
SAI_PORT_STAT_ETHER_IN_PKTS_128_TO_255_OCTETS,
SAI_PORT_STAT_ETHER_STATS_JABBERS,
SAI_PORT_STAT_ETHER_STATS_FRAGMENTS,
SAI_PORT_STAT_ETHER_STATS_UNDERSIZE_PKTS,
SAI_PORT_STAT_IP_IN_RECEIVES
};

const vector<sai_port_stat_t> port_buffer_drop_stat_ids =
Expand Down

0 comments on commit 5269383

Please sign in to comment.