[sflow]: backport psample and act_sample drivers, needed for sonic-vs platform #94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport psample and act_sample drivers to sonic linux kernel 4.9.
Both psample and act_sample are needed for sflow feature.
psample driver is needed for collecting samples from the interfaces at the kernel level.
act_sample driver is needed for the 'tc' command to be able to program the sampling configurations into the interfaces at the kernel level.
psample and act_sample drivers are not back-ported yet to the linux kernel version that sonic-linux-kernel is using. Hence, I have taken the patches for both the drivers and included it in our sonic kernel.
How to verify it
Using Build infrastructure changes to support sflow docker and utilities sonic-buildimage#3251 changes, build a sonic image
This step would include the psample and act_sample drivers into the sonic-linux-kernel.
Also, it would install the psample.ko and act_sample.ko in a sonic-vs target at the start-up time.
Using sonic-utilities: Add support for sFlow sonic-utilities#592 changes, use the CLIs to configure sflow globally and on a port.
Thereafter, use the show CLI to verify the config changes made.
Pump traffic into the port where sampling is configured.
Kernel would generate NETLINK messages, containing the packet samples, and send them to the hsflowd daemon. At hsflowd side, we would be able to see the incoming packet samples.
Description for the changelog
packet sampling in the vs environment
for the 'tc' command
Signed-off-by: Rakesh Datta [email protected]