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

sFlow inserted twice on same graph arc? #2

Closed
sflow opened this issue Sep 12, 2024 · 3 comments
Closed

sFlow inserted twice on same graph arc? #2

sflow opened this issue Sep 12, 2024 · 3 comments

Comments

@sflow
Copy link
Owner

sflow commented Sep 12, 2024

We need to make sure that enabling sFlow on an interface twice does not insert the sampling node into the graph twice.

@pimvanpelt
Copy link
Collaborator

pimvanpelt commented Sep 12, 2024

I can confirm this does happen. If we:

sflow enable-disable TenGigabitEthernet130/0/0
sflow enable-disable TenGigabitEthernet130/0/0
sflow enable-disable TenGigabitEthernet130/0/0
sflow enable-disable TenGigabitEthernet130/0/0

We will receive 4x the samples on the PSAMPLE netlink channel.

One way to detect this is to mark an interface as enabled (see #3 for more on this) and if it's enabled, refused to add the feature again on https://github.com/sflow/vpp-sflow/blame/main/sflow/sflow.c#L322

@sflow
Copy link
Owner Author

sflow commented Sep 12, 2024

I believe this issue is addressed by the latest commit, which introduces per-interface data in sflow-main and uses it to gate the enable_disable config changes.
2684082

@pimvanpelt
Copy link
Collaborator

Confirmed - we only call vnet_feature_enable_disable() at most once now per interface.

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

No branches or pull requests

2 participants