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 High Level Design #389

Merged
merged 9 commits into from
Aug 6, 2019
Merged

Conversation

padmanarayana
Copy link
Contributor

This document describes the high level design of sFlow in SONiC.


### Not planned to be supported:
1. sFlow enable/disable option interface level as well as global level.
2. sFlow configuration at interface level.
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we have such limitation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated HLD. This will be supported.

; Defines schema for SFLOW_TABLE table which contains parameters that need to be set for sFlow
key = SFLOW_TABLE:sflow
; field = value
sampling_rate = 1*5DIGIT ; 1 / (sflow sampling rate as a percentage of bandwidth)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is unclear to me. what does 1 mean here? does it mean we sample every packet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update definition of sampling rate (it is as per the SAI definition).



### **Phase II:**
1. sFlow should be supported on portchannel interfaces.
Copy link
Contributor

Choose a reason for hiding this comment

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

do you support break-out interfaces? Is there any hsflowd limitation to support breakouts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

break-out interfaces are not currently supported.

* The host-sflow package will be built with the mod_sonic callback implementations using the FEATURES="SONIC" option

## 9 **Restrictions**
* /etc/hsflowd.conf should not be modified manually. While it should be possible to change /etc/hsflowd.conf manually and restart the sflow container, it is not recommended.
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any hsflowd/InMon license implications? Community interested to learn on the implications if any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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


#### hsflowd service

hsflowd provides an module adaptation layer for interfacing with the NOS. In the host-sflow repo, a src/Linux/mod_sonic.c adaption layer will be provided for hsflowd APIs to SONiC that deal with hsflowd initialization, configuration changes, packet sample consumption etc. More specifically, SONiC will register and provide callbacks for the following HSP events:
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the configurations need to expose hsflowd/InMon ? If user wanted to expose some custom configuration such as sampling rate what is the strategy, where do maintain the custom configurations? is it in SONiC Repo or hsflowd/InMon Repos?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Collector and agent specific configurations are available in the configDB and host-sflow will have a mod_sonic that is customised to interact with SONiC (essentially query the DB). If there are new customizations, we publish the changes in SONiC schema and mod_sonic will have to be updated (in host-sflow repo) to provide the necessary functionality.

@prsunny prsunny merged commit dc69158 into sonic-net:master Aug 6, 2019
@kefins
Copy link

kefins commented Sep 22, 2020

Netlink message can not be received by hsflowd, and the psamle driver returns -ESRCH while broadcasting message to userspace by genlmsg_multicast_netns, can anybody give some advice?

@prsunny
Copy link
Contributor

prsunny commented Sep 22, 2020

Netlink message can not be received by hsflowd, and the psamle driver returns -ESRCH while broadcasting message to userspace by genlmsg_multicast_netns, can anybody give some advice?

Can you please raise an issue to sonic-builidimage? Also with configs/step to reproduce etc.

@kefins
Copy link

kefins commented Sep 23, 2020

Netlink message can not be received by hsflowd, and the psamle driver returns -ESRCH while broadcasting message to userspace by genlmsg_multicast_netns, can anybody give some advice?

Can you please raise an issue to sonic-builidimage? Also with configs/step to reproduce etc.

Thank you for replying, finally I solved the problem, which was caused by the network mode of sflow docker. After restarting sflow docker with host network mode, everything went well, thanks again.

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