Skip to content

Commit

Permalink
Add psample and act_sample drivers (#94)
Browse files Browse the repository at this point in the history
What I did
Backport psample and act_sample drivers to sonic linux kernel 4.9.

How I did it
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.


Signed-off-by: Rakesh Datta <rakesh.datta@dell.com>
  • Loading branch information
Rakesh Datta authored and lguohan committed Aug 10, 2019
1 parent 15f8651 commit feb786b
Show file tree
Hide file tree
Showing 4 changed files with 1,025 additions and 0 deletions.
27 changes: 27 additions & 0 deletions patch/kernel-enable-psample-and-act_sample-drivers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From: Rakesh Datta <rakesh_datta@dell.com>
Date: Thu, 27 Jun 2019 11:07:08 +0100
Subject: [PATCH] net: Introduce psample and sample modules - adding the below config:

CONFIG_PSAMPLE=m
CONFIG_NET_ACT_SAMPLE=m

Signed-off-by: Rakesh Datta <rakesh_datta@dell.com>
---
debian/build/build_amd64_none_amd64/.config | 2 +
1 file changed, 2 insertion(+)

diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config
index db2a5c1..9851a0c 100644
--- a/debian/build/build_amd64_none_amd64/.config
+++ b/debian/build/build_amd64_none_amd64/.config
@@ -47,6 +47,8 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_PSAMPLE=m
+CONFIG_NET_ACT_SAMPLE=m

#
# General setup
--
2.7.4
Loading

0 comments on commit feb786b

Please sign in to comment.