Skip to content

saiport: Add counters for 1519_TO_MAX_OCTETS packet size range#2272

Open
AnandhiDhanabalan wants to merge 1 commit intoopencomputeproject:masterfrom
AnandhiDhanabalan:mrvl_portstat
Open

saiport: Add counters for 1519_TO_MAX_OCTETS packet size range#2272
AnandhiDhanabalan wants to merge 1 commit intoopencomputeproject:masterfrom
AnandhiDhanabalan:mrvl_portstat

Conversation

@AnandhiDhanabalan
Copy link
Copy Markdown

Add a new port statistic for ASICs that expose a single aggregate jumbo packet counter instead of the detailed SAI jumbo histogram buckets (1519–2047, 2048–4095, 4096–9216, 9217–16383).

The following counters are introduced:

  • SAI_PORT_STAT_ETHER_STATS_PKTS_1519_TO_MAX_OCTETS
  • SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_MAX_OCTETS
  • SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_MAX_OCTETS

The new counter reports packets with frame length greater than 1518 octets up to the maximum frame size supported by the port hardware (MAX_OCTETS). This enables platforms that provide only a cumulative jumbo packet counter to expose the statistic through SAI.

If the underlying ASIC provides packet length histogram counters, vendors may derive and expose this cumulative counter by aggregating the corresponding histogram buckets.

From a user perspective, a cumulative jumbo packet counter provides a simple view of jumbo traffic without requiring consumers to interpret or sum multiple histogram counters.

Comment thread inc/saiport.h
Comment on lines +4035 to +4051
/** SAI port stat sender credits used */
SAI_PORT_STAT_CBFC_SENDER_CREDITS_USED,

/** SAI port stat sender credits used watermark */
SAI_PORT_STAT_CBFC_SENDER_CREDITS_USED_WATERMARK,

/** SAI port stat credits consumed update messages tx */
SAI_PORT_STAT_CBFC_NUM_CC_UPDATE_MESSAGES_TX,

/** SAI port stat credits freed update messages tx */
SAI_PORT_STAT_CBFC_NUM_CF_UPDATE_MESSAGES_TX,

/** SAI port stat credits consumed update messages rx */
SAI_PORT_STAT_CBFC_NUM_CC_UPDATE_MESSAGES_RX,

/** SAI port stat credits freed update messages rx */
SAI_PORT_STAT_CBFC_NUM_CF_UPDATE_MESSAGES_RX,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that "SAI port stat" is redundant, could be "Number of ..."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kcudnik , The naming convention for 'SAI_PORT_STAT_ETHER_STATS' has been followed to be inline with the existing ETHER_STATS.
Do let me know if you still think this needs to be changed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kcudnik , is you comment for the ETHER_STATS or for CBFC ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my comment is for comments in each added new enum, that string seems redundant since each enum starts with SAI_PORT_STAT_xxx

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kcudnik , they are 3 different Ether stats as shown below and are inline with existing ether stats

  1. Tx+Rx - SAI_PORT_STAT_ETHER_STATS_PKTS_1519_TO_MAX_OCTETS
  2. Rx only - SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_MAX_OCTETS
  3. Tx Only - SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_MAX_OCTETS

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you are not getting it, i say that there is no need to repeat string "SAI port stat" in comment lines like 4050, 4047 4044 and so on

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kcudnik , I intended to follow the same format as the existing Ethernet statistics. Quoting a couple of examples below for reference:

    /** SAI port stat ether stats pkts 65 to 127 octets */
    SAI_PORT_STAT_ETHER_STATS_PKTS_65_TO_127_OCTETS,

    /** SAI port stat ether stats pkts 128 to 255 octets */
    SAI_PORT_STAT_ETHER_STATS_PKTS_128_TO_255_OCTETS,

If there is a need to adjust the format for the new enums, would the following be acceptable?

    /** Packets with frame size 1519 octets to max MTU supported by the port */
    SAI_PORT_STAT_ETHER_STATS_PKTS_1519_TO_MAX_OCTETS,

Please let me know your thoughts, and I can update it accordingly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for example SAI_PORT_STAT_LLR_RX_ACK_CTL_OS

Signed-off-by: Anandhi Dhanabalan <adhanabalan@marvell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants