Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions experimental/saiexperimentaldasheni.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,15 @@ typedef enum _sai_eni_attr_t
*/
SAI_ENI_ATTR_OUTBOUND_V6_STAGE5_DASH_ACL_GROUP_ID,

/**
* @brief Action set_eni_attrs parameter DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_ENI_ATTR_DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION,

/**
* @brief End of attributes
*/
Expand All @@ -443,6 +452,19 @@ typedef enum _sai_eni_attr_t

} sai_eni_attr_t;

/**
* @brief Counter IDs for eni in sai_get_eni_stats() call
*/
typedef enum _sai_eni_stat_t
{
/** DASH eni LB_FAST_PATH_ICMP_IN_BYTES stat count */
SAI_ENI_STAT_LB_FAST_PATH_ICMP_IN_BYTES,

/** DASH eni LB_FAST_PATH_ICMP_IN_PACKETS stat count */
SAI_ENI_STAT_LB_FAST_PATH_ICMP_IN_PACKETS,

} sai_eni_stat_t;

/**
* @brief Create dash_eni_eni_ether_address_map_entry
*
Expand Down Expand Up @@ -590,6 +612,54 @@ typedef sai_status_t (*sai_get_eni_attribute_fn)(
_In_ uint32_t attr_count,
_Inout_ sai_attribute_t *attr_list);

/**
* @brief Get eni statistics counters. Deprecated for backward compatibility.
*
* @param[in] eni_id Entry id
* @param[in] number_of_counters Number of counters in the array
* @param[in] counter_ids Specifies the array of counter ids
* @param[out] counters Array of resulting counter values.
*
* @return #SAI_STATUS_SUCCESS on success, failure status code on error
*/
typedef sai_status_t (*sai_get_eni_stats_fn)(
_In_ sai_object_id_t eni_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_Out_ uint64_t *counters);

/**
* @brief Get eni statistics counters extended.
*
* @param[in] eni_id Entry id
* @param[in] number_of_counters Number of counters in the array
* @param[in] counter_ids Specifies the array of counter ids
* @param[in] mode Statistics mode
* @param[out] counters Array of resulting counter values.
*
* @return #SAI_STATUS_SUCCESS on success, failure status code on error
*/
typedef sai_status_t (*sai_get_eni_stats_ext_fn)(
_In_ sai_object_id_t eni_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_In_ sai_stats_mode_t mode,
_Out_ uint64_t *counters);

/**
* @brief Clear eni statistics counters.
*
* @param[in] eni_id Entry id
* @param[in] number_of_counters Number of counters in the array
* @param[in] counter_ids Specifies the array of counter ids
*
* @return #SAI_STATUS_SUCCESS on success, failure status code on error
*/
typedef sai_status_t (*sai_clear_eni_stats_fn)(
_In_ sai_object_id_t eni_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids);

typedef struct _sai_dash_eni_api_t
{
sai_create_eni_ether_address_map_entry_fn create_eni_ether_address_map_entry;
Expand All @@ -603,6 +673,9 @@ typedef struct _sai_dash_eni_api_t
sai_remove_eni_fn remove_eni;
sai_set_eni_attribute_fn set_eni_attribute;
sai_get_eni_attribute_fn get_eni_attribute;
sai_get_eni_stats_fn get_eni_stats;
sai_get_eni_stats_ext_fn get_eni_stats_ext;
sai_clear_eni_stats_fn clear_eni_stats;
sai_bulk_object_create_fn create_enis;
sai_bulk_object_remove_fn remove_enis;

Expand Down
12 changes: 12 additions & 0 deletions experimental/saiportextensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ typedef enum _sai_port_stat_extensions_t
{
SAI_PORT_STAT_EXTENSIONS_RANGE_START = SAI_PORT_STAT_END,

/** DASH port LB_FAST_PATH_ICMP_IN_BYTES stat count */
SAI_PORT_STAT_LB_FAST_PATH_ICMP_IN_BYTES = SAI_PORT_STAT_EXTENSIONS_RANGE_START,

/** DASH port LB_FAST_PATH_ICMP_IN_PACKETS stat count */
SAI_PORT_STAT_LB_FAST_PATH_ICMP_IN_PACKETS,

Choose a reason for hiding this comment

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

is this to count number of icmp_redirect packets, or just icmp packets??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these counters are specific to LB fast path ICMP packets, not regular ICMP packets or regular ICMP redirect packets that we might not care, e.g. IPv6 ICMP packets with non-zero payload size.


/** DASH port LB_FAST_PATH_ENI_MISS_BYTES stat count */
SAI_PORT_STAT_LB_FAST_PATH_ENI_MISS_BYTES,

Choose a reason for hiding this comment

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

What do ENI miss bytes indicate?

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Please confirm if these are DPU level counters. e.g., if a packet if given to a DPU due to PA match, but no ENI match happened once it hits DPU and packet is dropped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, these are DPU level counters. and yes, it is designed to capture the exact case you are referring to. In this case, nothing will show up on ENI counters. With this counter, we will know what there are valid fast path packets gets dropped, because ENI cannot be found.


/** DASH port LB_FAST_PATH_ENI_MISS_PACKETS stat count */
SAI_PORT_STAT_LB_FAST_PATH_ENI_MISS_PACKETS,

/* Add new experimental port stats above this line */

SAI_PORT_STAT_EXTENSIONS_RANGE_END
Expand Down