mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
datapath: Rename linux-2.6 and compat-2.6 directories.
The linux-2.6 and compat-2.6 directories apply equally to the upcoming Linux 3.0 release, so this drops the 2.6 suffix and updates Makefiles. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -12,6 +12,8 @@ post v1.1.0
|
||||
--with-l26-source has been renamed --with-linux-source. The old
|
||||
names will be removed after the next release, so please update
|
||||
your scripts.
|
||||
- The "-2.6" suffix has been dropped from the datapath/linux-2.6 and
|
||||
datapath/linux-2.6/compat-2.6 directories.
|
||||
- Feature removals:
|
||||
- Dropped support for "tun_id_from_cookie" OpenFlow extension.
|
||||
(Use the extensible match extensions instead.)
|
||||
|
@@ -182,7 +182,7 @@ Prerequisites section, follow the procedure below to build.
|
||||
when invoking the configure script. For example, to build for MIPS
|
||||
with Linux:
|
||||
|
||||
% ./configure --with-linux=/path/to/linux-2.6 KARCH=mips
|
||||
% ./configure --with-linux=/path/to/linux KARCH=mips
|
||||
|
||||
The configure script accepts a number of other options and honors
|
||||
additional environment variables. For a full list, invoke
|
||||
@@ -199,7 +199,7 @@ Prerequisites section, follow the procedure below to build.
|
||||
|
||||
6. If you built kernel modules, you may load them with "insmod", e.g.:
|
||||
|
||||
% insmod datapath/linux-2.6/openvswitch_mod.ko
|
||||
% insmod datapath/linux/openvswitch_mod.ko
|
||||
|
||||
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
|
||||
|
@@ -34,7 +34,7 @@ kernel bridge module.
|
||||
|
||||
2. Load the brcompat kernel module (which was built in step 1), e.g.:
|
||||
|
||||
% insmod datapath/linux-2.6/brcompat_mod.ko
|
||||
% insmod datapath/linux/brcompat_mod.ko
|
||||
|
||||
(openvswitch_mod.ko should already have been loaded.)
|
||||
|
||||
|
16
acinclude.m4
16
acinclude.m4
@@ -180,7 +180,7 @@ dnl OVS_DEFINE(NAME)
|
||||
dnl
|
||||
dnl Defines NAME to 1 in kcompat.h.
|
||||
AC_DEFUN([OVS_DEFINE], [
|
||||
echo '#define $1 1' >> datapath/linux-2.6/kcompat.h.new
|
||||
echo '#define $1 1' >> datapath/linux/kcompat.h.new
|
||||
])
|
||||
|
||||
AC_DEFUN([OVS_CHECK_LOG2_H], [
|
||||
@@ -198,9 +198,9 @@ dnl
|
||||
dnl Runs various Autoconf checks on the Linux 2.6 kernel source in
|
||||
dnl the directory in $KBUILD.
|
||||
AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
|
||||
rm -f datapath/linux-2.6/kcompat.h.new
|
||||
mkdir -p datapath/linux-2.6
|
||||
: > datapath/linux-2.6/kcompat.h.new
|
||||
rm -f datapath/linux/kcompat.h.new
|
||||
mkdir -p datapath/linux
|
||||
: > datapath/linux/kcompat.h.new
|
||||
|
||||
OVS_GREP_IFELSE([$KSRC/arch/x86/include/asm/checksum_32.h], [src_err,],
|
||||
[OVS_DEFINE([HAVE_CSUM_COPY_DBG])])
|
||||
@@ -261,11 +261,11 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
|
||||
|
||||
OVS_CHECK_LOG2_H
|
||||
|
||||
if cmp -s datapath/linux-2.6/kcompat.h.new \
|
||||
datapath/linux-2.6/kcompat.h >/dev/null 2>&1; then
|
||||
rm datapath/linux-2.6/kcompat.h.new
|
||||
if cmp -s datapath/linux/kcompat.h.new \
|
||||
datapath/linux/kcompat.h >/dev/null 2>&1; then
|
||||
rm datapath/linux/kcompat.h.new
|
||||
else
|
||||
mv datapath/linux-2.6/kcompat.h.new datapath/linux-2.6/kcompat.h
|
||||
mv datapath/linux/kcompat.h.new datapath/linux/kcompat.h
|
||||
fi
|
||||
])
|
||||
|
||||
|
@@ -94,9 +94,9 @@ OVS_CHECK_LINUX
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
datapath/Makefile
|
||||
datapath/linux-2.6/Kbuild
|
||||
datapath/linux-2.6/Makefile
|
||||
datapath/linux-2.6/Makefile.main
|
||||
datapath/linux/Kbuild
|
||||
datapath/linux/Makefile
|
||||
datapath/linux/Makefile.main
|
||||
tests/atlocal])
|
||||
|
||||
dnl This makes sure that include/openflow gets created in the build directory.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
SUBDIRS =
|
||||
if LINUX_ENABLED
|
||||
SUBDIRS += linux-2.6
|
||||
SUBDIRS += linux
|
||||
endif
|
||||
|
||||
EXTRA_DIST = $(dist_headers) $(dist_sources)
|
||||
@@ -9,7 +9,7 @@ EXTRA_DIST = $(dist_headers) $(dist_sources)
|
||||
AUTOMAKE_OPTIONS = -Wno-portability
|
||||
|
||||
include Modules.mk
|
||||
include linux-2.6/Modules.mk
|
||||
include linux/Modules.mk
|
||||
|
||||
# The following is based on commands for the Automake "distdir" target.
|
||||
distfiles: Makefile
|
||||
|
@@ -1,62 +0,0 @@
|
||||
openvswitch_sources += \
|
||||
linux-2.6/compat-2.6/addrconf_core-openvswitch.c \
|
||||
linux-2.6/compat-2.6/dev-openvswitch.c \
|
||||
linux-2.6/compat-2.6/genetlink-openvswitch.c \
|
||||
linux-2.6/compat-2.6/ip_output-openvswitch.c \
|
||||
linux-2.6/compat-2.6/kmemdup.c \
|
||||
linux-2.6/compat-2.6/netdevice.c \
|
||||
linux-2.6/compat-2.6/skbuff-openvswitch.c \
|
||||
linux-2.6/compat-2.6/time.c
|
||||
openvswitch_headers += \
|
||||
linux-2.6/compat-2.6/include/asm-generic/bug.h \
|
||||
linux-2.6/compat-2.6/include/linux/bottom_half.h \
|
||||
linux-2.6/compat-2.6/include/linux/compiler.h \
|
||||
linux-2.6/compat-2.6/include/linux/compiler-gcc.h \
|
||||
linux-2.6/compat-2.6/include/linux/cpumask.h \
|
||||
linux-2.6/compat-2.6/include/linux/dmi.h \
|
||||
linux-2.6/compat-2.6/include/linux/err.h \
|
||||
linux-2.6/compat-2.6/include/linux/genetlink.h \
|
||||
linux-2.6/compat-2.6/include/linux/icmp.h \
|
||||
linux-2.6/compat-2.6/include/linux/icmpv6.h \
|
||||
linux-2.6/compat-2.6/include/linux/if.h \
|
||||
linux-2.6/compat-2.6/include/linux/if_arp.h \
|
||||
linux-2.6/compat-2.6/include/linux/if_ether.h \
|
||||
linux-2.6/compat-2.6/include/linux/if_vlan.h \
|
||||
linux-2.6/compat-2.6/include/linux/in.h \
|
||||
linux-2.6/compat-2.6/include/linux/inetdevice.h \
|
||||
linux-2.6/compat-2.6/include/linux/ip.h \
|
||||
linux-2.6/compat-2.6/include/linux/ipv6.h \
|
||||
linux-2.6/compat-2.6/include/linux/jiffies.h \
|
||||
linux-2.6/compat-2.6/include/linux/kernel.h \
|
||||
linux-2.6/compat-2.6/include/linux/kobject.h \
|
||||
linux-2.6/compat-2.6/include/linux/lockdep.h \
|
||||
linux-2.6/compat-2.6/include/linux/log2.h \
|
||||
linux-2.6/compat-2.6/include/linux/mutex.h \
|
||||
linux-2.6/compat-2.6/include/linux/netdevice.h \
|
||||
linux-2.6/compat-2.6/include/linux/netfilter_bridge.h \
|
||||
linux-2.6/compat-2.6/include/linux/netfilter_ipv4.h \
|
||||
linux-2.6/compat-2.6/include/linux/netlink.h \
|
||||
linux-2.6/compat-2.6/include/linux/rculist.h \
|
||||
linux-2.6/compat-2.6/include/linux/rcupdate.h \
|
||||
linux-2.6/compat-2.6/include/linux/rtnetlink.h \
|
||||
linux-2.6/compat-2.6/include/linux/skbuff.h \
|
||||
linux-2.6/compat-2.6/include/linux/slab.h \
|
||||
linux-2.6/compat-2.6/include/linux/stddef.h \
|
||||
linux-2.6/compat-2.6/include/linux/tcp.h \
|
||||
linux-2.6/compat-2.6/include/linux/timer.h \
|
||||
linux-2.6/compat-2.6/include/linux/types.h \
|
||||
linux-2.6/compat-2.6/include/linux/udp.h \
|
||||
linux-2.6/compat-2.6/include/linux/workqueue.h \
|
||||
linux-2.6/compat-2.6/include/net/checksum.h \
|
||||
linux-2.6/compat-2.6/include/net/dst.h \
|
||||
linux-2.6/compat-2.6/include/net/genetlink.h \
|
||||
linux-2.6/compat-2.6/include/net/ip.h \
|
||||
linux-2.6/compat-2.6/include/net/net_namespace.h \
|
||||
linux-2.6/compat-2.6/include/net/netlink.h \
|
||||
linux-2.6/compat-2.6/include/net/protocol.h \
|
||||
linux-2.6/compat-2.6/include/net/route.h \
|
||||
linux-2.6/compat-2.6/genetlink.inc
|
||||
|
||||
both_modules += brcompat
|
||||
brcompat_sources = linux-2.6/compat-2.6/genetlink-brcompat.c brcompat.c
|
||||
brcompat_headers =
|
@@ -20,7 +20,6 @@
|
||||
/ip_output-openvswitch.c
|
||||
/kcompat.h
|
||||
/kmemdup.c
|
||||
/linux-2.6
|
||||
/loop_counter.c
|
||||
/modules.order
|
||||
/netdevice.c
|
@@ -22,7 +22,7 @@ EXTRA_CFLAGS += -include $(builddir)/kcompat.h
|
||||
# These include directories have to go before -I$(KSRC)/include.
|
||||
# NOSTDINC_FLAGS just happens to be a variable that goes in the
|
||||
# right place, even though it's conceptually incorrect.
|
||||
NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat-2.6 -I$(srcdir)/compat-2.6/include
|
||||
NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include
|
||||
|
||||
obj-m := $(patsubst %,%_mod.o,$(build_modules))
|
||||
|
62
datapath/linux/Modules.mk
Normal file
62
datapath/linux/Modules.mk
Normal file
@@ -0,0 +1,62 @@
|
||||
openvswitch_sources += \
|
||||
linux/compat/addrconf_core-openvswitch.c \
|
||||
linux/compat/dev-openvswitch.c \
|
||||
linux/compat/genetlink-openvswitch.c \
|
||||
linux/compat/ip_output-openvswitch.c \
|
||||
linux/compat/kmemdup.c \
|
||||
linux/compat/netdevice.c \
|
||||
linux/compat/skbuff-openvswitch.c \
|
||||
linux/compat/time.c
|
||||
openvswitch_headers += \
|
||||
linux/compat/include/asm-generic/bug.h \
|
||||
linux/compat/include/linux/bottom_half.h \
|
||||
linux/compat/include/linux/compiler.h \
|
||||
linux/compat/include/linux/compiler-gcc.h \
|
||||
linux/compat/include/linux/cpumask.h \
|
||||
linux/compat/include/linux/dmi.h \
|
||||
linux/compat/include/linux/err.h \
|
||||
linux/compat/include/linux/genetlink.h \
|
||||
linux/compat/include/linux/icmp.h \
|
||||
linux/compat/include/linux/icmpv6.h \
|
||||
linux/compat/include/linux/if.h \
|
||||
linux/compat/include/linux/if_arp.h \
|
||||
linux/compat/include/linux/if_ether.h \
|
||||
linux/compat/include/linux/if_vlan.h \
|
||||
linux/compat/include/linux/in.h \
|
||||
linux/compat/include/linux/inetdevice.h \
|
||||
linux/compat/include/linux/ip.h \
|
||||
linux/compat/include/linux/ipv6.h \
|
||||
linux/compat/include/linux/jiffies.h \
|
||||
linux/compat/include/linux/kernel.h \
|
||||
linux/compat/include/linux/kobject.h \
|
||||
linux/compat/include/linux/lockdep.h \
|
||||
linux/compat/include/linux/log2.h \
|
||||
linux/compat/include/linux/mutex.h \
|
||||
linux/compat/include/linux/netdevice.h \
|
||||
linux/compat/include/linux/netfilter_bridge.h \
|
||||
linux/compat/include/linux/netfilter_ipv4.h \
|
||||
linux/compat/include/linux/netlink.h \
|
||||
linux/compat/include/linux/rculist.h \
|
||||
linux/compat/include/linux/rcupdate.h \
|
||||
linux/compat/include/linux/rtnetlink.h \
|
||||
linux/compat/include/linux/skbuff.h \
|
||||
linux/compat/include/linux/slab.h \
|
||||
linux/compat/include/linux/stddef.h \
|
||||
linux/compat/include/linux/tcp.h \
|
||||
linux/compat/include/linux/timer.h \
|
||||
linux/compat/include/linux/types.h \
|
||||
linux/compat/include/linux/udp.h \
|
||||
linux/compat/include/linux/workqueue.h \
|
||||
linux/compat/include/net/checksum.h \
|
||||
linux/compat/include/net/dst.h \
|
||||
linux/compat/include/net/genetlink.h \
|
||||
linux/compat/include/net/ip.h \
|
||||
linux/compat/include/net/net_namespace.h \
|
||||
linux/compat/include/net/netlink.h \
|
||||
linux/compat/include/net/protocol.h \
|
||||
linux/compat/include/net/route.h \
|
||||
linux/compat/genetlink.inc
|
||||
|
||||
both_modules += brcompat
|
||||
brcompat_sources = linux/compat/genetlink-brcompat.c brcompat.c
|
||||
brcompat_headers =
|
4
debian/rules.modules
vendored
4
debian/rules.modules
vendored
@@ -27,9 +27,9 @@ binary-modules: prep-deb-files
|
||||
dh_clean -k
|
||||
tar xzf openvswitch.tar.gz
|
||||
cd openvswitch && ./configure --with-linux=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER)
|
||||
cd openvswitch && $(MAKE) -C datapath/linux-2.6
|
||||
cd openvswitch && $(MAKE) -C datapath/linux
|
||||
install -d -m755 $(DSTDIR)
|
||||
install -m644 openvswitch/datapath/linux-2.6/*_mod.ko $(DSTDIR)/
|
||||
install -m644 openvswitch/datapath/linux/*_mod.ko $(DSTDIR)/
|
||||
dh_installmodules
|
||||
dh_installdocs
|
||||
dh_installchangelogs
|
||||
|
@@ -64,7 +64,7 @@ for kvariant in %{kvariants} ; do
|
||||
KSRC=%{_usrsrc}/kernels/%{kversion}${kvariant:+-$kvariant}-%{_target_cpu}
|
||||
cd _kmod_build_$kvariant
|
||||
../openvswitch-%{version}/configure --with-linux="$KSRC"
|
||||
%{__make} -C datapath/linux-2.6 %{?_smp_mflags}
|
||||
%{__make} -C datapath/linux %{?_smp_mflags}
|
||||
cd ..
|
||||
done
|
||||
|
||||
@@ -74,7 +74,7 @@ export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=extra/%{kmod_name}
|
||||
for kvariant in %{kvariants} ; do
|
||||
KSRC=%{_usrsrc}/kernels/%{kversion}${kvariant:+-$kvariant}-%{_target_cpu}
|
||||
%{__make} -C "${KSRC}" modules_install M=$PWD/_kmod_build_$kvariant/datapath/linux-2.6
|
||||
%{__make} -C "${KSRC}" modules_install M=$PWD/_kmod_build_$kvariant/datapath/linux
|
||||
done
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/depmod.d/
|
||||
%{__install} kmod-%{kmod_name}.conf %{buildroot}%{_sysconfdir}/depmod.d/
|
||||
|
@@ -41,7 +41,7 @@ Open vSwitch Linux kernel module.
|
||||
for flavor in %flavors_to_build; do
|
||||
mkdir _$flavor
|
||||
(cd _$flavor && ../configure --with-linux="%{kernel_source $flavor}")
|
||||
%{__make} -C _$flavor/datapath/linux-2.6 %{?_smp_mflags}
|
||||
%{__make} -C _$flavor/datapath/linux %{?_smp_mflags}
|
||||
done
|
||||
|
||||
%install
|
||||
@@ -49,7 +49,7 @@ export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
|
||||
export INSTALL_MOD_DIR=extra/%{name}
|
||||
for flavor in %flavors_to_build ; do
|
||||
make -C %{kernel_source $flavor} modules_install \
|
||||
M=$PWD/_$flavor/datapath/linux-2.6
|
||||
M=$PWD/_$flavor/datapath/linux
|
||||
done
|
||||
|
||||
%clean
|
||||
|
@@ -116,7 +116,7 @@ install -m 644 \
|
||||
$RPM_BUILD_ROOT/usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py
|
||||
|
||||
install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/extra/openvswitch
|
||||
find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/extra/openvswitch \;
|
||||
find datapath/linux -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/extra/openvswitch \;
|
||||
install xenserver/uuid.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
|
||||
|
||||
# Get rid of stuff we don't want to make RPM happy.
|
||||
|
Reference in New Issue
Block a user