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

VxLAN Tunnel Counters and Rates implementation #1859

Merged
merged 19 commits into from
Nov 1, 2021

Conversation

dgsudharsan
Copy link
Collaborator

What I did
Implemented counters and rates for VxLAN.

Why I did it
To display vxlan counters and to enable counterpoll for tunnel counters.

How I verified it
Verified using vs tests

Details if related
Added a generic directory structure for flex counter manager. Currently tunnel counters are written for VxLAN but in future it might be expanded to other tunnels which might use the same flex counter infra.

@lgtm-com
Copy link

lgtm-com bot commented Aug 7, 2021

This pull request introduces 1 alert when merging b083c41 into df96059 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@@ -511,6 +524,11 @@ bool VxlanTunnel::createTunnel(MAP_T encap, MAP_T decap, uint8_t encap_ttl)

ids_.tunnel_id = create_tunnel(&ids_, ip, NULL, gUnderlayIfId, false, encap_ttl);

if (ids_.tunnel_id != SAI_NULL_OBJECT_ID)
Copy link
Contributor

Choose a reason for hiding this comment

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

There could be race conditions at syncd as the create_tunnel call is through the ASIC_DB whereas the addTunnelToFlexCounter is through COUNTER DB.
Please look at intfsorch::doTask where there is a check for the VID to RID of the tunnel object before adding the flex counters to the counter db.

Copy link
Collaborator Author

@dgsudharsan dgsudharsan Oct 16, 2021

Choose a reason for hiding this comment

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

This check in intfsorch is added 2 years back. I don't see such check in other orchs with FC. Is this assumption still valid that VIDTORID will not be instantly available?
#765
@kcudnik @prsunny Please clarify

Copy link
Contributor

Choose a reason for hiding this comment

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

yea, it will not be instantly available, only after apply_view command

@@ -885,6 +907,11 @@ bool VxlanTunnel::createTunnelHw(uint8_t mapper_list, tunnel_map_use_t map_src,

ids_.tunnel_id = create_tunnel(&ids_, &ips, ip, gUnderlayIfId, p2p);

if (ids_.tunnel_id != SAI_NULL_OBJECT_ID)
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as for P2MP tunnel regarding the race condition

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

@srj102 I have addressed your comments. Can you please review and sign off?

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 9f30ca1 into sonic-net:master Nov 1, 2021
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…nic-net#1859)

Fix sonic-net/sonic-buildimage#8888

Warn user to save the config instead of saving the kdump config
in config_db.json under the covers. Having more than one actors
operate on config_db.json can result in an exception.
dgsudharsan added a commit to dgsudharsan/sonic-swss that referenced this pull request Jun 30, 2022
dgsudharsan added a commit to dgsudharsan/sonic-swss that referenced this pull request Aug 26, 2022
* Tunnel stats support

Fixing constructor in vxlantunnelorch

Fixing build issue

Increase polling intervals for tunnel to 10s
prsunny pushed a commit that referenced this pull request Sep 13, 2022
@dgsudharsan dgsudharsan deleted the evpn_vlan_tun_cntrs branch March 9, 2023 02:00
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.

5 participants