2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 02:17:42 +00:00

42 Commits

Author SHA1 Message Date
Greg Rose
422e904378 make: Remove the Linux datapath.
Update the necessary make and configure files to remove the Linux
datapath and then remove the datapath.

Move datapath/linux/compat/include/linux/openvswitch.h to
include/linux/openvswitch.h because it is needed to generate header
files used by the userspace switch.

Also remove references to the Linux datapath from auxiliary files
and utilities since it is no longer supported.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2022-07-15 13:45:55 +02:00
Eli Britstein
0b6d2faace ci: Remove -Wno-cast-align from CI.
Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
Remove ignoring them if they occur.

GitHub actions:
v1: https://github.com/elibritstein/OVS/actions/runs/1540651133

[1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
[2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
[3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2022-01-04 19:14:11 +01:00
Greg Rose
90c1cb3f0f python: Fixup python shebangs to python3.
Builds on RHEL 8.2 systems are failing due to this issue.

See [1] as to why this is necessary.

I used the following command to identify files that need this fix:
find . -type f -executable | /usr/lib/rpm/redhat/brp-mangle-shebangs

I also updated the copyright notices as needed.

1. https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error

Fixes: 1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2020-08-26 13:05:01 +02:00
Ben Pfaff
145a7e88bb python: Fix invalid escape sequences.
It appears that Python silently treats invalid escape sequences in
strings as literals, e.g. "\." is the same as "\\.".  Newer versions of
checkpatch complain, and it does seem reasonable to me to fix these.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-11 08:45:04 -08:00
Stephen Finucane
3c8a3b312a doc: Move WHY-OVS
This is moved separately due to the sheer number of references to this
file in the codebase.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-12-12 08:57:07 -08:00
Daniele Di Proietto
884e0dfe8f python: Add double newline after fuction or class (E305).
pycodestyle >= 2.1.0 reports E305 otherwise, and the flake8-check step
fails.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-12-02 11:03:36 -08:00
Stephen Finucane
223908d6f0 doc: Convert WHY-OVS to rST
Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Russell Bryant <russell@ovn.org>
2016-10-26 13:31:36 +02:00
Joe Stringer
4591ed3a40 ovs-dev.py: Update for python3.
Adapt to python-2.6+, including support for 3.

Signed-off-by: Joe Stringer <joe@ovn.org>
2016-05-18 11:24:39 -07:00
Joe Stringer
c6b581b9c3 ovs-dev.py: PEP-8ify.
Signed-off-by: Joe Stringer <joe@ovn.org>
2016-05-18 11:24:39 -07:00
Aaron Conole
eac84432a4 netdev-dpdk: Allow arbitrary eal arguments
A previous change moved some commonly used arguments from commandline to
the database, and with it the ability to pass arbitrary arguments to
EAL. This change allows arbitrary eal arguments to be provided
via a new db entry 'other_config:dpdk-extra' which will tokenize the
string and add it to the argument list. The only argument which will not
be supported with this change is '--no-huge', which appears to break the
system in other ways.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Tested-by: Sean K Mooney <sean.k.mooney@intel.com>
Tested-by: RobertX Wojciechowicz <robertx.wojciechowicz@intel.com>
Tested-by: Kevin Traynor <kevin.traynor@intel.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Kevin Traynor <kevin.traynor@intel.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2016-04-29 15:07:39 -07:00
Aaron Conole
bab6940971 netdev-dpdk: Convert initialization from cmdline to db
Existing DPDK integration is provided by use of command line options which
must be split out and passed to librte in a special manner. However, this
forces any configuration to be passed by way of a special DPDK flag, and
interferes with ovs+dpdk packaging solutions.

This commit delays dpdk initialization until after the OVS database
connection is established, at which point ovs initializes librte. It
pulls all of the config data from the OVS database, and assembles a
new argv/argc pair to be passed along.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Kevin Traynor <kevin.traynor@intel.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2016-04-29 15:07:39 -07:00
Joe Stringer
bdc30bfb5c ovs-dev.py: Fix libcap-ng-dev dependency.
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-12-24 13:10:36 -08:00
YAMAMOTO Takashi
f6783a7a3b use "/usr/bin/env python" for shebangs for python scripts
On NetBSD, a typical path of python interpreter is /usr/pkg/bin/python.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2015-11-26 18:37:19 +09:00
Andy Zhou
bf66c06797 ovs-dev.py: add --monitor and option
Runs ovsdb-server and ovs-vswitch with --monitor option. This feature
is useful for testing daemon monitoring together with --user option.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-09-30 20:43:53 -07:00
Andy Zhou
c543ef57f8 ovs-dev.py: add --user option
ovs-dev.py "run" command now accepts the "--user" option for running
all ovs daemons as "user". The argument can be specified in
"user[:group]" format.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-09-30 20:43:53 -07:00
Andy Zhou
c5c9cb9ef2 ovs-dev.py: run operational commands as root
Switch operational commands, run, kill, reset and modinst directly
or indirectly read and writes files within the RUNDIR. Currently
these commands run in the current user context, with some "sudo"
commands thrown in to ensure daemons such as ovs-vswichd will be
launched as root.

This approach works fine as long as ovs-dev.py is always
run as root, (but then the 'sudo' commands added are redundant).
When invoking ovs-dev.py as non-root, files in RUNDIR will be mixed
with root created file and non-root created files, making it confusing
to decide whether to run ovs-appctl as root or not. Multiple
invocations of ovs-dev.py as root or non-root causes permission issues
since the same file created by a different user may no longer be
accessible when user changes.

This patch improves the situation by always run those four operational
commands as root. When they are invoked as non-root, "sudo" will be
used automatically by re-run the command with sudo.  VARDIR will now
always be access as root. The next patch will add --user and -u option
to allow for downgrading to running all daemons as non-root.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-09-30 20:43:53 -07:00
Andy Zhou
0c001985e2 ovs-dev.py: rename ROOT to RUNDIR
RUNDIR seems to be a better name.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-09-30 20:43:53 -07:00
Andy Zhou
9bf2f075d7 ovs-dev.py: allow current directory to be used as the working directory
Rather than forcing a single ovs source tree under ~/ovs, this
change supports invoking the script from the root of any
ovs source tree as the working source tree. If the script is invoked
from a directory not recognized as OVS source tree, ~/ovs will
then be used.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-09-30 20:43:53 -07:00
Thomas Graf
2791b00ce1 ovs-dev: Load all available vport modules on modinst
Automatically load all vport modules upon 'modinst' in case
they are not properly installed and thus not autoloaded.

Suggested-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
2015-04-22 09:49:55 +02:00
Thomas Graf
e8ee793b8c ovs-dev: Hint that vport modules may need to be loaded manually
In case the openvswitch.ko is loaded manually without dependencies
built, the vport modules need to be loaded manually as well.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
2015-04-22 09:49:55 +02:00
Ben Pfaff
19c12401d6 ovs-dev.py: Remove vport-*.ko at same time as openvswitch.ko.
My guess is that this is the intent.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2015-04-05 15:02:48 -07:00
Ethan Jackson
97695cf7e6 ovs-dev.py: Support running the clang binaries.
They have slightly different support characteristics, so it's nice to
easily switch between them for testing.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
2014-09-16 21:35:01 -07:00
Ethan Jackson
1bcf46c62e ovs-dev.py: Support additional optimization flags.
They may or may not make a difference, but there's no reason not to
support passing them.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
2014-09-16 21:35:01 -07:00
Daniele Di Proietto
3bacde2a1f ovs-dev.py: do not pass --enable-dummy to ovsdb
--enable-dummy was useless anyway for ovsdb-server. Now it is an error to pass
it.

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-09-15 14:33:53 +12:00
Ethan Jackson
c0b0b0969c ovs-dev.py: Support check-valgrind in the Makefile.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-08-05 14:13:20 -07:00
Joe Stringer
6a223e8ee9 ovs-dev.py: Add option to run tests in parallel.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2014-06-04 14:07:41 +12:00
Joe Stringer
de146e5db5 ovs-dev.py: Add option to specify which tests to run.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2014-06-04 14:01:16 +12:00
Daniele Di Proietto
1a90b8392b ovs-dev.py: add option to run with dpdk
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2014-05-29 13:02:53 -07:00
Ethan Jackson
25dfecf887 ovs-dev.py: Add support for dpdk builds.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2014-05-08 17:41:21 -07:00
Ben Pfaff
6d616e9906 ovs-dev.py: Update repository location.
The Open vSwitch repository has moved to Github.

CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2014-04-08 16:56:21 -07:00
Ethan Jackson
a3ea1821d6 ovs-dev.py: Only build the Linux datapath with GCC.
In practice, Linux kernel modules are only built with GCC, so it
doesn't make much sense to spend time compiling them with clang.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-01-24 17:33:29 -08:00
Ethan Jackson
743f810972 configure: Enable silent rules.
Configure has an option which supports quieter compilation.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-01-22 10:40:28 -08:00
Ethan Jackson
e740cdbc45 ovs-dev.py: Configure silently.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-01-22 10:40:27 -08:00
Ethan Jackson
a2a2ac7b1e ovs-dev.py: Add compiler optimization options.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-01-22 10:40:08 -08:00
Ethan Jackson
6e4ffd03cc ovs-dev.py: Add "-fno-omit-frame-pointer" compiler argument.
This makes it easier for development tools including "perf", give
clean backtraces on x86-64 systems.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-01-22 08:50:39 -08:00
Ethan Jackson
294a55509b ovs-dev.py: Pass leak-check=full to valgrind.
This valgrind leak checker isn't really useful without this.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2013-12-23 12:27:15 -08:00
Ethan Jackson
30fbc7b61c ovs-dev.py: Build with both GCC and Clang.
Many deployments prefer to use gcc in production and it supports
sparse, while clang supports thread safety analysis and has
more/better warnings and error messages.  This patch changes
ovs-dev.py to build with both so that developers are unlikely to miss
something that one or the other could catch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2013-12-12 15:21:15 -08:00
Saurabh Shah
3a5ded905b ovs-dev.py: Remove duplicate name from the help string.
Signed-off-by: Saurabh Shah <ssaurabh@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 14:17:35 -08:00
Ethan Jackson
1e0879aacd ovs-dev.py: Use custom suppressions when running valgrind.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-07-29 15:30:22 -07:00
Ethan Jackson
47e501e172 ovs-dev.py: Add support for clang builds.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-07-29 14:13:07 -07:00
Ethan Jackson
edfe54d09e ovs-dev.py: Rely on configure for warning options.
Both -Wall and -Wextra are handled by autoconf, so there's no longer a
need for ovs-dev.py to pass them through CFLAGS.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-07-29 14:13:07 -07:00
Ethan Jackson
fef5244f6f utilities: New helper script ovs-dev.py.
ovs-dev.py is a script I've written to help perform common tasks
necessary for developing Open vSwitch.  It allows a developer to
configure, build, and run the switch with a minimum of effort or
knowledge of the various idiosyncrasies involved.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-07-09 15:05:06 -07:00