mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 13:58:14 +00:00
datapath: omit _mod from module names
This renames the datapath modules: openvswitch_mod -> openvswitch brcompat_mod -> brcompat The first makes the module name consistent with upstream, and the latter is just for internal consistency. This makes tools, and documentation refer to a common module name regardless if it's coming from upstream linux or built from datapath/ as part of a local build. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
committed by
Jesse Gross
parent
12bb621f56
commit
9b80f761be
@@ -194,16 +194,16 @@ Prerequisites section, follow the procedure below to build.
|
|||||||
|
|
||||||
6. If you built kernel modules, you may load them with "insmod", e.g.:
|
6. If you built kernel modules, you may load them with "insmod", e.g.:
|
||||||
|
|
||||||
% insmod datapath/linux/openvswitch_mod.ko
|
% insmod datapath/linux/openvswitch.ko
|
||||||
|
|
||||||
You may need to specify a full path to insmod, e.g. /sbin/insmod.
|
You may need to specify a full path to insmod, e.g. /sbin/insmod.
|
||||||
To verify that the modules have been loaded, run "/sbin/lsmod" and
|
To verify that the modules have been loaded, run "/sbin/lsmod" and
|
||||||
check that openvswitch_mod is listed.
|
check that openvswitch is listed.
|
||||||
|
|
||||||
If the "insmod" operation fails, look at the last few kernel log
|
If the "insmod" operation fails, look at the last few kernel log
|
||||||
messages (e.g. with "dmesg | tail"):
|
messages (e.g. with "dmesg | tail"):
|
||||||
|
|
||||||
- The message "openvswitch_mod: exports duplicate symbol
|
- The message "openvswitch: exports duplicate symbol
|
||||||
br_should_route_hook (owned by bridge)" means that the bridge
|
br_should_route_hook (owned by bridge)" means that the bridge
|
||||||
module is loaded. Run "/sbin/rmmod bridge" to remove it.
|
module is loaded. Run "/sbin/rmmod bridge" to remove it.
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ Prerequisites section, follow the procedure below to build.
|
|||||||
the kernel, rather than as a module. Open vSwitch does not
|
the kernel, rather than as a module. Open vSwitch does not
|
||||||
support this configuration (see "Build Requirements", above).
|
support this configuration (see "Build Requirements", above).
|
||||||
|
|
||||||
- The message "openvswitch_mod: exports duplicate symbol
|
- The message "openvswitch: exports duplicate symbol
|
||||||
dp_ioctl_hook (owned by ofdatapath)" means that the ofdatapath
|
dp_ioctl_hook (owned by ofdatapath)" means that the ofdatapath
|
||||||
module from the OpenFlow reference implementation is loaded.
|
module from the OpenFlow reference implementation is loaded.
|
||||||
Run "/sbin/rmmod ofdatapath" to remove it. (You might have to
|
Run "/sbin/rmmod ofdatapath" to remove it. (You might have to
|
||||||
@@ -222,10 +222,10 @@ Prerequisites section, follow the procedure below to build.
|
|||||||
|
|
||||||
- Otherwise, the most likely problem is that Open vSwitch was
|
- Otherwise, the most likely problem is that Open vSwitch was
|
||||||
built for a kernel different from the one into which you are
|
built for a kernel different from the one into which you are
|
||||||
trying to load it. Run "modinfo" on openvswitch_mod.ko and on
|
trying to load it. Run "modinfo" on openvswitch.ko and on
|
||||||
a module built for the running kernel, e.g.:
|
a module built for the running kernel, e.g.:
|
||||||
|
|
||||||
% /sbin/modinfo openvswitch_mod.ko
|
% /sbin/modinfo openvswitch.ko
|
||||||
% /sbin/modinfo /lib/modules/`uname -r`/kernel/net/bridge/bridge.ko
|
% /sbin/modinfo /lib/modules/`uname -r`/kernel/net/bridge/bridge.ko
|
||||||
|
|
||||||
Compare the "vermagic" lines output by the two commands. If
|
Compare the "vermagic" lines output by the two commands. If
|
||||||
@@ -235,7 +235,7 @@ Prerequisites section, follow the procedure below to build.
|
|||||||
module loading, please include the output from the "dmesg" and
|
module loading, please include the output from the "dmesg" and
|
||||||
"modinfo" commands mentioned above.
|
"modinfo" commands mentioned above.
|
||||||
|
|
||||||
There is an optional module parameter to openvswitch_mod.ko called
|
There is an optional module parameter to openvswitch.ko called
|
||||||
vlan_tso that enables TCP segmentation offload over VLANs on NICs
|
vlan_tso that enables TCP segmentation offload over VLANs on NICs
|
||||||
that support it. Many drivers do not expose support for TSO on VLANs
|
that support it. Many drivers do not expose support for TSO on VLANs
|
||||||
in a way that Open vSwitch can use but there is no way to detect
|
in a way that Open vSwitch can use but there is no way to detect
|
||||||
|
@@ -105,7 +105,7 @@ When Open vSwitch is installed on XenServer, its startup script
|
|||||||
/etc/init.d/openvswitch runs early in boot. It does roughly the
|
/etc/init.d/openvswitch runs early in boot. It does roughly the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
* Loads the OVS kernel module, openvswitch_mod.
|
* Loads the OVS kernel module, openvswitch.
|
||||||
|
|
||||||
* Starts ovsdb-server, the OVS configuration database.
|
* Starts ovsdb-server, the OVS configuration database.
|
||||||
|
|
||||||
|
@@ -34,9 +34,9 @@ kernel bridge module.
|
|||||||
|
|
||||||
2. Load the brcompat kernel module (which was built in step 1), e.g.:
|
2. Load the brcompat kernel module (which was built in step 1), e.g.:
|
||||||
|
|
||||||
% insmod datapath/linux/brcompat_mod.ko
|
% insmod datapath/linux/brcompat.ko
|
||||||
|
|
||||||
(openvswitch_mod.ko should already have been loaded.)
|
(openvswitch.ko should already have been loaded.)
|
||||||
|
|
||||||
3. Start ovs-brcompatd:
|
3. Start ovs-brcompatd:
|
||||||
|
|
||||||
|
2
NEWS
2
NEWS
@@ -1,5 +1,7 @@
|
|||||||
post-v1.6.0
|
post-v1.6.0
|
||||||
------------------------
|
------------------------
|
||||||
|
- kernel modules are renamed. openvswitch_mod.ko is now
|
||||||
|
openvswitch.ko and brcompat_mod.ko is now brcompat.ko.
|
||||||
|
|
||||||
|
|
||||||
v1.6.0 - xx xxx xxxx
|
v1.6.0 - xx xxx xxxx
|
||||||
|
@@ -523,7 +523,7 @@ static int __init brc_init(void)
|
|||||||
/* Set the bridge ioctl handler */
|
/* Set the bridge ioctl handler */
|
||||||
brioctl_set(brc_ioctl_deviceless_stub);
|
brioctl_set(brc_ioctl_deviceless_stub);
|
||||||
|
|
||||||
/* Set the openvswitch_mod device ioctl handler */
|
/* Set the openvswitch device ioctl handler */
|
||||||
ovs_dp_ioctl_hook = brc_dev_ioctl;
|
ovs_dp_ioctl_hook = brc_dev_ioctl;
|
||||||
|
|
||||||
/* Randomize the initial sequence number. This is not a security
|
/* Randomize the initial sequence number. This is not a security
|
||||||
@@ -572,7 +572,7 @@ MODULE_LICENSE("GPL");
|
|||||||
/*
|
/*
|
||||||
* In kernels 2.6.36 and later, Open vSwitch can safely coexist with
|
* In kernels 2.6.36 and later, Open vSwitch can safely coexist with
|
||||||
* the Linux bridge module, but it does not make sense to load both bridge and
|
* the Linux bridge module, but it does not make sense to load both bridge and
|
||||||
* brcompat_mod, so this prevents it.
|
* brcompat, so this prevents it.
|
||||||
*/
|
*/
|
||||||
BRIDGE_MUTUAL_EXCLUSION;
|
BRIDGE_MUTUAL_EXCLUSION;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -58,12 +58,12 @@ static inline void skb_clear_rxhash(struct sk_buff *skb)
|
|||||||
* exporting br_should_route_hook. Because the bridge module also exports the
|
* exporting br_should_route_hook. Because the bridge module also exports the
|
||||||
* same symbol, the module loader will refuse to load both modules at the same
|
* same symbol, the module loader will refuse to load both modules at the same
|
||||||
* time (e.g. "bridge: exports duplicate symbol br_should_route_hook (owned by
|
* time (e.g. "bridge: exports duplicate symbol br_should_route_hook (owned by
|
||||||
* openvswitch_mod)").
|
* openvswitch)").
|
||||||
*
|
*
|
||||||
* Before Linux 2.6.36, Open vSwitch cannot safely coexist with the Linux
|
* Before Linux 2.6.36, Open vSwitch cannot safely coexist with the Linux
|
||||||
* bridge module, so openvswitch_mod uses this macro in those versions. In
|
* bridge module, so openvswitch uses this macro in those versions. In
|
||||||
* Linux 2.6.36 and later, Open vSwitch can coexist with the bridge module, but
|
* Linux 2.6.36 and later, Open vSwitch can coexist with the bridge module,
|
||||||
* it makes no sense to load both bridge and brcompat_mod, so brcompat_mod uses
|
* but it makes no sense to load both bridge and brcompat, so brcompat uses
|
||||||
* this macro in those versions.
|
* this macro in those versions.
|
||||||
*
|
*
|
||||||
* The use of "typeof" here avoids the need to track changes in the type of
|
* The use of "typeof" here avoids the need to track changes in the type of
|
||||||
|
@@ -24,10 +24,10 @@ EXTRA_CFLAGS += -include $(builddir)/kcompat.h
|
|||||||
# right place, even though it's conceptually incorrect.
|
# right place, even though it's conceptually incorrect.
|
||||||
NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include
|
NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include
|
||||||
|
|
||||||
obj-m := $(patsubst %,%_mod.o,$(build_modules))
|
obj-m := $(patsubst %,%.o,$(build_modules))
|
||||||
|
|
||||||
define module_template
|
define module_template
|
||||||
$(1)_mod-y = $$(notdir $$(patsubst %.c,%.o,$($(1)_sources)))
|
$(1)-y = $$(notdir $$(patsubst %.c,%.o,$($(1)_sources)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach module,$(build_modules),$(eval $(call module_template,$(module))))
|
$(foreach module,$(build_modules),$(eval $(call module_template,$(module))))
|
||||||
|
@@ -29,7 +29,7 @@ check: all
|
|||||||
installcheck:
|
installcheck:
|
||||||
mostlyclean:
|
mostlyclean:
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.ko *_mod.* Module.symvers *.cmd kcompat.h.new
|
rm -f *.o *.ko *.mod.* Module.symvers *.cmd kcompat.h.new
|
||||||
for d in $(build_links); do if test -h $$d; then rm $$d; fi; done
|
for d in $(build_links); do if test -h $$d; then rm $$d; fi; done
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f kcompat.h
|
rm -f kcompat.h
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* We fix grp->id to 32 so that it doesn't collide with any of the multicast
|
/* We fix grp->id to 32 so that it doesn't collide with any of the multicast
|
||||||
* groups selected by openvswitch_mod, which uses groups 16 through 31.
|
* groups selected by openvswitch, which uses groups 16 through 31.
|
||||||
* Collision isn't fatal--multicast listeners should check that the family is
|
* Collision isn't fatal--multicast listeners should check that the family is
|
||||||
* the one that they want and discard others--but it wastes time and memory to
|
* the one that they want and discard others--but it wastes time and memory to
|
||||||
* receive unwanted messages. */
|
* receive unwanted messages. */
|
||||||
|
@@ -423,7 +423,7 @@ const struct vport_ops ovs_netdev_vport_ops = {
|
|||||||
* In kernels earlier than 2.6.36, Open vSwitch cannot safely coexist with the
|
* In kernels earlier than 2.6.36, Open vSwitch cannot safely coexist with the
|
||||||
* Linux bridge module, because there is only a single bridge hook function and
|
* Linux bridge module, because there is only a single bridge hook function and
|
||||||
* only a single br_port member in struct net_device, so this prevents loading
|
* only a single br_port member in struct net_device, so this prevents loading
|
||||||
* both bridge and openvswitch_mod at the same time.
|
* both bridge and openvswitch at the same time.
|
||||||
*/
|
*/
|
||||||
BRIDGE_MUTUAL_EXCLUSION;
|
BRIDGE_MUTUAL_EXCLUSION;
|
||||||
#endif
|
#endif
|
||||||
|
4
debian/dkms.conf.in
vendored
4
debian/dkms.conf.in
vendored
@@ -1,8 +1,8 @@
|
|||||||
PACKAGE_NAME="openvswitch"
|
PACKAGE_NAME="openvswitch"
|
||||||
PACKAGE_VERSION="__VERSION__"
|
PACKAGE_VERSION="__VERSION__"
|
||||||
MAKE="./configure --with-linux='${kernel_source_dir}' && make -C datapath/linux"
|
MAKE="./configure --with-linux='${kernel_source_dir}' && make -C datapath/linux"
|
||||||
BUILT_MODULE_NAME[0]=openvswitch_mod
|
BUILT_MODULE_NAME[0]=openvswitch
|
||||||
BUILT_MODULE_NAME[1]=brcompat_mod
|
BUILT_MODULE_NAME[1]=brcompat
|
||||||
BUILT_MODULE_LOCATION[0]=datapath/linux/
|
BUILT_MODULE_LOCATION[0]=datapath/linux/
|
||||||
BUILT_MODULE_LOCATION[1]=datapath/linux/
|
BUILT_MODULE_LOCATION[1]=datapath/linux/
|
||||||
DEST_MODULE_LOCATION[0]=/kernel/drivers/net/openvswitch/
|
DEST_MODULE_LOCATION[0]=/kernel/drivers/net/openvswitch/
|
||||||
|
@@ -282,8 +282,8 @@ from other errors that may occur when running the \fBstart\fR command.
|
|||||||
.
|
.
|
||||||
.PP
|
.PP
|
||||||
By default the \fBload\-kmod\fR command attempts to load the
|
By default the \fBload\-kmod\fR command attempts to load the
|
||||||
openvswitch_mod kernel module. If the \fB\-\-brcompat\fR option is
|
openvswitch kernel module. If the \fB\-\-brcompat\fR option is
|
||||||
specified then the brcompat_mod kernel module is also loaded.
|
specified then the brcompat kernel module is also loaded.
|
||||||
.
|
.
|
||||||
.SH "The ``enable\-protocol'' command"
|
.SH "The ``enable\-protocol'' command"
|
||||||
.
|
.
|
||||||
|
@@ -31,14 +31,15 @@ done
|
|||||||
## ----- ##
|
## ----- ##
|
||||||
|
|
||||||
insert_openvswitch_mod_if_required () {
|
insert_openvswitch_mod_if_required () {
|
||||||
# If openvswitch_mod is already loaded then we're done.
|
# If openvswitch is already loaded then we're done.
|
||||||
test -e /sys/module/openvswitch_mod && return 0
|
test -e /sys/module/openvswitch -o -e /sys/module/openvswitch_mod && \
|
||||||
|
return 0
|
||||||
|
|
||||||
# Load openvswitch_mod. If that's successful then we're done.
|
# Load openvswitch. If that's successful then we're done.
|
||||||
action "Inserting openvswitch module" modprobe openvswitch_mod && return 0
|
action "Inserting openvswitch module" modprobe openvswitch && return 0
|
||||||
|
|
||||||
# If the bridge module is loaded, then that might be blocking
|
# If the bridge module is loaded, then that might be blocking
|
||||||
# openvswitch_mod. Try to unload it, if there are no bridges.
|
# openvswitch. Try to unload it, if there are no bridges.
|
||||||
test -e /sys/module/bridge || return 1
|
test -e /sys/module/bridge || return 1
|
||||||
bridges=`echo /sys/class/net/*/bridge | sed 's,/sys/class/net/,,g;s,/bridge,,g'`
|
bridges=`echo /sys/class/net/*/bridge | sed 's,/sys/class/net/,,g;s,/bridge,,g'`
|
||||||
if test "$bridges" != "*"; then
|
if test "$bridges" != "*"; then
|
||||||
@@ -47,17 +48,17 @@ insert_openvswitch_mod_if_required () {
|
|||||||
fi
|
fi
|
||||||
action "removing bridge module" rmmod bridge || return 1
|
action "removing bridge module" rmmod bridge || return 1
|
||||||
|
|
||||||
# Try loading openvswitch_mod again.
|
# Try loading openvswitch again.
|
||||||
action "Inserting openvswitch module" modprobe openvswitch_mod
|
action "Inserting openvswitch module" modprobe openvswitch
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_brcompat_mod_if_required () {
|
insert_brcompat_mod_if_required () {
|
||||||
if test -e /sys/module/bridge; then
|
if test -e /sys/module/bridge; then
|
||||||
log_warning_msg "bridge module is loaded, not loading brcompat_mod"
|
log_warning_msg "bridge module is loaded, not loading brcompat"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
test -e /sys/module/brcompat_mod && return 0
|
test -e /sys/module/brcompat -o -e /sys/module/brcompat_mod && return 0
|
||||||
action "Inserting brcompat module" modprobe brcompat_mod
|
action "Inserting brcompat module" modprobe brcompat
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_mod_if_required () {
|
insert_mod_if_required () {
|
||||||
@@ -286,11 +287,16 @@ force_reload_kmod () {
|
|||||||
action "Removing datapath: $dp" ovs-dpctl del-dp "$dp"
|
action "Removing datapath: $dp" ovs-dpctl del-dp "$dp"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# try both old and new names in case this is post upgrade
|
||||||
if test -e /sys/module/brcompat_mod; then
|
if test -e /sys/module/brcompat_mod; then
|
||||||
action "Removing brcompat module" rmmod brcompat_mod
|
action "Removing brcompat module" rmmod brcompat_mod
|
||||||
|
elif test -e /sys/module/brcompat; then
|
||||||
|
action "Removing brcompat module" rmmod brcompat
|
||||||
fi
|
fi
|
||||||
if test -e /sys/module/openvswitch_mod; then
|
if test -e /sys/module/openvswitch_mod; then
|
||||||
action "Removing openvswitch module" rmmod openvswitch_mod
|
action "Removing openvswitch module" rmmod openvswitch_mod
|
||||||
|
elif test -e /sys/module/openvswitch; then
|
||||||
|
action "Removing openvswitch module" rmmod openvswitch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
start
|
start
|
||||||
|
@@ -36,7 +36,7 @@ to find it.
|
|||||||
.so lib/leak-checker.man
|
.so lib/leak-checker.man
|
||||||
.
|
.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
\fBovs\-brcompatd\fR requires the \fBbrcompat_mod.ko\fR kernel module to be
|
\fBovs\-brcompatd\fR requires the \fBbrcompat.ko\fR kernel module to be
|
||||||
loaded.
|
loaded.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR ovs\-appctl (8),
|
.BR ovs\-appctl (8),
|
||||||
|
@@ -456,7 +456,7 @@ handle_fdb_query_cmd(struct ofpbuf *buffer)
|
|||||||
uint32_t seq;
|
uint32_t seq;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
/* Parse the command received from brcompat_mod. */
|
/* Parse the command received from brcompat. */
|
||||||
error = parse_command(buffer, &seq, &linux_name, NULL, &count, &skip);
|
error = parse_command(buffer, &seq, &linux_name, NULL, &count, &skip);
|
||||||
if (error) {
|
if (error) {
|
||||||
return error;
|
return error;
|
||||||
|
@@ -49,7 +49,7 @@ License: ASL 2.0
|
|||||||
Release: 1
|
Release: 1
|
||||||
Source: openvswitch-%{openvswitch_version}.tar.gz
|
Source: openvswitch-%{openvswitch_version}.tar.gz
|
||||||
Buildroot: /tmp/openvswitch-xen-rpm
|
Buildroot: /tmp/openvswitch-xen-rpm
|
||||||
Requires: openvswitch_mod.ko.%{module_abi_version}
|
Requires: openvswitch.ko.%{module_abi_version}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Open vSwitch provides standard network bridging functions augmented with
|
Open vSwitch provides standard network bridging functions augmented with
|
||||||
@@ -60,7 +60,7 @@ traffic.
|
|||||||
Summary: Open vSwitch kernel module
|
Summary: Open vSwitch kernel module
|
||||||
Group: System Environment/Kernel
|
Group: System Environment/Kernel
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Provides: %{name}-modules-%{kernel_flavor} = %{kernel_version}, openvswitch_mod.ko.%{module_abi_version}
|
Provides: %{name}-modules-%{kernel_flavor} = %{kernel_version}, openvswitch.ko.%{module_abi_version}
|
||||||
Requires: kernel-%{kernel_name} = %{kernel_version}
|
Requires: kernel-%{kernel_name} = %{kernel_version}
|
||||||
|
|
||||||
%description %{module_package}
|
%description %{module_package}
|
||||||
@@ -448,5 +448,5 @@ exit 0
|
|||||||
%exclude /usr/share/openvswitch/python/ovs/db/*.py[co]
|
%exclude /usr/share/openvswitch/python/ovs/db/*.py[co]
|
||||||
|
|
||||||
%files %{module_package}
|
%files %{module_package}
|
||||||
/lib/modules/%{xen_version}/extra/openvswitch/openvswitch_mod.ko
|
/lib/modules/%{xen_version}/extra/openvswitch/openvswitch.ko
|
||||||
%exclude /lib/modules/%{xen_version}/extra/openvswitch/brcompat_mod.ko
|
%exclude /lib/modules/%{xen_version}/extra/openvswitch/brcompat.ko
|
||||||
|
Reference in New Issue
Block a user