Ethan Jackson [Thu, 21 Nov 2013 01:41:02 +0000 (17:41 -0800)]
ofproto-dpif-upcall: Add memory usage stats.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Thu, 21 Nov 2013 01:12:40 +0000 (17:12 -0800)]
ofproto: Remove run_fast() functions.
They don't really make sense in a multithreaded architecture. Once
flow miss batches are dispatched with, they will be extra useless.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Tue, 17 Sep 2013 21:35:53 +0000 (14:35 -0700)]
ofproto: Replace reval_seq with a struct seq.
Future patches will need to poll_block() on it.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Thu, 5 Dec 2013 21:09:27 +0000 (13:09 -0800)]
ofproto-dpif-xlate: Add a mechanism to skip wildcard calculation.
As time goes on and the classifier becomes more complicated, calculate
the wildcard mask will get more and more expensive. This patch adds a
mechanism to xlate_actions() allowing callers to disable wildcard
calculation when it isn't really necessary. Used in future patches.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Wed, 13 Nov 2013 02:18:01 +0000 (18:18 -0800)]
ofproto: Move all statistics accounting into xlate_actions().
This patch moves statistics accounting for netflow, bonding, netdev,
and mirroring inside xlate_actions(). Moving all statistics into one
place makes it very difficult to mess up.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Thu, 31 Oct 2013 23:23:13 +0000 (16:23 -0700)]
ofproto: Retrieve ipfix, sflow and netflow in xlate_receive().
This seems cleaner than having separate accessors for them.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Wed, 11 Dec 2013 01:23:36 +0000 (10:23 +0900)]
ovs-ofctl: Update push_mpls documentation
* The ethertype of the packet is always set to
the ethertype of the push_mpls action
* Drop references to unicast and multicast MPLS ethertypes,
in RFC5332 0x8847 and 0x8848 do not always have
those meanings.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Wed, 30 Oct 2013 23:29:58 +0000 (16:29 -0700)]
ofproto: Handle netflow similarly to ipfix and sflow in xlate.
This patch changes how ofproto-dpif-xlate handles netflow so that it's
more similar to how ipfix and sflow are handled. This not only
simplifies the code, but it will allow xlate to call netflow in future
if necessary.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Sat, 7 Dec 2013 22:38:14 +0000 (14:38 -0800)]
ofproto: New function netflow_exists().
Useful in future patches.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Wed, 30 Oct 2013 19:59:15 +0000 (12:59 -0700)]
netflow: Make thread safe.
In future patches upcall handler threads will need to update netflow.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Wed, 23 Oct 2013 06:07:55 +0000 (23:07 -0700)]
ofproto: Modularize netflow.
The netflow code has its tentacles all over the ofproto-dpif module.
This is fine today, but in future facets, which correspond roughly to
netflow_flows, will be retired. In preparation, this patch hides as
much implementation detail as possible inside the netflow module.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Fri, 13 Dec 2013 03:33:48 +0000 (03:33 +0000)]
ofproto-dpif: Only run bundles when lacp or bonds are enabled
When dealing with a large number of ports, bundle_run() and
bundle_wait() add significant unnecessary processing to the main run
loop, even when there are no bonds and lacp is not configured. This
patch skips such execution if it is unneeded, reducing average CPU usage
of the main thread from about 25% to about 20% in a test environment of
5000 internal ports and 50 tunnel ports running bfd.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ethan Jackson [Fri, 15 Nov 2013 23:55:19 +0000 (15:55 -0800)]
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>
Joe Stringer [Fri, 13 Dec 2013 03:33:49 +0000 (03:33 +0000)]
bridge: Only store instant_stats on device changes
Previously, we iterated through all interfaces in instant_stats_run(),
grabbing up-to-date information about device and port status. After
assembling all of this information for all interfaces, we would
determine whether anything changed and only send an update to
ovsdb-server if something changed.
This patch uses the new global connectivity_seq to determine whether
there have been any changes before polling all interfaces, which reduces
unnecessary processing in the average case. In a test environment of
5000 internal ports and 50 tunnel ports with bfd, this reduces average
CPU usage of the main thread from about 15% to about 5%. When ports
change status more often than every 100ms, CPU usage is expected to
increase to previous rates.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Joe Stringer [Fri, 13 Dec 2013 03:33:47 +0000 (03:33 +0000)]
ofproto-dpif: Don't poll ports when nothing changes
Previously, as part of ofproto-dpif run() processing, we would loop
through all ports and poll for changes to carrier, bfd, cfm and lacp
status. This information is used to determine whether bundles may be
enabled, and to perform revalidation when needed.
This patch makes the bfd, cfm, lacp and stp modules aware of the new
global connectivity_seq, notifying on changes in port status. We can
then use connectivity_seq to check if anything has changed before
looping through all ports in ofproto-dpif. In a test environment of 5000
internal ports and 50 tunnel ports with bfd, this reduces average CPU
usage of the main thread from about 35% to about 25%.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Joe Stringer [Fri, 13 Dec 2013 03:33:46 +0000 (03:33 +0000)]
netdev: Globally track port status changes
Previously, we tracked status changes for ofports on a per-device basis.
Each time in the main thread's loop, we would inspect every ofport
to determine whether the status had changed for corresponding devices.
This patch replaces the per-netdev change_seq with a global 'struct seq'
which tracks status change for all ports. In the average case where
ports are not constantly going up or down, this allows us to check the
sequence once per main loop and not poll any ports. In the worst case,
execution is expected to be similar to how it is currently.
In a test environment of 5000 internal ports and 50 tunnel ports with
bfd, this reduces average CPU usage of the main thread from about 40% to
about 35%.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ethan Jackson [Tue, 12 Nov 2013 02:06:13 +0000 (18:06 -0800)]
ofproto: Remove arbitrary handler thread limit.
There's no particular reason to limit the number of handler threads to
64. If someone wants to try more, let them.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Thu, 5 Dec 2013 03:32:02 +0000 (19:32 -0800)]
ofproto-dpif: Remove dead code.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Thu, 12 Dec 2013 16:27:41 +0000 (08:27 -0800)]
lib/util: More portable use of builtin popcnt.
- Use the GCC predefined macro __POPCNT__ to detect the availability
of fast __builtin_popcnt function.
- Use portable preprocessor macros to detect 64-bit build.
- Only define the 32-bit parts when needed and declare the
count_1bits_8 at file scope to silence a warning.
This time I have tested all code paths to make sure no warnigns are
generated.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Ben Pfaff [Wed, 11 Dec 2013 23:40:52 +0000 (15:40 -0800)]
bridge: Support changing port numbers.
Feature #21293.
Requested-by: Anuprem Chalvadi <achalvadi@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 12 Dec 2013 01:55:26 +0000 (17:55 -0800)]
bridge: Reconfigure in single pass.
This greatly simplifies the reconfiguration code, making it much easier
to understand and modify. The old multi-pass configuration had the
property that it didn't delay block packet processing as much, but that's
not much of a worry anymore now that latency critical activities have
been moved outside the main thread.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Thu, 12 Dec 2013 05:46:22 +0000 (05:46 +0000)]
ovs-thread: Reduce logging level for cpuinfo parsing
This was causing test failures on non-Linux platforms.
Reported-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Andy Zhou [Wed, 11 Dec 2013 07:32:51 +0000 (23:32 -0800)]
ofproto-dpif: Ignore non-packet field masks during flow revalidation
Commit
bcd2633a5be(ofproto-dpif: Store relevant fields for wildcarding
in facet) implements flow revalidation by comparing the newly looked
up flow mask with that of the existing facet.
The non-packet fields, such as register masks, are always cleared
by xlate_actions in the masks stored within facets, but they are not
cleared in the newly looked up flow masks, causing otherwise valid
flows to be declared as invalid flows and be removed from the datapath.
This patch provides a fix. I was able to verify the fix on a system set
up by Ying Chen where the bug can be reproduced.
Bug #21680
Reported by: Ying Chen <yingchen@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Jarno Rajahalme [Wed, 11 Dec 2013 19:20:00 +0000 (11:20 -0800)]
lib/jhash.c: Fix comment.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Wed, 11 Dec 2013 19:20:00 +0000 (11:20 -0800)]
datapath: Fix sparse warning.
Make the new compat function skb_flow_get_ports() static to silence a
sparse warning.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Ben Pfaff [Wed, 11 Dec 2013 06:42:07 +0000 (22:42 -0800)]
lacp: Make lacp negotiation test hard-code aggregation keys.
The lacp implementation takes the aggregation key from the key or portid
of the first slave to be added to the lacp object. When multiple slaves
are added initially to a lacp object (the most common case), which is the
"first" is arbitrary. Until now, it seems that the "first" was actually
predictable enough for the tests to (unknowingly) rely on it, but an
upcoming commit will break that. This commit fixes the test by forcing
a particular aggregation key for each lacp object.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Wed, 11 Dec 2013 18:50:10 +0000 (10:50 -0800)]
netdev: Log a warning when netdev_set_config() fails.
This allows its callers to avoid duplicating the code.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Mon, 9 Dec 2013 23:39:07 +0000 (15:39 -0800)]
ofproto: Fix alphabetical order in list of structs.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Mon, 9 Dec 2013 23:38:25 +0000 (15:38 -0800)]
ofproto: Make ofproto_enumerate_types() match its comment.
The comment says that it clears the passed-in sset, but it didn't. The bug
didn't actually affect any of the existing callers, which all passed in an
empty sset.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Wed, 11 Dec 2013 00:34:07 +0000 (16:34 -0800)]
ofproto-provider: Add comment on struct ofport.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Mon, 9 Dec 2013 23:36:43 +0000 (15:36 -0800)]
ofproto-dpif: Improve comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Jarno Rajahalme [Wed, 11 Dec 2013 19:07:01 +0000 (11:07 -0800)]
Classifier: Track address prefixes.
Add a prefix tree (trie) structure for tracking the used address
space, enabling skipping classifier tables containing longer masks
than necessary for an address field value in a packet header being
classified. This enables less unwildcarding for datapath flows in
parts of the address space without host routes.
Trie lookup is interwoven to the staged lookup, so that a trie is
searched only when the configured trie field becomes relevant
for the lookup. The trie lookup results are retained so that each
trie is checked at most once for each classifier lookup.
This implementation tracks the number of rules at each address prefix
for the whole classifier. More aggressive table skipping would be
possible by maintaining lists of tables that have prefixes at the
lengths encountered on tree traversal, or by maintaining separate
tries for subsets of rules separated by metadata fields.
Prefix tracking is configured via OVSDB. A new column "prefixes" is
added to the database table "Flow_Table". "prefixes" is a set of
string values listing the field names for which prefix lookup should
be used.
As of now, the fields for which prefix lookup can be enabled are:
- tun_id, tun_src, tun_dst
- nw_src, nw_dst (or aliases ip_src and ip_dst)
- ipv6_src, ipv6_dst
There is a maximum number of fields that can be enabled for any one
flow table. Currently this limit is 3.
Examples:
ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- \
--id=@N1 create Flow_Table name=table0
ovs-vsctl set Bridge br0 flow_tables:1=@N1 -- \
--id=@N1 create Flow_Table name=table1
ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src
ovs-vsctl set Flow_Table table1 prefixes=[]
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Wed, 11 Dec 2013 19:07:01 +0000 (11:07 -0800)]
dpif-netdev: Properly create exact match masks.
Normally OVS userspace supplies a mask along with a flow key for each
new data path flow that should be created. OVS also provides an
option to disable the kernel wildcarding, in which case the flows are
created without a mask. When kernel wildcarding is disabled, the
datapath should use exact match, i.e. not wildcard any bits in the
flow key. Currently, what happens with the userspace datapath instead
is that a datapath flow with mostly empty mask is created (i.e., most
fields are wildcarded), as the current code does not examine the given
mask key length to find out that the mask key is actually empty. This
results in the same datapath flow matching on packets of multiple
different flows, wrong actions being processed, and stats being
incorrect.
This patch refactors userspace datapath code to explicitly initialize
a suitable exact match mask when a flow put without a mask is
executed.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sat, 7 Dec 2013 16:17:55 +0000 (08:17 -0800)]
coverage: Fix build when linker sections not supported.
With this change, OVS builds and runs fine without linker section support.
CC: Linda Sun <lsun@vmware.com>
CC: Saurabh Shah <ssaurabh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 10 Dec 2013 05:19:00 +0000 (21:19 -0800)]
util: Fix sparse warning.
Without this commit, sparse warns:
lib/util.c:921:15: warning: symbol 'count_1bits_8' was not declared.
Should it be static?
Introduced by commit
c3cc4d2dd2658 (util: Better count_1bits().).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Joe Stringer [Tue, 26 Nov 2013 05:44:18 +0000 (05:44 +0000)]
bridge: Refresh STP statistics separately from status
Currently, we refresh STP status (id, state, role) alongside
statistics (rx, tx, errors), all within instant_stats_run(). This
patch splits statistics out, and refreshes them with the 5 second
stats instead. This paves the way to reducing execution of
instant_stats_run().
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Joe Stringer [Fri, 6 Dec 2013 07:42:21 +0000 (07:42 +0000)]
lib: Determine cpu core count with /proc/cpuinfo.
On systems that provide /proc/cpuinfo similar to Linux on x86, this
should allow us to choose a better default value for the number of
upcall handler threads -- in particular, it avoids counting
hyper-thread cores. If /proc/cpuinfo cannot be parsed for any reason,
fall back to using sysconf().
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Joe Stringer [Fri, 6 Dec 2013 07:42:20 +0000 (07:42 +0000)]
lib: Refactor gathering CPU core count
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Tue, 10 Dec 2013 01:34:53 +0000 (17:34 -0800)]
bfd: Change the update of forwarding flag.
Currently, we update the forwarding flag in bfd_set_state() and in
bfd_forwarding_if_rx_update() if bfd_forwarding_if_rx is enabled.
However, these are not the exact places where the forwarding flag
needs to be updated. The exact places are in the bfd_process_packet()
where bfd status are changed based on received control packet, and in
the flow_push_stats() and compose_output_action__() where the
rx_packet counter is updated.
This commit changes the update of forwarding flag to the places
mentioned above.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
alex wang [Tue, 26 Nov 2013 06:26:33 +0000 (06:26 +0000)]
bfd: Refine unit tests for forwarding_if_rx and flap_count.
This commit refines the unit tests for forwarding_if_rx feature
and flap_count. Comments are added to explain each test case.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Andy Zhou [Fri, 6 Dec 2013 21:27:26 +0000 (13:27 -0800)]
ofproto: Move bond files to ofproto
Relocating bond.[ch] to allow bond.c to make ofproto calls.
This is needed for upcoming patches that enable megaflow support
for bond ports.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Jesse Gross [Fri, 6 Dec 2013 21:17:33 +0000 (13:17 -0800)]
datapath: Don't allocate space for per-CPU flow stats from cache.
Per-CPU flow stats are now allocated separately (if necessary) so
there's no longer any need to allocate space for them directly in
the base flow.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Jarno Rajahalme [Wed, 27 Nov 2013 20:58:46 +0000 (12:58 -0800)]
util: Better count_1bits().
Inline, use another well-known algorithm for 64-bit builds, and use
builtins when they are known to be fast at compile time. A 32-bit
version of the alternate algorithm is slower than the existing
implementation, so the old one is used for 32-bit builds. Inline
assembler would be a bit faster on 32-bit i7 build, but we use the GCC
builtin for portability.
It should be stressed builds for specific CPUs do not work on others
CPUs, and that OVS build system or runtime does not currently support
CPU detection.
Speed improvement v.s. existing implementation / GCC 4.7
__builtin_popcountll():
i386: 64% (inlining) / 380%
i386 on i7: 240% (inlining + builtin) / 820%
x86_64: 59% (inlining + different algorithm) / 190%
x86_64 on i7: 370% (inlining + builtin) / 0%
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Fri, 6 Dec 2013 20:43:20 +0000 (12:43 -0800)]
lib/flow: Add IPv6 support for flow_compose().
Add the missing code for generating IPv6 packets for testing purposes.
Also make flow_compose() set the l4 and l7 pointers more consistently
with flow_extract().
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Fri, 6 Dec 2013 19:43:02 +0000 (11:43 -0800)]
datapath: compat: Fix compilation for kernel 3.5
ipv6_addr_hash() is not available on kernel 3.5, Use compat version.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Fri, 6 Dec 2013 18:43:12 +0000 (10:43 -0800)]
datapath: compat: Fix Compiler error for kernel 3.3 to 3.8
Kernel 3.3 to 3.8 has defined `struct flow_keys` but does not
contains flow_keys.thoff field. Therefore we need to use
compat definition for flow_keys struct.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Henry Mai [Fri, 6 Dec 2013 01:01:30 +0000 (17:01 -0800)]
vlog: Add option to send vlog syslog output to arbitrary UDP destination.
Signed-off-by: Henry Mai <henrymai@nicira.com>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Fri, 6 Dec 2013 03:48:46 +0000 (19:48 -0800)]
datapath: compat: Fix compiler error.
Earlier RHEL6 kernel do not have linux/atomic.h header
file. Use types.h to get atomic_t definition.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Jarno Rajahalme [Fri, 6 Dec 2013 16:30:17 +0000 (08:30 -0800)]
lib/odp-util: Only use expected_bit when set.
parse_l2_5_onward() previously used out of range 'expected_bit' when
it was called with no attrs, which happens when parsing a mask with
zero length.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Thu, 21 Nov 2013 17:28:40 +0000 (09:28 -0800)]
cccl: Add the DEBUG option for linker.
The /DEBUG option creates debugging information for
the .exe file
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Thu, 5 Dec 2013 23:50:27 +0000 (15:50 -0800)]
datapath: Use percpu allocator for flow-stats.
Use percpu allocator for stats due to objection to stats array.
But percpu allocator is not designed for high churn allocation/
deallcation. so we need to avoid allocating percpu flow for
short lived flows. One cheaper way to detect flow is by checking
if 5-tuple used in RSS are masked or not. if any one of them is
masked, flow is likely shared across CPU where percpu stat
should be more scalable. And that flow should be relatively
long lived flow.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Wed, 4 Dec 2013 19:26:44 +0000 (11:26 -0800)]
datapath: lisp: Use skb rxhash for source port.
Rather than using complete flow hash, we can use skb->rxhash for
calculating source port. Similar calculation is done by vxlan.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Wed, 4 Dec 2013 19:26:36 +0000 (11:26 -0800)]
datapath: Add compile time check for rxhash
Some distribution kernel has backported skb->rxhash (e.g. RHEL)
Following patch allows use precalculated rxhash.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Reviewed-by: Thomas Graf <tgraf@redhat.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Tue, 3 Dec 2013 16:33:36 +0000 (08:33 -0800)]
datapath: Improve compat rxhash functionality.
Following patch improves rxhash calculation, It is taken from
upstream Linux kernel code.
From kernel 3.8, skb_get_rxhash() can handle hardware generated
l4-rxhash. Therefore compat skb_get_rxhash() is not used on
kernel 3.8 or new.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Reviewed-by: Thomas Graf <tgraf@redhat.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Thu, 5 Dec 2013 05:24:49 +0000 (21:24 -0800)]
datapath: Fix compat skb_get_rxhash()
Add missing return statement.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Thu, 5 Dec 2013 19:43:50 +0000 (11:43 -0800)]
bridge: Improve iface_set_ofport() style.
This should behave the same as before but the code reads more naturally to
me this way.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Thu, 5 Dec 2013 17:27:54 +0000 (09:27 -0800)]
m4: Remove assignment of otherwise unused variable RESOLVER_LIBS.
Found by inspection.
Signed-off-by: Ben Pfaff <blp@nicira.com>
James Page [Thu, 5 Dec 2013 17:29:05 +0000 (17:29 +0000)]
Add check for -latomic
Later versions of gcc on some architectures push atomic functions
out into a separate atomic library; add a check to see when this
is required and add it to LIBS if need be.
Specifically the problem was observed on GCC 4.8.2 on powerpc
architecture for Ubuntu 14.04:
https://launchpadlibrarian.net/
155235096/buildlog_ubuntu-trusty-powerpc.openvswitch_2.0.0-0ubuntu1_FAILEDTOBUILD.txt.gz
Signed-off-by: James Page <james.page@ubuntu.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Andy Zhou [Thu, 5 Dec 2013 05:56:25 +0000 (21:56 -0800)]
lib/meta-flow: remove unused function
Remove mf_random_value() which does not have any user now.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Flavio Leitner [Tue, 3 Dec 2013 01:13:16 +0000 (23:13 -0200)]
fedora package: include python byte compiled files
Include byte compiled files to speed up the execution,
to avoid spurious SELinux AVC denials and also to make
rpm happy when checking for unpackaged files:
RPM build errors:
Installed (but unpackaged) file(s) found:
/usr/share/openvswitch/python/argparse.pyc
/usr/share/openvswitch/python/argparse.pyo
/usr/share/openvswitch/python/ovs/__init__.pyc
[...]
Package guideline reference:
https://fedoraproject.org/wiki/Packaging:Python?rd=Packaging/Python#Files_to_include
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Andy Zhou [Wed, 4 Dec 2013 08:28:03 +0000 (00:28 -0800)]
lib: refactor match_format() output functions
Refactor to remove some duplicated logic in match_format()
implemenation and make the output more uniform.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 4 Dec 2013 16:17:50 +0000 (08:17 -0800)]
ofp-util: Implement OpenFlow 1.1 packet-in message.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Ben Pfaff [Mon, 2 Dec 2013 21:17:37 +0000 (13:17 -0800)]
ofp-util: Break ofputil_encode_packet_in() into multiple functions.
This form makes it obvious that an OpenFlow 1.1 implementation is missing.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Thomas Graf [Wed, 4 Dec 2013 04:07:57 +0000 (20:07 -0800)]
datapath: Enable memory mapped Netlink i/o
Use memory mapped Netlink i/o for all unicast openvswitch
communication if a ring has been set up.
Benchmark
* pktgen -> ovs internal port
* 5M pkts, 5M flows
* 4 threads, 8 cores
Before:
Result: OK:
67418743(
c67108212+d310530) usec, 5000000 (9000byte,0frags)
74163pps 5339Mb/sec (5339736000bps) errors: 0
+ 2.98% ovs-vswitchd [k] copy_user_generic_string
+ 2.49% ovs-vswitchd [k] memcpy
+ 1.84% kpktgend_2 [k] memcpy
+ 1.81% kpktgend_1 [k] memcpy
+ 1.81% kpktgend_3 [k] memcpy
+ 1.78% kpktgend_0 [k] memcpy
After:
Result: OK:
24229690(
c24127165+d102524) usec, 5000000 (9000byte,0frags)
206358pps 14857Mb/sec (14857776000bps) errors: 0
+ 2.80% ovs-vswitchd [k] memcpy
+ 1.31% kpktgend_2 [k] memcpy
+ 1.23% kpktgend_0 [k] memcpy
+ 1.09% kpktgend_1 [k] memcpy
+ 1.04% kpktgend_3 [k] memcpy
+ 0.96% ovs-vswitchd [k] copy_user_generic_string
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Jesse Gross [Wed, 4 Dec 2013 04:06:09 +0000 (20:06 -0800)]
datapath: Add backport for genlmsg_new_unicast().
genlmsg_new_unicast() will be proposed upstream to support memory
mapped Netlink but on existing kernels it just uses genlmsg_new().
Signed-off-by: Jesse Gross <jesse@nicira.com>
Simon Horman [Tue, 26 Nov 2013 07:34:23 +0000 (16:34 +0900)]
ofproto: Add OF1.4 elements to enum ofp_table_config
Add elements to enum ofp_table_config for table mod bits
defined in OpenFlow1.4.
Also tidy up the indentation of existing elements.
Signed-off-by: Simon Horman <horms@verge.net.au>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Tue, 3 Dec 2013 21:41:41 +0000 (13:41 -0800)]
tests/ofproto-dpif.at: Avoid testing with incomplete TCP packets.
Use nw_proto values that generate less "expected but not present”
debug logging due to parsing errors for netdev-dummy/receive.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Tue, 3 Dec 2013 21:41:41 +0000 (13:41 -0800)]
lib/util: Add clz32() and clz64().
Count leading zeroes using builtin if available.
Make log_2_floor() use raw_clz() and inline log_2_floor() and
log_2_ceil().
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Tue, 3 Dec 2013 21:41:41 +0000 (13:41 -0800)]
lib/util: Rename ctz() as ctz32().
ctz() returns 32 for zero input, and we already have ctz64(),
so it makes sense to rename ctz() as ctz32().
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Tue, 3 Dec 2013 02:56:32 +0000 (18:56 -0800)]
datapath: Silence RCU lockdep checks from flow lookup.
Flow lookup can happen either in packet processing context or userspace
context but it was annotated as requiring RCU read lock to be held. This
also allows OVS mutex to be held without causing warnings.
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Reviewed-by: Thomas Graf <tgraf@redhat.com>
Jarno Rajahalme [Mon, 2 Dec 2013 23:14:09 +0000 (15:14 -0800)]
lib: More intuitive syntax for TCP flags matching.
Allow TCP flags match specification with symbolic flag names. TCP
flags are optionally specified as a string of flag names, each
preceded by '+' when the flag must be one, or '-' when the flag must
be zero. Any flags not explicitly included are wildcarded. The
existing hex syntax is still allowed, and is used in flow dumps when
all the flags are matched.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 2 Dec 2013 22:53:27 +0000 (14:53 -0800)]
byte-order: Make uint32_byteswap() available regardless of endianness.
pcap_read() can use it whether we're big-endian or not.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Fri, 22 Nov 2013 23:57:23 +0000 (15:57 -0800)]
ofproto-dpif: keep slow path flow time stamp up-to-date
Noting updating slow path subfacet's time stamp can cause their datapath
flows deleted periodically. For example, CFM datapath flow have usespace
actions that are handled in dpif slow path. They are deleted and
recreated periodically without the fix.
This bug are not obvious during normal operation. Deleted CFM flow
would cause CFM packets to be handled by flow miss handler which will
reinstall the flow in the datapath. The only potentially observable
behavior is that when the user space is overwhelmed with flow miss packets,
the periodic CFM miss packets may get stuck behind other miss packets,
cause tunnel flapping.
Ben refactored the patch to its current form.
Reported-by: Guolin Yang <gyang@nicira.com>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Simon Horman [Mon, 2 Dec 2013 12:04:45 +0000 (12:04 +0000)]
OPENFLOW-1.1+: Remove note about per-connection event filtering
It appears to me that this was implemented using existing NXT code in
2e1ae2005ed347d2 ("Initial OpenFlow 1.3 support").
Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Wed, 27 Nov 2013 05:25:24 +0000 (14:25 +0900)]
util: fix a printf format
revert a mistake in commit
34582733.
("Avoid printf type modifiers not supported by MSVC C runtime library.")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Jarno Rajahalme [Wed, 13 Nov 2013 22:07:55 +0000 (14:07 -0800)]
OPENFLOW-1.1+: Remove note about action translation.
Action translation to/from OpenFlow 1.2 set-field actions is done.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Alin Serdean [Tue, 26 Nov 2013 07:38:48 +0000 (23:38 -0800)]
Avoid printf type modifiers not supported by MSVC C runtime library.
The MSVC C library printf() implementation does not support the 'z', 't',
'j', or 'hh' format specifiers. This commit changes the Open vSwitch code
to avoid those format specifiers, switching to standard macros from
<inttypes.h> where available and inventing new macros resembling them
where necessary. It also updates CodingStyle to specify the macros' use
and adds a Makefile rule to report violations.
Signed-off-by: Alin Serdean <aserdean@cloudbasesolutions.com>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 25 Nov 2013 03:41:33 +0000 (12:41 +0900)]
sparse: Include stddef.h to ensure NULL is defined.
Include stddef.h in include/sparse/sys/socket.h to ensure
that NULL is defined and thus avoid the following sparse warning.
./include/sparse/sys/socket.h:74:15: error: undefined identifier 'NULL'
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 22 Nov 2013 23:58:31 +0000 (15:58 -0800)]
openflow-1.2.h: Fix definition of OXM_OF_PBB_ISID.
The ONF header file shows this as a 3-byte field.
Reported-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Pravin B Shelar [Wed, 20 Nov 2013 17:50:14 +0000 (09:50 -0800)]
datapath: gre: Fix kernel 3.11 compatibility.
On 3.11 kernel, gre module exports IP_GRE demux API, ovs needs
to use it to register for GRE protocol handler.
Reported-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Tested-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Gurucharan Shetty [Wed, 20 Nov 2013 21:43:45 +0000 (13:43 -0800)]
debian: Don't recreate bridges during manual restart.
Open vSwitch bridges and ports can be configured through
the /etc/network/interfaces script. During system startup,
Open vSwitch startup script reads the interfaces file
and creates the bridges and ports. During system shutdown,
the bridges and ports are removed.
The same behavior also can occur with a manual 'restart' of
Open vswitch (ex: service openvswitch-switch restart).
This behavior has come across as undesirable in some cases.
ex: When some one manually creates interfaces through ovs-vsctl
and then restarts Open vSwitch, that interface is lost.
This commit changes the startup script such that, interfaces
are created and deleted through the startup script only when
RUNLEVEL environment variable is set. This behavior will be
consistent with the OVS RHEL ifcfg-* scripts too.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Alexander Wu [Thu, 21 Nov 2013 09:04:28 +0000 (17:04 +0800)]
ofp-msgs: Fix limits of OFPMP_TABLE_FEATURES.
Signed-off-by: Alexander Wu <alexander.wu@huawei.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Romain Lenglet [Wed, 20 Nov 2013 18:57:53 +0000 (10:57 -0800)]
ipfix: allow empty targets column in table IPFIX
The "targets" column in IPFIX had a min=1 constraints, so OVSDB
implicitly adds an empty string "" into that column if no value is
given. No connection can be opened to a target with address "", so
the whole IPFIX exporter for that row was disabled until that ""
target was removed by users. That behavior is correct but proved to
be unintuitive to users.
This patch removes the min=1 constraint, to avoid the trouble for
users who insert IPFIX rows with no targets: it eliminates the log
messages due to failed connections to target "", and eliminates the
need to manually remove the "" target after row insertion.
This doesn't impact the behavior for any existing row, whether it has
a "" target or not.
Signed-off-by: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Romain Lenglet [Wed, 20 Nov 2013 18:57:52 +0000 (10:57 -0800)]
ipfix: fix segfault for Flow_Sample_Collector_Set without ipfix
Guard any access to an IPFIX row referenced from
Flow_Sample_Collector_Set by a test that the reference is not NULL.
Signed-off-by: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Wed, 20 Nov 2013 19:38:29 +0000 (11:38 -0800)]
bfd: Add new key "flap_count" to "bfd_status".
This commit adds a new key "flap_count" to "bfd_status" to count
the number of bfd "forwarding" flag flaps. A flap is considered
as a change of the "forwarding" flag value.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Wed, 20 Nov 2013 19:15:54 +0000 (11:15 -0800)]
bfd: Add forwarding flag to struct bfd.
This commit adds a forwarding flag to "struct bfd". This flag
is for indicating the interface's capability of packet I/O.
Also, this flag makes it possible to count the number of interface
state flapping. bfd_forwarding__() will update this flag at
each invocation.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Fri, 15 Nov 2013 23:25:00 +0000 (15:25 -0800)]
coverage: Synchronize per-thread counters less aggressively
When profiling CPU usage in situations involving high numbers of ports,
coverage_clear() was highlighted as a commonly called function. It
appears that it can be quite expensive to access all of the per-thread
coverage counters when threads are constantly waking up.
This patch makes each thread only do coverage_clear() logic roughly once
per second by introducing per-thread timers. Upcall handler counters may
become less accurate, as these threads may sleep without synchronising
and not wake up for some time. When the main thread is under load at
~90% CPU, this drops to ~85%. Upcall handler threads sitting at ~2.5%
drop to ~1.5%.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 20 Nov 2013 17:42:47 +0000 (09:42 -0800)]
Makefile.am: Distribute BUILD.Windows.
Fixes a build failure:
The distribution is missing the following files:
BUILD.Windows
CC: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 20 Nov 2013 17:07:13 +0000 (09:07 -0800)]
FAQ: More explicitly draw attention to explanation of different flow types.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Wed, 20 Nov 2013 16:55:10 +0000 (08:55 -0800)]
FAQ: Update description of datapath flows.
They have not been exact-match only for a while.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Fri, 15 Nov 2013 22:19:57 +0000 (14:19 -0800)]
ofp-actions: Make ofpacts_check() report consistency for all protocols.
Until now ofpacts_check() has been told either to enforce consistency or
not, but that means that the caller has to know exactly what protocol is
going to be in use (because some protocols require consistency to be
enforced and others don't). This commit changes ofpacts_check() to just
rule out protocols that require enforcement when it detects
inconsistencies.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Gurucharan Shetty [Sun, 17 Nov 2013 17:25:34 +0000 (09:25 -0800)]
BUILD.Windows: Some details on the proposed build system.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Sun, 17 Nov 2013 02:49:06 +0000 (18:49 -0800)]
cccl: Provide '-' before the options instead of double slash.
While compiling Open vSwitch with visual c++ in
a mingw environment, I have observed that "//" before
options does not work for all the compiler options of
MSVC. Using "-" on the other hand seems to work.
Also, echo the command line options passed to
the MSVC compiler.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Sun, 17 Nov 2013 02:36:38 +0000 (18:36 -0800)]
cccl: A wrapper that calls visual c++ compiler.
One option to compile Open vSwitch code in windows
is to use Visual c++ compiler.
From http://cccl.sourceforge.net/ :
"cccl is a wrapper around Microsoft Visual C++'s cl.exe
and link.exe. It converts Unix compiler parameters
into parameters understood by cl and link. cccl's main
use is for using Unix build processes with Microsoft
compilers. Using cccl in conjunction with ports of Unix
utilities, it is possible to build many Unix packages
using MSVC, without modifying the build process."
There are couple of forks of the project in the internet.
This particular piece is copied from:
https://gitorious.org/swift/swift/source/\
cf9b391b40a9c59a620c8093d438370381949c60:autoconf/cccl
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Wed, 20 Nov 2013 01:31:29 +0000 (17:31 -0800)]
Classifier: Staged subtable matching.
Subtable lookup is performed in ranges defined for struct flow,
starting from metadata (registers, in_port, etc.), then L2 header, L3,
and finally L4 ports. Whenever it is found that there are no matches
in the current subtable, the rest of the subtable can be skipped. The
rationale of this logic is that as many fields as possible can remain
wildcarded.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Andy Zhou [Wed, 13 Nov 2013 20:04:40 +0000 (12:04 -0800)]
datapath: Change ovs_flow_tbl_lookup_xx() APIs
API changes only for code readability. No functional chnages.
This patch removes the underscored version. Added a new API ovs_flow_tbl_lookup_stats() that
returns the n_mask_hits.
Reported by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Thomas Graf <tgraf@redhat.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Lorand Jakab [Tue, 19 Nov 2013 09:06:44 +0000 (11:06 +0200)]
ofproto-dpif: add support for layer 3 ports
Add member is_layer3 to struct ofport_dpif to mark layer 3 ports. Set
it to "true" for the only layer 3 port we support for now: lisp.
Additionally, prevent flooding to layer 3 ports. A later patch will
also prevent MAC learning.
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 19 Nov 2013 19:02:08 +0000 (11:02 -0800)]
utilities: Regenerate ovs-lib if configuration changes.
Otherwise running "configure" twice with different --prefix (etc.) will
fail to update ovs-lib, so that "make install" installs an ovs-lib with
the wrong paths.
Reported-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Ben Pfaff [Tue, 19 Nov 2013 18:59:10 +0000 (10:59 -0800)]
util: Rename popcount to count_1bits
This avoids a conflict with NetBSD's strings.h/libc.
(http://netbsd.gw.com/cgi-bin/man-cgi?popcount++NetBSD-current)
The new name is suggested by Ben Pfaff.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@gmail.com>
Ben Pfaff [Wed, 13 Nov 2013 17:50:54 +0000 (09:50 -0800)]
datapath: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).
We won't normally have a ton of flow masks but using a size_t to store
values no bigger than sizeof(struct sw_flow_key) seems excessive.
This reduces sw_flow_key_range and sw_flow_mask by 4 bytes on 32-bit
systems. On 64-bit systems it shrinks sw_flow_key_range by 12 bytes but
sw_flow_mask only by 8 bytes due to padding.
Compile tested only.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>