diff mbox series

[ovs-dev,1/8] ovs-kmod-ctl: Load kernel module psample

Message ID 20200914100533.9395-2-cmi@nvidia.com
State Changes Requested
Headers show
Series Add offload support for sFlow | expand

Commit Message

Chris Mi Sept. 14, 2020, 10:05 a.m. UTC
Load kernel module psample to receive sampled packets from TC.
Before removing kernel module psample, remove act_sample first.

Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Eli Britstein <elibr@nvidia.com>
---
 utilities/ovs-kmod-ctl.in | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/utilities/ovs-kmod-ctl.in b/utilities/ovs-kmod-ctl.in
index 19f100964..1ca44fa33 100644
--- a/utilities/ovs-kmod-ctl.in
+++ b/utilities/ovs-kmod-ctl.in
@@ -30,6 +30,9 @@  done
 insert_mods () {
     # Try loading openvswitch kernel module.
     action "Inserting openvswitch module" modprobe openvswitch
+
+    # Try loading psample kernel module.
+    action "Inserting psample module" modprobe psample
 }
 
 insert_kmods_if_required() {
@@ -95,6 +98,12 @@  remove_kmods() {
     if test -e /sys/module/vxlan; then
         action "Forcing removal of vxlan module" rmmod vxlan
     fi
+    if test -e /sys/module/act_sample; then
+        action "Forcing removal of act_sample module" rmmod act_sample
+    fi
+    if test -e /sys/module/psample; then
+        action "Forcing removal of psample module" rmmod psample
+    fi
 }
 
 usage () {