[ovs-dev] Unable to rmmod openvswitch kernel module

Jesse Gross jesse at kernel.org
Mon Mar 14 21:11:55 UTC 2016


On Mon, Mar 14, 2016 at 1:55 PM, William Tu <u9012063 at gmail.com> wrote:
> Hi Jesse,
>
> Thanks! It works... although I don't quite understand why.
>
> [root at vm-dev ovs]# ovs-appctl -t ovs-vswitchd exit
> [root at vm-dev ovs]# ovs-appctl -t ovsdb-server exit
> [root at vm-dev ovs]# lsmod | grep open
> openvswitch           155648  4    ----> still 4
>
> [root at vm-dev ovs]# ovs-dpctl del-dp system at ovs-system
> [root at vm-dev ovs]# lsmod | grep open
> openvswitch           155648  0   -----> become 0
>
> [root at vm-dev ovs]# rmmod openvswitch

I realized that OVS must be taking references on itself during
ovs_vport_add() for system ports - this is really intended to protect
the vport-* modules but vport-netdev and vport-system are built into
the main OVS module.

We could check if ops->owner is the same as the current module and
skip taking a reference if it is. That might be a small improvement
but you'll still need to delete any ports in the event that you are
using tunnels.



More information about the dev mailing list