[ovs-discuss] Inserting and using the compiled OVS kernel modules

Levente Csikor csikor at tmit.bme.hu
Thu Jan 3 14:32:54 UTC 2019

Dear All,

I am trying to use OVS kernel module that can be compiled from the OVS
source instead of the built-in openvswitch module provided by the
Besides some certificate/signing issues (newer kernels do not allow
inserting third-party modules if they are not signed by the vendor), I
finally managed (with self-signed certificates) to load the compiled
openvswitch.ko module located under OVS_SOURCE/datapath/linux/.

I am using Ubuntu 18.04, linux kernel 4.15.0-32-generic with
openvswitch-2.10.0 from source (2.9.x did not even compile on my

Once the module is loaded via insmod, dmesg says it is loaded
"correctly" (even the version is shown - when the stock kernel module
is loaded via modprobe, no version information is shown):
[ 2833.903781] openvswitch: Open vSwitch switching datapath 2.10.0

Then, I manually initialize and start OVS with the following commands
(environment variables are pointing to the binaries in the OVS source

1) sudo rm -rf /usr/local/etc/openvswitch/conf.db 2>&1

2) sudo mkdir -p /usr/local/etc/openvswitch/

3) sudo $OVSDB_PATH/ovsdb-tool create
/usr/local/etc/openvswitch/conf.db  $OVSVSWITCHD_PATH/vswitch.ovsschema

4) sudo mkdir -p /usr/local/var/run/openvswitch

5) sudo $OVSDB_PATH/ovsdb-server --
remote=punix:/usr/local/var/run/openvswitch/db.sock --
remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach

6) sudo $OVSUTILITIES_PATH/ovs-vsctl --no-wait init

7) export DB_SOCK=/usr/local/var/run/openvswitch/db.sock

8) sudo $OVSVSWITCHD_PATH/ovs-vswitchd unix:$DB_SOCK --pidfile --detach

After these command OVS is initialized and started (at least the
vswitchd) and now I can create a bridge and add ports to it, etc.
However, right after the last command (8), in the output of dmesg I
have realized the following strange line:

[ 2975.940723] openvswitch: Open vSwitch switching datapath

Now, I am a bit confused :S
Did ovs-vswitchd command automatically (re)load the kernel module
provided by the stock kernel and replace my previous inserted module
compiled from the OVS source?

For debuggin, how can I check the info of the loaded module - I cannot
find any useful tool/command for this?
(Command modinfo only prints out the info of the module specified as
its arguments, i.e., openvswitch |

Thank you for considering my request.


More information about the discuss mailing list