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

High level design for route flow counter #908

Merged
merged 7 commits into from Feb 13, 2022

Conversation

Junchao-Mellanox
Copy link
Contributor

@Junchao-Mellanox Junchao-Mellanox commented Dec 6, 2021

High level design for route flow counters support.

Flow counters are usually used for debugging, troubleshooting and performance enhancement processes. Flow counters could cover cases like:

  • Routes matching the configured prefix pattern (number of hits and number of bytes)
  • Host interface traps (number of received traps per Trap ID)
  • FDB entries matching the configured VXLAN tunnel or using the VLAN ID as pattern
  • Next-Hop/Next-Hop Group/Next-Hop Group Member

This document focus on route flow counter.

PR title state context
[sonic-swss] Add support for route flow counter GitHub issue/pull request detail GitHub pull request check contexts
[sonic-utilities] Add CLI for route flow counter feature GitHub issue/pull request detail GitHub pull request check contexts
[sonic-utilities] [Command-Reference] Add CLI docs for route flow counter GitHub issue/pull request detail GitHub pull request check contexts
[sonic-buildimage] [YANG] Add route flow counter support GitHub issue/pull request detail GitHub pull request check contexts
[sonic-mgmt] Add route flow counter related test cases GitHub issue/pull request detail GitHub pull request check contexts

@prsunny prsunny requested a review from shi-su December 9, 2021 18:47
doc/flow_counters/routes_flow_counters.md Outdated Show resolved Hide resolved
doc/flow_counters/routes_flow_counters.md Outdated Show resolved Hide resolved
Example:

```
127.0.0.1:6379[4]> hgetall FLEX_COUNTER_TABLE|FLOW_CNT_ROUTE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use 'global' key instead of FLOW_CNT_ROUTE to be consistent with other tables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean by 'global' key?

Copy link
Collaborator

Choose a reason for hiding this comment

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

FLEX_COUNTER_TABLE|global

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Polling interval configuration:

```
counterpoll flowcnt-route interval <time_in_msec> // default - 1000ms
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hope we'll generate the Click commands using auto generation tool (#780)

Copy link
Collaborator

Choose a reason for hiding this comment

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

as long as there is a yang module for it you ca use the auto generation tool. but it is not done via the build system.
it will be invoked manually and added like it was coded :-). if this is what you mean that we are aligned and comment can be resolved.

@liat-grozovik
Copy link
Collaborator

@shi-su and @venkatmahalingam could you please review recent updates following your feedback?

@liat-grozovik
Copy link
Collaborator

@venkatmahalingam and @shi-su any further comment on this HLD or we can signoff?

@liat-grozovik
Copy link
Collaborator

@venkatmahalingam and @shi-su please take a moment to review the recent changes and if all good, please approve.
I assume if no further comments to this PR I can merge it by end of this week. Thanks.

@liat-grozovik liat-grozovik merged commit 768a897 into sonic-net:master Feb 13, 2022
liat-grozovik pushed a commit to sonic-net/sonic-utilities that referenced this pull request Apr 18, 2022
HLD: sonic-net/SONiC#908
Command reference : #2069

- What I did
Add CLIs for route flow counter feature

- How I did it
Add show command show flowcnt-route config and command group show flowcnt-route stats
Add config command group config flowcnt-route pattern
Add clear command group sonic-clear flowcnt-route

- How to verify it
1.  Full unit test cover
2.  Manual test
3. sonic-mgmt test cases
liat-grozovik pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Jun 7, 2022
Added test cases for route flow counter feature. HLD: sonic-net/SONiC#908

- What is the motivation for this PR?
Add route flow counter related test cases

- How did you do it?
1. Add new test case file test_route_flow_counter.py to covers basic function of this feature
2. Add check in test_vnet_vxlan.py to cover VNET route
3. Add check in test_bgp_speaker.py to cover BGP route
4. Add check in test_static_route.py to cover static route

- How did you verify/test it?
Run the test cases
@Junchao-Mellanox Junchao-Mellanox deleted the route-flow-counter branch June 13, 2022 05:27
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
HLD: sonic-net/SONiC#908
Command reference : sonic-net/sonic-utilities#2069

- What I did
Add CLIs for route flow counter feature

- How I did it
Add show command show flowcnt-route config and command group show flowcnt-route stats
Add config command group config flowcnt-route pattern
Add clear command group sonic-clear flowcnt-route

- How to verify it
1.  Full unit test cover
2.  Manual test
3. sonic-mgmt test cases
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.

None yet

5 participants