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

Chris Mi cmi at nvidia.com
Mon Sep 14 10:05:26 UTC 2020


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 at nvidia.com>
Reviewed-by: Eli Britstein <elibr at nvidia.com>
---
 utilities/ovs-kmod-ctl.in | 9 +++++++++
 1 file changed, 9 insertions(+)

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 () {
-- 
2.21.1



More information about the dev mailing list