datapath: Turn vports with dependencies into separate modules
authorThomas Graf <tgraf@noironetworks.com>
Sat, 4 Apr 2015 06:24:13 +0000 (08:24 +0200)
committerThomas Graf <tgraf@noironetworks.com>
Sat, 4 Apr 2015 06:24:44 +0000 (08:24 +0200)
commit5a38795f5e6623b39004b53c7fede08399a09d79
treed20898518d92de89ad0d266f66a790aa8b7f9a54
parent416e71322f82beea869b2e5928be5ae60f2577de
datapath: Turn vports with dependencies into separate modules

Upstream commit:
    The internal and netdev vport remain part of openvswitch.ko. Encap
    vports including vxlan, gre, and geneve can be built as separate
    modules and are loaded on demand. Modules can be unloaded after use.
    Datapath ports keep a reference to the vport module during their
    lifetime.

    Allows to remove the error prone maintenance of the global list
    vport_ops_list.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Also folds in the follow-up commits 9ba559d9ca3 to turned the non-GPL
symbol exports to GPL exports, and fa2d8ff4e35 which fixes a module
reference release bug.

Exports various backwards compat functions linked into the main
openvswitch module as GPL symbols to ensure vport modules can use them.

Some fiddling with the Makefile was needed to work around the fact
that Makefile variables can't contain '-' characters needed to define
'vport-xxx' module sources. Also, Kbuild complains heavily if a
$(module)-y = $(module).o is defined which is actually backed with a .c
file of the same name. Therefore, a new $(build_multi_modules) variable
is defined which lists all module which consist of more than one source
file.

Upstream: 62b9c8d0372 ("ovs: Turn vports with dependencies into separate modules")
Upstream: 9ba559d9ca3 ("openvswitch: Export symbols as GPL symbols.")
Upstream: fa2d8ff4e35 ("openvswitch: Return vport module ref before destruction")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
18 files changed:
datapath/Modules.mk
datapath/datapath.c
datapath/linux/Kbuild.in
datapath/linux/compat/flow_dissector.c
datapath/linux/compat/geneve.c
datapath/linux/compat/gre.c
datapath/linux/compat/ip_tunnels_core.c
datapath/linux/compat/udp_tunnel.c
datapath/linux/compat/vxlan.c
datapath/vport-geneve.c
datapath/vport-gre.c
datapath/vport-internal_dev.c
datapath/vport-lisp.c
datapath/vport-netdev.c
datapath/vport-netdev.h
datapath/vport-vxlan.c
datapath/vport.c
datapath/vport.h