Simon Horman [Mon, 10 Nov 2014 04:47:54 +0000 (13:47 +0900)]
ofp-util: Break out encoding of OpenFlow 1.1 group mod messages.
This refactoring is in preparation for supporting encoding
of (draft) OpenFlow 1.5 group mod messages.
ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 10 Nov 2014 04:47:53 +0000 (13:47 +0900)]
ofp-util: Provide helper to encode OpenFlow 1.1 group buckets.
The group bucket encoding code appears in two places
in almost identical form. Consolidate this into
a helper function.
The helper name includes ofp11 as later patches
will add an ofp15 version to support (draft) OpenFlow 1.5 buckets.
ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Rishi Bamba [Fri, 7 Nov 2014 12:48:48 +0000 (18:18 +0530)]
Add support for OpenFlow 1.4+ "importance" values.
This patch enables a user to set importance for a new rule via add-flow
OF1.4+ in the OVS and display the same via dump-flows command OF1.4+.
The changes are made in accordance with OpenFlow 1.4 specs to implement
eviction on the basis of "importance". This patch also enhances the
diff-flows & replace-flows CLI for addition of importance parameter in
a rule.
This doesn't actually implement eviction on the basis of importance, which
will happen in a later patch.
Signed-off-by: Rishi Bamba <rishi.bamba@tcs.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 10 Nov 2014 16:43:31 +0000 (08:43 -0800)]
id-pool: Fix memory leak.
This dates back to the previous location of the code in ofproto-dpif-rid.
I will backport.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 10 Nov 2014 04:47:49 +0000 (13:47 +0900)]
id-pool: Refactor id_pool_alloc_id to allow any 32 bit value to be an id
id_pool_alloc_id() was created by breaking out the recirculation
allocation code. As it is now a library call it makes sense to remove
the restriction that id 0 is reserved.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 10 Nov 2014 04:47:48 +0000 (13:47 +0900)]
id-pool: Re-factor recirculation id allocator into standalone id pool.
Refactor the lock-free portion of the recirculation id allocator
into stand-alone id pool. This is in preparation for re-using
that portion to allocate bucket ids which are part of (draft)
OpenFlow 1.5 groups.
ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Sat, 8 Nov 2014 15:24:42 +0000 (07:24 -0800)]
datapath: fix coding style.
Kernel datapath code has diverged from upstream code. This
makes porting patches between these two code bases harder
than it needs to be. Following patch fixes this by fixing
coding style issues on this branch.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Pravin B Shelar [Sat, 8 Nov 2014 16:14:21 +0000 (08:14 -0800)]
datapath: Fix few mpls issues.
Found during MPLS upstreaming. Also sync-up MPLS header files
with upstream code.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Simon Horman [Sat, 8 Nov 2014 21:53:52 +0000 (13:53 -0800)]
datapath: Rename last_action() as nla_is_last() and move to netlink.h
The original motivation for this change was to allow the helper to be used
in files other than actions.c as part of work on an odp select group
action.
It was as pointed out by Thomas Graf that this helper would be best off
living in netlink.h. Furthermore, I think that the generic nature of this
helper means it is best off in netlink.h regardless of if it is used more
than one .c file or not. Thus, I would like it considered independent of
the work on an odp select group action.
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Pravin Shelar <pshelar@nicira.com>
Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Ankur Sharma [Wed, 5 Nov 2014 20:12:03 +0000 (12:12 -0800)]
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>
Jarno Rajahalme [Mon, 3 Nov 2014 19:23:11 +0000 (11:23 -0800)]
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>
Jarno Rajahalme [Mon, 27 Oct 2014 17:57:28 +0000 (10:57 -0700)]
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>
Jarno Rajahalme [Mon, 3 Nov 2014 17:56:54 +0000 (09:56 -0800)]
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>
Jarno Rajahalme [Thu, 6 Nov 2014 22:55:29 +0000 (14:55 -0800)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:50:06 +0000 (16:50 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:51 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:50 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:49 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:48 +0000 (16:45 -0200)]
fedora-spec: break long lines in %install
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:47 +0000 (16:45 -0200)]
fedora-spec: remove uneeded lines
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:46 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:45 +0000 (16:45 -0200)]
fedora-spec: set permission mode with 4 digits
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:44 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:43 +0000 (16:45 -0200)]
fedora-spec: use RPM macros in %install section
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:42 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:41 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:40 +0000 (16:45 -0200)]
fedora-spec: use macro for /usr/share
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:39 +0000 (16:45 -0200)]
fedora-spec: use macro for /usr/bin
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:38 +0000 (16:45 -0200)]
fedora-spec: use macro for /usr/sbin
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:37 +0000 (16:45 -0200)]
fedora-spec: break %doc long line
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:36 +0000 (16:45 -0200)]
fedora-spec: sort man-pages and use macros
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:35 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:34 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:33 +0000 (16:45 -0200)]
fedora-spec: _smp_mflags macro must be conditional
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:32 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:31 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:30 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:29 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:28 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:27 +0000 (16:45 -0200)]
fedora-spec: use %configure macro
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:26 +0000 (16:45 -0200)]
fedora-spec: more simple description
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:25 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:24 +0000 (16:45 -0200)]
fedora-spec: removed extra space
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:23 +0000 (16:45 -0200)]
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>
Flavio Leitner [Thu, 6 Nov 2014 18:45:22 +0000 (16:45 -0200)]
fedora-spec: source line points to upstream tarball
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:21 +0000 (16:45 -0200)]
fedora-spec: remove stale comment
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:20 +0000 (16:45 -0200)]
fedora-spec: use default buildroot
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Flavio Leitner [Thu, 6 Nov 2014 18:45:19 +0000 (16:45 -0200)]
fedora.spec: added license details
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 6 Nov 2014 21:48:39 +0000 (13:48 -0800)]
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>
Madhu Challa [Thu, 6 Nov 2014 18:55:08 +0000 (10:55 -0800)]
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>
Pravin B Shelar [Wed, 5 Nov 2014 23:21:54 +0000 (15:21 -0800)]
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>-
Simon Horman [Wed, 5 Nov 2014 23:55:47 +0000 (15:55 -0800)]
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>
Andy Zhou [Thu, 16 Oct 2014 22:23:11 +0000 (15:23 -0700)]
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>
Eitan Eliahu [Thu, 6 Nov 2014 02:09:19 +0000 (18:09 -0800)]
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>
Eitan Eliahu [Wed, 5 Nov 2014 09:39:20 +0000 (01:39 -0800)]
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>
Jean Tourrilhes [Thu, 30 Oct 2014 23:17:16 +0000 (16:17 -0700)]
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>
Jean Tourrilhes [Fri, 31 Oct 2014 20:46:43 +0000 (13:46 -0700)]
ovs-testcontroller: Fix priority of non table-miss flow entries.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Pravin B Shelar [Wed, 29 Oct 2014 09:45:48 +0000 (02:45 -0700)]
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>
Jean Tourrilhes [Wed, 22 Oct 2014 19:41:50 +0000 (12:41 -0700)]
tests: Make sure test for actset_output tests initial condition.
ONF-JIRA: EXT-233
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Ben Pfaff [Tue, 4 Nov 2014 19:17:11 +0000 (11:17 -0800)]
ofproto-dpif: Make ofproto/trace a bit more like real packet translation.
Until now, ofproto/trace has looked up the flow itself. xlate_actions()
can do the flow lookup internally and, since that is what happens when a
packet arrives, having it do its own packet lookup makes a lot of sense.
I noticed this in connection with the actset_output field, which
xlate_actions() should set to OFPP_UNSET at the beginning of translation
before looking up the flow. ofproto/trace didn't do that, so it looked
up a rule with actset_output=0 instead. By having xlate_actions() do the
lookup, the behavior can be consistent and correct.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Tue, 4 Nov 2014 19:09:49 +0000 (11:09 -0800)]
ofproto-dpif-xlate: Add drop_frags_rule to struct xbridge.
It will be used in an upcoming commit.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Motonori Shindo [Tue, 4 Nov 2014 16:12:18 +0000 (01:12 +0900)]
netflow: Fix interpretation of flow_seq.
'flow_seq" field in NetFlow v5 header should represent a number of NetFlow
flow records exported while it is representing the number of NetFlow
packets exported in the current code. This patch fixes this problem.
Signed-off-by: Motonori Shindo <motonori@shin.do>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Tue, 4 Nov 2014 17:24:24 +0000 (09:24 -0800)]
ovs-router: Fix sparse warning
Fixes following warning:
../lib/ovs-router.c:162:11: warning: incorrect type in assignment
(different base types)
../lib/ovs-router.c:162:11: expected restricted ovs_be32
[usertype] <noident>
../lib/ovs-router.c:162:11: got restricted ovs_be16
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
David Verbeiren [Tue, 14 Oct 2014 17:01:49 +0000 (19:01 +0200)]
netdev-dpdk: Fix DPDK rings broken by multi queue
DPDK rings don't need one queue per PMD thread and don't support multiple
queues (set_multiq function is undefined). To fix operation with DPDK rings,
this patch ignores EOPNOTSUPP error on netdev_set_multiq() and provides, for
DPDK rings, a netdev send() function that ignores the provided queue id
(= PMD thread core id).
Suggested-by: Maryam Tahhan <maryam.tahhan@intel.com>
Signed-off-by: David Verbeiren <david.verbeiren@intel.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Simon Horman [Tue, 4 Nov 2014 06:14:04 +0000 (15:14 +0900)]
ofp-print: Use ds_chomp() in ofp10_match_to_string()
Slightly simplify ofp10_match_to_string() by using ds_chomp()
rather than open-coding its logic.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Tue, 4 Nov 2014 06:13:45 +0000 (15:13 +0900)]
match: Use ds_chomp() in match_format()
Slightly simplify match_format() by using ds_chomp()
rather than open-coding its logic.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 3 Nov 2014 22:24:01 +0000 (14:24 -0800)]
flow: Support OF1.5+ (draft) actset_output field.
This field allows a flow table to match on the output port currently in the
action set.
ONF-JIRA: EXT-233
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Fri, 10 Oct 2014 05:57:47 +0000 (22:57 -0700)]
nx-match: Add support for multiple OXM field assignments for one field.
actset_output, to be added in an upcoming commit, has one OXM assignment
in OpenFlow 1.3 and another one in OpenFlow 1.5. This commit allows both
of them to be supported in appropriate OpenFlow versions.
This feature is difficult to test on its own, so the same commit that adds
actset_output support also tests this feature.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Pravin B Shelar [Mon, 3 Nov 2014 16:55:12 +0000 (08:55 -0800)]
datapath: Fix compat checks for ipv6_skip_exthdr()
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Jarno Rajahalme [Mon, 3 Nov 2014 22:40:22 +0000 (14:40 -0800)]
ofproto-dpif-xlate: Do not clear ports with frags in xlate_actions().
Transport ports are already cleared for lookup if need be, and they
should be available for action processing, so do not clear them in
xlate_actions().
A drop flow takes care of dropping the packet, so no special case is
needed in xlate_actions().
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Mon, 3 Nov 2014 22:40:22 +0000 (14:40 -0800)]
tests/ofproto-dpif - fragment handling: Add detail.
Add transport port modifications to the existing frags handling test
case.
This demonstrates incorrect behavior by not moving the destination
port number to source port in normal mode for first fragment, as the
transport port numbers have been zeroed and the move has no effect,
and by allowing moves to/from transport ports on later fragments
(which do not have a transport header).
Next patches fix these problems.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Thu, 16 Oct 2014 18:38:16 +0000 (11:38 -0700)]
route-table: extract gw information.
Routing table will be used by ovs userspace tunneling, it need to
know gw address, following commit extract gw information from
netlink message so that ovs can populate it in ovs route table.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Pravin B Shelar [Thu, 16 Oct 2014 18:38:12 +0000 (11:38 -0700)]
route-table: Use classifier to store routing table.
Rather than using hmap for storing routing entries we can directly use
classifier which has support for priority and wildcard entries.
This makes route lookup lockless. This help when we use route lookup
for native tunneling.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Pravin B Shelar [Thu, 16 Oct 2014 18:38:06 +0000 (11:38 -0700)]
route-table: get rid of name-table
name table maintains device ifindex to name mapping. On any name
table changes it invalidate name table and routing table. So
rather than building two tables this patch moves dev name to routing
entry and build routing table on any name table changes.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Ben Pfaff [Fri, 3 Oct 2014 22:49:23 +0000 (15:49 -0700)]
xenserver: Turn on SSE and SSE2 for the build, for atomic 64-bit ops.
The ovs-atomic-i586 implementation of atomic operations can implement
64-bit atomics more efficiently when SSE is supported. XenServer runs only
on 64-bit capable processors, in 32-bit mode, so we know on XenServer that
SSE and SSE2 are supported because they are architectural for amd64. Thus,
this commit enables SSE and SSE2 when building for XenServer to get the
improved atomics support.
I tested that this successfully adds -msse -msse2 to the compiler flags
inside a XenServer DDK, but I didn't actually run it on a real XenServer
install.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Jesse Gross [Fri, 31 Oct 2014 23:47:45 +0000 (16:47 -0700)]
packets: Use WORDS_BIGENDIAN for struct geneve_opt.
The macro LITTLE_ENDIAN is a constant, not a test for endianness,
so it doesn't actually tell us anything about the machine.
WORDS_BIGENDIAN is both correct and defined by configure so it is
more portable.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Fri, 31 Oct 2014 21:14:56 +0000 (14:14 -0700)]
test-classifier: Ensure priority is not INT_MIN.
Classifier reserves the priority value INT_MIN for its own use.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Jarno Rajahalme [Fri, 31 Oct 2014 23:22:23 +0000 (16:22 -0700)]
classifier: Use rculist.
The list of identical, but lower priority rules is not currently used
in classifier lookup. A later patch introducing conjunctive matches
needs to access the list during lookups, so we must make the list RCU.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Fri, 31 Oct 2014 21:05:46 +0000 (14:05 -0700)]
odp-util: Fix segfault in MPLS attribute parsing.
Just because the ethertype is MPLS, this doesn't mean that the datapath
understands and provides OVS_KEY_ATTR_MPLS attributes for the flow.
Previously we would check the size of the OVS_KEY_ATTR_MPLS attribute
before checking whether the attribute is present. This would cause a
segfault in nl_attr_get_size(), usually triggered from a handler thread.
This patch brings the MPLS parsing code more in line with the rest of
the parse_l2_5_onward() function, by only processing MPLS if the
attribute is present.
Reported-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Fri, 31 Oct 2014 06:02:29 +0000 (19:02 +1300)]
ovs-ofctl: Improve error message for meter=0.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Fri, 31 Oct 2014 08:14:47 +0000 (17:14 +0900)]
ofp-print-ofctl: Free group buckets.
Found by inspection using make check-valgrind.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Fri, 31 Oct 2014 08:14:46 +0000 (17:14 +0900)]
ovs-ofctl: Free group buckets.
To some extent this is cosmetic because ovs-ovfctl will immediately
exit. However, it does seem to be in keeping with freeing 'gms' in
ofctl_group_mod_file().
Found by inspection using make check-valgrind.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 31 Oct 2014 16:49:02 +0000 (09:49 -0700)]
AUTHORS: Add Scott Lowe <scott.lowe@scottlowe.org>.
Contributors to the webpage deserve authorship credit too.
CC: Scott Lowe <scott.lowe@scottlowe.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Wed, 29 Oct 2014 22:18:19 +0000 (15:18 -0700)]
datapath-windows: Increase the maximum size of port name.
In userspace, port name sizes are restricted to IFNAMSIZ which is
defined to IF_NAME_SIZE in:
C:\Program Files (x86)\Windows Kits\8.1\Include\shared\netioapi.h
In the kernel, since IFNAMSIZ was not available, we previously defined a
value of 16 for the kernel. This is restrictive for Openstack
integration where we use UUID as the name.
In this patch, we make the kernel code also use the same value as the
userspace.
Also updated is the OVS.psm1 powershell script which now allows friendly
names to be upto 48 bytes.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Wed, 29 Oct 2014 22:18:18 +0000 (15:18 -0700)]
datapath-windows: Fix locking code in OvsGetNetdevCmdHandler().
We were acquiring locks twice, and forgotten to release a lock in an
error case.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Wed, 29 Oct 2014 22:18:17 +0000 (15:18 -0700)]
datapath-windows: Nuke USE_NEW_VPORT_ADD_WORKFLOW.
We were using USE_NEW_VPORT_ADD_WORKFLOW while transitioning from old
workflow for adding ports. We don't need it anymore.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Thu, 30 Oct 2014 20:17:43 +0000 (13:17 -0700)]
datapath-windows: Don't leak NBLs with multiple NBs.
Currently, if we receive an NBL with multiple NBs from NDIS, we just
ASSERT() and not do anything. The right thing to do obviously is to
process the NBL. This is a work in progress.
In the meantime, we should complete the NBL and not just leak it.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 30 Oct 2014 18:40:07 +0000 (11:40 -0700)]
classifier: Change type used for priorities from 'unsigned int' to 'int'.
OpenFlow has priorities in the 16-bit unsigned range, from 0 to 65535.
In the classifier, it is sometimes useful to be able to have values below
and above this range. With the 'unsigned int' type used for priorities
until now, there were no values below the range, so some code worked
around it by converting priorities to 64-bit signed integers. This didn't
seem so great to me given that a plain 'int' also had the needed range.
This commit therefore changes the type used for priorities to int.
The interesting parts of this change are in pvector.h and classifier.c,
where one can see the elimination of the use of int64_t.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Thu, 30 Oct 2014 17:38:06 +0000 (10:38 -0700)]
netdev-linux: Avoid depending on kernel definition of rtnl_link_stats64.
We have to define our own with some kernel headers, so we might as well do
it everywhere, especially since there seems to be a problem with detecting
the presence of the definition with at least some kernels.
Reported-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
Alex Wang [Mon, 20 Oct 2014 04:36:58 +0000 (21:36 -0700)]
utilities: Add bash command-line completion script.
This patch adds bash command-line completion script for ovs-appctl,
ovs-dpctl, ovs-ofctl and ovsdb-tool command. Right now, the script
can do the following:
- display available completion or complete on unfinished user input
(long option, subcommand, and argument).
- once the subcommand (e.g. ofproto/trace) has been given, the
script will print the subcommand format.
- the script can convert between keywords like 'bridge/port/interface/dp'
and the available record in ovsdb.
The limitations are:
- only support small set of important keywords
(dp, datapath, bridge, switch, port, interface, iface).
- does not support parsing of nested options
(e.g. ovsdb-tool create [db [schema]]).
- does not support expansion on repeatitive argument
(e.g. ovs-dpctl show [dp...]).
- only support matching on long options, and only in the format
(--option [arg], i.e. should not use --option=[arg]).
To use the script, either copy it inside /etc/bash_completion.d/
or manually run it via . ovs-command-compgen.bash.
Also, a unit testsuite is provided as ovs-command-compgen-test.bash.
It is suggested that this test script be run only inside
tutorial/sandbox directory.
For more info please refer to utilities/ovs-command-compgen.INSTALL.md.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Wang Sheng-Hui [Thu, 30 Oct 2014 04:55:33 +0000 (12:55 +0800)]
tests: Check the existance of WHY-OVS.md instead of WHY-OVS.
WHY-OVS has been renamed to WHY-OVS.md. Update the filenames in run-oftest
and run-ryu scripts
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Wed, 29 Oct 2014 18:34:40 +0000 (11:34 -0700)]
ovs_assert, tests: Support NDEBUG.
./configure accepts --enable-ndebug option. Make ovs_assert() honor
it, and make sure all test programs disable it.
The order of include files in test programs is also made uniform:
1. #include <config.h>
2. #undef NDEBUG
3. Include file of the test subject (to make sure it itself has
sufficient include directives).
4. System includes in alphapetical order.
5. OVS includes in aplhapetical order.
Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Wed, 29 Oct 2014 17:15:42 +0000 (10:15 -0700)]
list: Inline all functions.
All of the list functions are really small, so inlining them should be
beneficial.
Requested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Thomas Graf [Thu, 30 Oct 2014 12:04:14 +0000 (13:04 +0100)]
doc: Add more cross references between docs
Suggested-by: Lori Jakab <lojakab@cisco.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Reviewed-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Wed, 29 Oct 2014 20:53:10 +0000 (13:53 -0700)]
debian: Fix broken build during package creation.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 29 Oct 2014 21:59:48 +0000 (14:59 -0700)]
vswitch.xml: Improve IPFIX documentation.
A coworker came by yesterday with a question about IPFIX in Open vSwitch.
I did not know the answer, so I read the documentation. The documentation
was harder to understand than necessary. This change should make it easier
to understand by providing an overview of the two forms of configuration
and grouping together the columns that apply only to one form of
configuration.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 15 Oct 2014 20:05:55 +0000 (13:05 -0700)]
vswitch.xml: Fix spelling errors in documentation.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 29 Oct 2014 21:11:07 +0000 (14:11 -0700)]
ovs-vsctl: Allow referring to rows whose names are UUIDs by those names.
Every row in the database has a UUID, generated by the database server.
Rows in most tables also have a user-assigned name (e.g. a bridge or port
or interface name). The ovs-vsctl database commands (e.g. "set", "get",
"list", ...) accept both UUIDs and names, but until now if a command's
argument had the form of a UUID, then it had to be the database-assigned
UUID for a row; that is, ovs-vsctl did not check whether it was the name
of a row. This commit changes that: a UUID argument to a database command
is now first checked against database UUIDs then, if it is not a database
UUID, it is checked as the name of a row.
This is prompted by Windows integration with OpenStack, which uses UUIDs
as port names.
CC: Nithin Raju <nithin@vmware.com>
Requested-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 29 Oct 2014 15:55:30 +0000 (08:55 -0700)]
netdev-linux: Add support for 64-bit network device stats.
Reported-by: Andrey Korolyov <andrey@xdel.ru>
Tested-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Wed, 29 Oct 2014 12:54:45 +0000 (05:54 -0700)]
docker: Update documentation to reflect risks of retiring ovs-docker.
Requested-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Flavio Leitner <fbl@redhat.com>