2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 13:27:59 +00:00

9347 Commits

Author SHA1 Message Date
Ankur Sharma
e9bbe84b6b datapath-windows: Remove a not needed debug message from Flow.c.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 15:11:03 -08:00
Jarno Rajahalme
01c0f83a4f classifier: Clean up destroy_subtable.
Add asserts to make sure the containers within are already empty.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-06 15:03:48 -08:00
Jarno Rajahalme
f80028fe28 classifier: Constify fields.
Some struct cls_match and cls_subtable fields were already documented
of being const.  Make them const and use CONST_CAST where appropriate
to initialize them.

This will help catch future errors modifying those fields after
initialization.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-06 15:02:12 -08:00
Jarno Rajahalme
98abae4aa6 classifier: Make classifier_find_rule_exactly() lockless.
struct cls_match 'list' member was recently changed to an rculist.
This allows classifier_find_rule_exactly() to be made lockless.

Since subtable's 'max_priority' member would still require a lock, we
no longer check it before calling find_equal().  This adds a hash
table lookup in cases where the subtable may already be known to not
contain any rule of the target priority.
classifier_find_rule_exactly() is never called on the fastpath, so
this should not be significant.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-06 15:00:41 -08:00
Jarno Rajahalme
dfea28b3b4 classifier: Constify RCU pointers.
Returning const struct cls_rule pointers from the classifier API helps
callers to remember that they should not modify the rules returned.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:55:29 -08:00
Flavio Leitner
059def1e2f rhel: Fix tunnel port ifup/ifdown failure.
The tunnel port is invisible to the OS, so there is
no reason to call OTHERSCRIPT in the ifup/ifdown scripts.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:14:00 -08:00
Flavio Leitner
3cf905f91e fedora-spec: remove unneeded db initialization
The DB initialization is done by ovs-ctl script as well,
so remove the duplicated code from the spec.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:16 -08:00
Flavio Leitner
0447019df7 fedora-spec: added systemd post/postun/pre/preun sections
The systemd requires some actions when the package is
installed, upgraded or removed. This patch adds the
needed RPM sections with the missing systemd actions.

There is a change in behavior - the service is not enabled
or started by default.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:14 -08:00
Flavio Leitner
c846a5b2b0 fedora-spec: move sysconfig template
Move the sysconfig template close to other systemd lines.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:11 -08:00
Flavio Leitner
3224d9487f fedora-spec: break long lines in %install
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:09 -08:00
Flavio Leitner
3d1d098cae fedora-spec: remove uneeded lines
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:07 -08:00
Flavio Leitner
95ca408c4c fedora-spec: use empty lines to split blocks in %install
Use empty lines to split blocks to improve readability.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:04 -08:00
Flavio Leitner
fa0be8a475 fedora-spec: set permission mode with 4 digits
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:02 -08:00
Flavio Leitner
150ffd74b9 fedora-spec: fix indentation in %install section
Use spaces instead of tabs as the other lines

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:11:00 -08:00
Flavio Leitner
4f98e02e6c fedora-spec: use RPM macros in %install section
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:58 -08:00
Flavio Leitner
a7321a1fee fedora-spec: do not replace logrotate cfg if modified
Don't overwrite if the logrotate configuration
file is modified.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:55 -08:00
Flavio Leitner
e7b0f92d59 fedora-spec: convert missing man-pages to use macro
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:45 -08:00
Flavio Leitner
aa6ccca5a9 fedora-spec: use macro for /usr/share
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:43 -08:00
Flavio Leitner
5b88626ad2 fedora-spec: use macro for /usr/bin
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:39 -08:00
Flavio Leitner
f616ba3e93 fedora-spec: use macro for /usr/sbin
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:34 -08:00
Flavio Leitner
b3d0fa1d41 fedora-spec: break %doc long line
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:31 -08:00
Flavio Leitner
a2f24d79b0 fedora-spec: sort man-pages and use macros
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:29 -08:00
Flavio Leitner
1c9564ebe3 fedora-spec: the db and id must be owned
Both conf.db and system-id.conf needs to be owned, so
spec now list them in the %files section.  However,
they are not shipped with the rpm (%ghost)

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:25 -08:00
Flavio Leitner
c1aadf4aac fedora-spec: use default tarball dirs name
The default tarball directory follows the standard.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:10:17 -08:00
Flavio Leitner
6238c95d03 fedora-spec: _smp_mflags macro must be conditional
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:59 -08:00
Flavio Leitner
f1b476c315 fedora-spec: obsolete controller subpackage
Once upon a time there was a controller subpackage
that was obsoleted

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:57 -08:00
Flavio Leitner
da11d08888 fedora-spec: Enable PIE
Package guidelines request to enable PIE.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:55 -08:00
Flavio Leitner
3519fa0801 fedora-spec: add openvswitch-devel subpackage
This provides static library, libopenswitch.a and the openvswitch
header files needed to build an external application in a separate
RPM package.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:53 -08:00
Flavio Leitner
f305420af8 fedora-spec: add openvswitch-test package
Put the utilities that are useful to diagnose performance
and connectivity issues in Open vSwitch setup into another
package since they are not needed in most cases.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:51 -08:00
Flavio Leitner
9136f9bd17 fedora-spec: add python-openvswitch subpackage
This creates a subpackage called python-openvswitch
providing python bidings for the Open vSwitch database.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:48 -08:00
Flavio Leitner
8c00d88bb6 fedora-spec: use %configure macro
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:46 -08:00
Flavio Leitner
6fcc7a7a5c fedora-spec: more simple description
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:44 -08:00
Flavio Leitner
ab725f426f fedora-spec: added more requires
The minimum recommended kernel for fedora is
3.15.0-0 due to be the first one including the
upstream kernel commit below:

  commit 4f647e0a3c37b8d5086214128614a136064110c3
  Author: Flavio Leitner <fbl@redhat.com>
  Date:   Thu Mar 27 11:05:34 2014 -0300

  openvswitch: fix a possible deadlock and lockdep warning

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:42 -08:00
Flavio Leitner
b33c6dcaa9 fedora-spec: removed extra space
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:40 -08:00
Flavio Leitner
21ea8738cc fedora-spec: Added buildrequires
This is needed to ensure all the packages are
installed on the system to be able to build
Open vSwitch.

