Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Bulk Stats API #1352

Merged
merged 9 commits into from
Jan 15, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
24 changes: 24 additions & 0 deletions inc/saiobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,30 @@ sai_status_t sai_query_stats_capability(
_In_ sai_object_type_t object_type,
_Inout_ sai_stat_capability_list_t *stats_capability);

/**
* @brief Bulk objects get statistics.
*
* @param[in] switch_id SAI Switch object id
* @param[in] object_type Object type
* @param[in] object_count Number of objects to get the stats
* @param[in] object_key List of object keys
* @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
JaiOCP marked this conversation as resolved.
Show resolved Hide resolved
*
* @return #SAI_STATUS_SUCCESS on success, failure status code on error
JaiOCP marked this conversation as resolved.
Show resolved Hide resolved
*/
typedef sai_status_t (*sai_bulk_object_get_stats_fn)(
_In_ sai_object_id_t switch_id,
_In_ sai_object_type_t object_type,
_In_ uint32_t object_count,
_In_ const sai_object_key_t *object_key,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_In_ sai_stats_mode_t mode,
JaiOCP marked this conversation as resolved.
Show resolved Hide resolved
_Out_ uint64_t *counters);
JaiOCP marked this conversation as resolved.
Show resolved Hide resolved
JaiOCP marked this conversation as resolved.
Show resolved Hide resolved

/**
* @}
*/
Expand Down
1 change: 1 addition & 0 deletions meta/style.pm
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ sub CheckStatsFunction

return if $fname eq "sai_clear_port_all_stats_fn"; # exception
return if $fname eq "sai_get_tam_snapshot_stats_fn"; # exception
return if $fname eq "sai_bulk_object_get_stats_fn"; # exception

if (not $fname =~ /^sai_((get|clear)_(\w+)_stats|get_\w+_stats_ext)_fn$/)
{
Expand Down