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

Gregory Rose gvrose8192 at gmail.com
Thu Jan 3 21:34:52 UTC 2019


On 1/3/2019 1:15 PM, csikor wrote:
> hi, thanks for the hints.
> I would like to keep the original kernel module as well as it seems 
> the stock kernel modules and the ones from the ovs source do not work 
> completely the same.
> If I do the make modules_install will i lose the basic kernel module 
> (without doing some mumbo-jumbos, e.g., rename the kernel module in 
> /lib/modules/...)?
>
> Thanks
>
>

You will not lose the original kernel module, instead the depmod utility 
will point to the newer kernel
module that you just installed.  To go back to using the original 
built-in openvswitch kernel module you
would have to remove the newly installed kernel modules and then run 
'depmod -a' again.

- Greg

>
> Sent from my Redmi Note 4
> On Gregory Rose <gvrose8192 at gmail.com>, 3 Jan 2019 5:51 pm wrote:
>
>
>     On 1/3/2019 6:32 AM, Levente Csikor wrote:
>     > 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
>     > kernel.
>     > 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
>     > system).
>     >
>     > 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
>
>     Did you run 'sudo make modules_install'?  You shouldn't have to use
>     insmod. The 'modprobe' utility should
>     load the correct kernel module.
>
>     >
>     > Then, I manually initialize and start OVS with the following
>     commands
>     > (environment variables are pointing to the binaries in the OVS
>     source
>     > directory):
>     >
>     > 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?
>
>     Run 'cat /sys/module/openvswitch/version' and that should give you
>     output like this:
>
>     # cat /sys/module/openvswitch/version
>     2.10.1
>
>     - Greg
>
>     _______________________________________________
>     discuss mailing list
>     discuss at openvswitch.org <mailto:discuss at openvswitch.org>
>     https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190103/f0bce2c8/attachment-0001.html>


More information about the discuss mailing list