This also permits to use yum-builddep(1) to
automatically install the dependencies on the
system.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:38 -08:00
Flavio Leitner
d09dbe6221 fedora-spec: source line points to upstream tarball
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:36 -08:00
Flavio Leitner
89c2665fc7 fedora-spec: remove stale comment
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:33 -08:00
Flavio Leitner
202e9217c8 fedora-spec: use default buildroot
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:31 -08:00
Flavio Leitner
362d45b7ba fedora.spec: added license details
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 14:09:28 -08:00
Ben Pfaff
fe540ca95b FAQ: Describe how to add new fields and new actions.
We get these questions from time to time and it would be nice to just be
able to cut and paste the answer.  (And possibly some people might actually
read the answer straight from the FAQ.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2014-11-06 13:48:39 -08:00
Madhu Challa
f98e6e5bc1 meta-flow: Make it simpler to expand mf_values in the future
Remove hard coded array index and make it dependent on the array size.

Signed-off-by: Madhu Challa <challa@noironetworks.com>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-06 10:55:14 -08:00
Pravin B Shelar
fb3939930c ovs-router: Define stub for ovs_router_unixctl_register()
ovs_router_unixctl_register() is called from ofproto layer.
But is not defined for all platform. Following patch define
stub to fix compilation error.

Reported-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>-
2014-11-05 19:36:35 -08:00
Simon Horman
69185eb25a ovs-ofctl: Only allow usable protocols for group commands
parse_ofp_group_mod_str() may limit the usable protocols according
to the group and in particular its actions. However, without this
change ovs-ofctl ignores this calculation.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-11-05 15:55:47 -08:00
Andy Zhou
b5cbbcf656 bridge: Store datapath version into ovsdb
OVS userspace are backward compatible with older Linux kernel modules.
However, not having the most up-to-date datapath kernel modules can
some times lead to user confusion. Storing the datapath version in
OVSDB allows management software to check and optionally provide
notifications to users.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-05 15:27:38 -08:00
Eitan Eliahu
f8f417d3df datapath-windows: Add WMI to set Hyper-V port "friendly name" from NOVA.
Added a function Set-VMNetworkAdapterOVSPortDirect() to be called from
NOVA driver to set a name on the port of the first VNIC for the specified VM.

Usage example:
Set-VMNetworkAdapterOVSPortDirect -OVSPortName ovs-port-5 -VMName NoOS

To confirm that the name was set:
Get-VMNetworkAdapterByOVSPort  -OVSPortName ovs-port-5

Signed-off-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-05 14:16:17 -08:00
Eitan Eliahu
5167d6b010 router-table-stub: Fix compilation error.
Signed-off-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-05 07:28:23 -08:00
Jean Tourrilhes
73056818e9 openflow.h: Add header for OpenFlow v1.5.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-04 16:36:11 -08:00
Jean Tourrilhes
52c7a4e314 ovs-testcontroller: Fix priority of non table-miss flow entries.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
2014-11-04 16:33:40 -08:00
Pravin B Shelar
d637497c0d datapath: Convert dp rcu read operation to locked operations
dp read operations depends on ovs_dp_cmd_fill_info(). This API
needs to looup vport to find dp name, but vport lookup can
fail. Therefore to keep vport reference alive we need to
take ovs lock.

Found by code inspection.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2014-11-04 13:52:45 -08:00
Jean Tourrilhes
3ca3ce0c1f tests: Make sure test for actset_output tests initial condition.
ONF-JIRA: EXT-233
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
2014-11-04 11:23:49 -08:00