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

[PATCH v6] api: tm: add queue specific statistics counters #1305

Merged
merged 4 commits into from
Jul 12, 2021

Conversation

MatiasElo
Copy link
Collaborator

@MatiasElo MatiasElo commented Jun 4, 2021

Add traffic manager queue specific statistics counters
(odp_tm_queue_stats_t) and matching capabilities
(odp_tm_stats_capability_t). Statistics counters can be reset with
odp_tm_queue_stats_reset() function and read with odp_tm_queue_stats().

V2:

  • Removed odp_tm_queue_stats_reset()

V3:

  • Renamed odp_tm_stats_capability_t -> odp_tm_queue_stats_capability_t
  • Added implementation and validation test

V4:

  • Added odp_tm_queue_stats_t.discard_octets and odp_tm_queue_stats_t.discard_packets

V5:

  • Renamed odp_tm_queue_stats_t.discard_packets to odp_tm_queue_stats_t.discards

@odpbuild odpbuild changed the title api: tm: add queue specific statistics counters [PATCH v1] api: tm: add queue specific statistics counters Jun 4, 2021
@odpbuild odpbuild changed the title [PATCH v1] api: tm: add queue specific statistics counters [PATCH v2] api: tm: add queue specific statistics counters Jun 8, 2021
@JannePeltonen
Copy link
Collaborator

This probably needs to be harmonized with the statistics proposed in PR 1237.

Maybe the statistics to be enabled should be configurable so that they do not need to be tracked when not needed.

@odpbuild odpbuild changed the title [PATCH v2] api: tm: add queue specific statistics counters [PATCH v3] api: tm: add queue specific statistics counters Jul 5, 2021

/** Number of packets discarded due to other reasons (e.g. aging) than
* errors. */
uint64_t discards;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Discarded octets counter will be added.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in V4

@odpbuild odpbuild changed the title [PATCH v3] api: tm: add queue specific statistics counters [PATCH v4] api: tm: add queue specific statistics counters Jul 7, 2021
Copy link
Contributor

@nithind1988 nithind1988 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

* @param odp_tm Odp_tm is used to identify the TM system into which this
* odp_tm_node object is created.
* @param tm Handle of the TM system into which this odp_tm_node object is
* created.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Original text has copy-paste error from create call - this is lookup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in V5


/** Number of packets discarded due to other reasons (e.g. aging) than
* errors. */
uint64_t discard_packets;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be simply "discards" as in other APIs. If other APIs add discard_octets later, we have the same logic in all APIs (discards + discard_octets)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in V5

uint64_t discard_packets;

/** Number of packets which transmission errors. */
uint64_t errors;
Copy link
Collaborator

Choose a reason for hiding this comment

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

type: ... with ....

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in V5

@odpbuild odpbuild changed the title [PATCH v4] api: tm: add queue specific statistics counters [PATCH v5] api: tm: add queue specific statistics counters Jul 9, 2021
MatiasElo added 4 commits July 9, 2021 17:26
Fix typos and style issues and  make variable naming more consistent in
the traffic manager API documentation.

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
Reviewed-by: Nithin Dabilpuram <[email protected]>
Add traffic manager queue specific statistics counters
(odp_tm_queue_stats_t) and matching capabilities
(odp_tm_queue_stats_capability_t). Statistics counters can be read with
odp_tm_queue_stats() function.

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
Reviewed-by: Nithin Dabilpuram <[email protected]>
Add implementation for the new odp_tm_queue_stats() function.

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
Add validation test for the new TM queue statistics APIs.

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
@odpbuild odpbuild changed the title [PATCH v5] api: tm: add queue specific statistics counters [PATCH v6] api: tm: add queue specific statistics counters Jul 9, 2021
@MatiasElo MatiasElo merged commit 3e43457 into OpenDataPlane:master Jul 12, 2021
@MatiasElo MatiasElo deleted the dev/stats_tm branch July 12, 2021 06:18
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.

4 participants