2016-01-14 20:08:07 -08:00
|
|
|
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
|
2009-06-15 15:11:30 -07:00
|
|
|
#
|
|
|
|
# Copying and distribution of this file, with or without modification,
|
|
|
|
# are permitted in any medium without royalty provided the copyright
|
|
|
|
# notice and this notice are preserved. This file is offered as-is,
|
|
|
|
# without warranty of any kind.
|
|
|
|
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_LTLIBRARIES += lib/libopenvswitch.la
|
2009-07-08 13:19:16 -07:00
|
|
|
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
|
2015-09-10 18:44:27 -07:00
|
|
|
lib_libopenvswitch_la_LIBADD += $(CAPNG_LDADD)
|
2014-03-04 14:07:55 -08:00
|
|
|
|
|
|
|
if WIN32
|
|
|
|
lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
|
|
|
|
endif
|
|
|
|
|
2014-11-07 19:02:09 -08:00
|
|
|
lib_libopenvswitch_la_LDFLAGS = \
|
|
|
|
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
2014-11-12 15:05:59 +01:00
|
|
|
-Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
|
|
|
|
$(AM_LDFLAGS)
|
2013-12-13 18:54:28 +01:00
|
|
|
|
|
|
|
lib_libopenvswitch_la_SOURCES = \
|
2009-09-24 15:02:36 -07:00
|
|
|
lib/aes128.c \
|
|
|
|
lib/aes128.h \
|
2013-07-10 11:40:28 -07:00
|
|
|
lib/async-append.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/backtrace.c \
|
|
|
|
lib/backtrace.h \
|
bfd: Implement Bidirectional Forwarding Detection.
Traditionally, Open vSwitch has used a variant of 802.1ag "CFM" for
interface liveness detection. This has served us well until now,
but has several serious drawbacks which have steadily become more
inconvenient. First, the 802.1ag standard does not implement
several useful features forcing us to (optionally) break
compatibility. Second, 802.1.ag is not particularly popular
outside of carrier grade networking equipment. Third, 802.1ag is
simply quite awkward.
In an effort to solve the aforementioned problems, this patch
implements BFD which is ubiquitous, well designed, straight
forward, and implements required features in a standard way. The
initial cut of the protocol focuses on getting the basics of the
specification correct, leaving performance optimizations, and
advanced features as future work. The protocol should be
considered experimental pending future testing.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-06-08 12:42:42 -07:00
|
|
|
lib/bfd.c \
|
|
|
|
lib/bfd.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/bitmap.h \
|
2011-06-10 17:45:45 -07:00
|
|
|
lib/bundle.c \
|
|
|
|
lib/bundle.h \
|
2010-10-28 17:13:18 -07:00
|
|
|
lib/byte-order.h \
|
2009-10-28 11:06:31 -07:00
|
|
|
lib/byteq.c \
|
|
|
|
lib/byteq.h \
|
2010-11-15 16:20:01 -08:00
|
|
|
lib/cfm.c \
|
|
|
|
lib/cfm.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/classifier.c \
|
|
|
|
lib/classifier.h \
|
2014-10-24 13:22:24 -07:00
|
|
|
lib/classifier-private.h \
|
2016-04-22 19:40:09 -07:00
|
|
|
lib/ccmap.c \
|
|
|
|
lib/ccmap.h \
|
cmap: New module for cuckoo hash table.
This implements an "optimistic concurrent cuckoo hash", a single-writer,
multiple-reader hash table data structure. The point of this data
structure is performance, so this commit message focuses on performance.
I tested the performance of cmap with the test-cmap utility included in
this commit. It takes three parameters for benchmarking:
- n, the number of elements to insert.
- n_threads, the number of threads to use for searching and
mutating the hash table.
- mutations, the percentage of operations that should modify the
hash table, from 0% to 100%.
e.g. "test-cmap 1000000 16 1" inserts one million elements, uses 16
threads, and 1% of the operations modify the hash table.
Any given run does the following for both hmap and cmap
implementations:
- Inserts n elements into a hash table.
- Iterates over all of the elements.
- Spawns n_threads threads, each of which searches for each of the
elements in the hash table, once, and removes the specified
percentage of them.
- Removes each of the (remaining) elements and destroys the hash
table.
and reports the time taken by each step,
The tables below report results for various parameters with a draft version
of this library. The tests were not formally rerun for the final version,
but the intermediate changes should only have improved performance, and
this seemed to be the case in some informal testing.
n_threads=16 was used each time, on a 16-core x86-64 machine. The compiler
used was Clang 3.5. (GCC yields different numbers but similar relative
results.)
The results show:
- Insertion is generally 3x to 5x faster in an hmap.
- Iteration is generally about 3x faster in a cmap.
- Search and mutation is 4x faster with .1% mutations and the
advantage grows as the fraction of mutations grows. This is
because a cmap does not require locking for read operations,
even in the presence of a writer.
With no mutations, however, no locking is required in the hmap
case, and the hmap is somewhat faster. This is because raw hmap
search is somewhat simpler and faster than raw cmap search.
- Destruction is faster, usually by less than 2x, in an hmap.
n=10,000,000:
.1% mutations 1% mutations 10% mutations no mutations
cmap hmap cmap hmap cmap hmap cmap hmap
insert: 6132 2182 6136 2178 6111 2174 6124 2180
iterate: 370 1203 378 1201 370 1200 371 1202
search: 1375 8692 2393 28197 18402 80379 1281 1097
destroy: 1382 1187 1197 1034 324 241 1405 1205
n=1,000,000:
.1% mutations 1% mutations 10% mutations no mutations
cmap hmap cmap hmap cmap hmap cmap hmap
insert: 311 25 310 60 311 59 310 60
iterate: 25 62 25 64 25 57 25 60
search: 115 637 197 2266 1803 7284 101 67
destroy: 103 64 90 59 25 13 104 66
n=100,000:
.1% mutations 1% mutations 10% mutations no mutations
cmap hmap cmap hmap cmap hmap cmap hmap
insert: 25 6 26 5 25 5 25 5
iterate: 1 3 1 3 1 3 2 3
search: 12 57 27 219 164 735 10 5
destroy: 5 3 6 3 2 1 6 4
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-05-20 16:51:42 -07:00
|
|
|
lib/cmap.c \
|
|
|
|
lib/cmap.h \
|
2016-03-02 15:56:17 +01:00
|
|
|
lib/colors.c \
|
|
|
|
lib/colors.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/command-line.c \
|
|
|
|
lib/command-line.h \
|
|
|
|
lib/compiler.h \
|
2013-12-13 03:33:46 +00:00
|
|
|
lib/connectivity.c \
|
|
|
|
lib/connectivity.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/coverage.c \
|
|
|
|
lib/coverage.h \
|
2013-08-22 20:24:42 +12:00
|
|
|
lib/crc32c.c \
|
|
|
|
lib/crc32c.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/csum.c \
|
|
|
|
lib/csum.h \
|
2015-11-03 15:00:03 -08:00
|
|
|
lib/ct-dpif.c \
|
|
|
|
lib/ct-dpif.h \
|
2014-04-23 10:28:00 -07:00
|
|
|
lib/daemon.c \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/daemon.h \
|
2014-04-23 14:22:38 -07:00
|
|
|
lib/daemon-private.h \
|
2015-05-28 16:19:15 -07:00
|
|
|
lib/db-ctl-base.c \
|
|
|
|
lib/db-ctl-base.h \
|
2011-03-15 09:46:39 -07:00
|
|
|
lib/dhcp.h \
|
2010-11-29 12:21:08 -08:00
|
|
|
lib/dummy.c \
|
|
|
|
lib/dummy.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/dhparams.h \
|
|
|
|
lib/dirs.h \
|
2014-07-17 17:26:00 -07:00
|
|
|
lib/dpctl.c \
|
|
|
|
lib/dpctl.h \
|
2015-02-25 12:01:53 -08:00
|
|
|
lib/dp-packet.h \
|
|
|
|
lib/dp-packet.c \
|
2009-06-19 14:09:39 -07:00
|
|
|
lib/dpif-netdev.c \
|
2014-03-20 10:54:37 -07:00
|
|
|
lib/dpif-netdev.h \
|
2009-06-17 14:35:35 -07:00
|
|
|
lib/dpif-provider.h \
|
|
|
|
lib/dpif.c \
|
|
|
|
lib/dpif.h \
|
2012-01-24 15:07:41 -08:00
|
|
|
lib/heap.c \
|
|
|
|
lib/heap.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/dynamic-string.c \
|
2010-08-12 15:47:25 -07:00
|
|
|
lib/entropy.c \
|
|
|
|
lib/entropy.h \
|
2014-01-13 11:17:55 -08:00
|
|
|
lib/fat-rwlock.c \
|
|
|
|
lib/fat-rwlock.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/fatal-signal.c \
|
|
|
|
lib/fatal-signal.h \
|
|
|
|
lib/flow.c \
|
|
|
|
lib/flow.h \
|
2013-09-12 17:42:23 -07:00
|
|
|
lib/guarded-list.c \
|
|
|
|
lib/guarded-list.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/hash.c \
|
|
|
|
lib/hash.h \
|
2013-06-18 10:27:34 -07:00
|
|
|
lib/hindex.c \
|
|
|
|
lib/hindex.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/hmap.c \
|
|
|
|
lib/hmap.h \
|
2011-04-07 17:10:48 -07:00
|
|
|
lib/hmapx.c \
|
|
|
|
lib/hmapx.h \
|
2014-11-10 13:47:48 +09:00
|
|
|
lib/id-pool.c \
|
|
|
|
lib/id-pool.h \
|
hash: Replace primary hash functions by murmurhash.
murmurhash is faster than Jenkins and slightly higher quality, so switch to
it for hashing words.
The best timings I got for hashing for data lengths of the following
numbers of 32-bit words, in seconds per 1,000,000,000 hashes, were:
words murmurhash Jenkins hash
----- ---------- ------------
1 8.4 10.4
2 10.3 10.3
3 11.2 10.7
4 12.6 18.0
5 13.9 18.3
6 15.2 18.7
In other words, murmurhash outperforms Jenkins for all input lengths other
than exactly 3 32-bit words (12 bytes). (It's understandable that Jenkins
would have a best case at 12 bytes, because Jenkins works in 12-byte
chunks.) Even in the case where Jenkins is faster, it's only by 5%. On
average within this data set, murmurhash is 15% faster, and for 4-word
input it is 30% faster.
We retain Jenkins for flow_hash_symmetric_l4() and flow_hash_fields(),
which are cases where the hash value is exposed externally.
This commit appears to improve "ovs-benchmark rate" results slightly by
a few hundred connections per second (under 1%), when used with an NVP
controller.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-16 16:14:42 -08:00
|
|
|
lib/jhash.c \
|
|
|
|
lib/jhash.h \
|
2009-11-04 14:55:53 -08:00
|
|
|
lib/json.c \
|
|
|
|
lib/json.h \
|
2009-10-26 15:04:05 -07:00
|
|
|
lib/jsonrpc.c \
|
|
|
|
lib/jsonrpc.h \
|
2011-02-28 14:48:06 -08:00
|
|
|
lib/lacp.c \
|
|
|
|
lib/lacp.h \
|
2013-07-15 12:20:23 -07:00
|
|
|
lib/latch.h \
|
2011-09-12 16:19:57 -07:00
|
|
|
lib/learn.c \
|
|
|
|
lib/learn.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/learning-switch.c \
|
|
|
|
lib/learning-switch.h \
|
2009-10-14 16:52:04 -07:00
|
|
|
lib/lockfile.c \
|
|
|
|
lib/lockfile.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/mac-learning.c \
|
|
|
|
lib/mac-learning.h \
|
2012-08-07 15:28:18 -07:00
|
|
|
lib/match.c \
|
2014-06-18 22:14:29 -03:00
|
|
|
lib/mcast-snooping.c \
|
|
|
|
lib/mcast-snooping.h \
|
2012-05-08 15:44:21 -07:00
|
|
|
lib/memory.c \
|
|
|
|
lib/memory.h \
|
2011-09-12 12:11:50 -07:00
|
|
|
lib/meta-flow.c \
|
2010-12-17 14:38:50 -08:00
|
|
|
lib/multipath.c \
|
|
|
|
lib/multipath.h \
|
2010-11-29 12:21:08 -08:00
|
|
|
lib/netdev-dummy.c \
|
2009-07-30 17:10:13 -07:00
|
|
|
lib/netdev-provider.h \
|
2013-01-25 13:30:40 -08:00
|
|
|
lib/netdev-vport.c \
|
|
|
|
lib/netdev-vport.h \
|
2016-05-17 17:31:33 -07:00
|
|
|
lib/netdev-vport-private.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/netdev.c \
|
|
|
|
lib/netdev.h \
|
2011-12-19 14:18:00 -08:00
|
|
|
lib/netflow.h \
|
2010-12-10 09:51:03 -08:00
|
|
|
lib/netlink.c \
|
|
|
|
lib/netlink.h \
|
2010-11-09 17:00:59 -08:00
|
|
|
lib/nx-match.c \
|
|
|
|
lib/nx-match.h \
|
2013-05-29 15:06:38 +09:00
|
|
|
lib/odp-execute.c \
|
|
|
|
lib/odp-execute.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/odp-util.c \
|
|
|
|
lib/odp-util.h \
|
2012-07-03 22:17:14 -07:00
|
|
|
lib/ofp-actions.c \
|
2011-01-12 13:42:50 -08:00
|
|
|
lib/ofp-errors.c \
|
2012-07-19 23:23:17 -07:00
|
|
|
lib/ofp-msgs.c \
|
2010-07-28 15:14:28 -07:00
|
|
|
lib/ofp-parse.c \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/ofp-print.c \
|
2015-12-29 06:44:16 -08:00
|
|
|
lib/ofp-prop.c \
|
2010-05-27 13:14:05 -07:00
|
|
|
lib/ofp-util.c \
|
2012-11-27 10:12:26 -08:00
|
|
|
lib/ofp-version-opt.h \
|
|
|
|
lib/ofp-version-opt.c \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/ofpbuf.c \
|
2013-06-28 15:54:40 -07:00
|
|
|
lib/ovs-atomic-c11.h \
|
2013-08-26 13:03:02 -07:00
|
|
|
lib/ovs-atomic-clang.h \
|
|
|
|
lib/ovs-atomic-flag-gcc4.7+.h \
|
2013-06-28 15:54:40 -07:00
|
|
|
lib/ovs-atomic-gcc4+.h \
|
|
|
|
lib/ovs-atomic-gcc4.7+.h \
|
2014-08-05 13:51:19 -07:00
|
|
|
lib/ovs-atomic-i586.h \
|
ovs-atomic: Use raw types, not structs, when locks are required.
Until now, the GCC 4+ and pthreads implementations of atomics have used
struct wrappers for their atomic types. This had the advantage of allowing
a mutex to be wrapped in, in some cases, and of better type-checking by
preventing stray uses of atomic variables other than through one of the
atomic_*() functions or macros. However, the mutex meant that an
atomic_destroy() function-like macro needed to be used. The struct wrapper
also made it impossible to define new atomic types that were compatible
with each other without using a typedef. For example, one could not simply
define a macro like
#define ATOMIC(TYPE) struct { TYPE value; }
and then have two declarations like:
ATOMIC(void *) x;
ATOMIC(void *) y;
and do anything with these objects that require type-compatibility, even
"&x == &y", because the two structs are not compatible. One can do it
through a typedef:
typedef ATOMIC(void *) atomic_voidp;
atomic_voidp x, y;
but that is inconvenient, especially because of the need to invent a name
for the type.
This commit aims to ease the problem by getting rid of the wrapper structs
in the cases where the atomic library used them. It gets rid of the
mutexes, in the cases where they are still needed, by using a global
array of mutexes instead.
This commit also defines the ATOMIC macro described above and documents
its use in ovs-atomic.h.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2014-03-11 12:46:29 -07:00
|
|
|
lib/ovs-atomic-locked.c \
|
|
|
|
lib/ovs-atomic-locked.h \
|
ovs-atomics: Add atomic support Windows.
Before this change (i.e., with pthread locks for atomics on Windows),
the benchmark for cmap and hmap was as follows:
$ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1
Benchmarking with n=10000000, 3 threads, 1.00% mutations:
cmap insert: 61070 ms
cmap iterate: 2750 ms
cmap search: 14238 ms
cmap destroy: 8354 ms
hmap insert: 1701 ms
hmap iterate: 985 ms
hmap search: 3755 ms
hmap destroy: 1052 ms
After this change, the benchmark is as follows:
$ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1
Benchmarking with n=10000000, 3 threads, 1.00% mutations:
cmap insert: 3666 ms
cmap iterate: 365 ms
cmap search: 2016 ms
cmap destroy: 1331 ms
hmap insert: 1495 ms
hmap iterate: 1026 ms
hmap search: 4167 ms
hmap destroy: 1046 ms
So there is clearly a big improvement for cmap.
But the correspondig test on Linux (with gcc 4.6) yeilds the following:
./tests/ovstest test-cmap benchmark 10000000 3 1
Benchmarking with n=10000000, 3 threads, 1.00% mutations:
cmap insert: 3917 ms
cmap iterate: 355 ms
cmap search: 871 ms
cmap destroy: 1158 ms
hmap insert: 1988 ms
hmap iterate: 1005 ms
hmap search: 5428 ms
hmap destroy: 980 ms
So for this particular test, except for "cmap search", Windows and
Linux have similar performance. Windows is around 2.5x slower in "cmap search"
compared to Linux. This has to be investigated.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
[With a lot of inputs and help from Jarno]
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-21 13:57:37 -07:00
|
|
|
lib/ovs-atomic-msvc.h \
|
2013-06-28 15:54:40 -07:00
|
|
|
lib/ovs-atomic-pthreads.h \
|
lib/ovs-atomic: Native support for x86_64 with GCC.
Some supported XenServer build environments lack compiler support for
atomic operations. This patch provides native support for x86_64 on
GCC, which covers possible future 64-bit builds on XenServer.
Since this implementation is faster than the existing support prior to
GCC 4.7, especially for cmap inserts, we use this with GCC < 4.7 on
x86_64.
Example numbers with "tests/test-cmap benchmark 2000000 8 0.1" on
quad-core hyperthreaded laptop, built with GCC 4.6 -O2:
Using ovs-atomic-pthreads on x86_64:
Benchmarking with n=2000000, 8 threads, 0.10% mutations:
cmap insert: 4725 ms
cmap iterate: 329 ms
cmap search: 5945 ms
cmap destroy: 911 ms
Using ovs-atomic-gcc4+ on x86_64:
Benchmarking with n=2000000, 8 threads, 0.10% mutations:
cmap insert: 845 ms
cmap iterate: 58 ms
cmap search: 308 ms
cmap destroy: 295 ms
With the native support provided by this patch:
Benchmarking with n=2000000, 8 threads, 0.10% mutations:
cmap insert: 530 ms
cmap iterate: 59 ms
cmap search: 305 ms
cmap destroy: 232 ms
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-08-05 13:51:19 -07:00
|
|
|
lib/ovs-atomic-x86_64.h \
|
2013-06-28 15:54:40 -07:00
|
|
|
lib/ovs-atomic.h \
|
2015-02-20 14:17:09 -05:00
|
|
|
lib/ovs-lldp.c \
|
|
|
|
lib/ovs-lldp.h \
|
2016-06-06 17:05:49 -07:00
|
|
|
lib/ovs-numa.c \
|
|
|
|
lib/ovs-numa.h \
|
2014-03-18 16:34:28 -07:00
|
|
|
lib/ovs-rcu.c \
|
|
|
|
lib/ovs-rcu.h \
|
2014-11-10 16:31:47 +09:00
|
|
|
lib/ovs-router.h \
|
2014-11-17 14:40:22 +09:00
|
|
|
lib/ovs-router.c \
|
2013-06-24 11:05:10 -07:00
|
|
|
lib/ovs-thread.c \
|
|
|
|
lib/ovs-thread.h \
|
2009-11-04 15:11:44 -08:00
|
|
|
lib/ovsdb-data.c \
|
|
|
|
lib/ovsdb-data.h \
|
|
|
|
lib/ovsdb-error.c \
|
|
|
|
lib/ovsdb-error.h \
|
2009-12-02 11:26:15 -08:00
|
|
|
lib/ovsdb-idl-provider.h \
|
|
|
|
lib/ovsdb-idl.c \
|
|
|
|
lib/ovsdb-idl.h \
|
ovsdb-idl: Add partial map updates functionality.
In the current implementation, every time an element of either a map or set
column has to be modified, the entire content of the column is sent to the
server to be updated. This is not a major problem if the information contained
in the column for the corresponding row is small, but there are cases where
these columns can have a significant amount of elements per row, or these
values are updated frequently, therefore the cost of the modifications becomes
high in terms of time and bandwidth.
In this solution, the ovsdb-idl code is modified to use the RFC 7047 'mutate'
operation, to allow sending partial modifications on map columns to the server.
The functionality is exposed to clients in the vswitch idl. This was
implemented through map operations.
A map operation is defined as an insertion, update or deletion of a key-value
pair inside a map. The idea is to minimize the amount of map operations
that are send to the OVSDB server when a transaction is committed.
In order to keep track of the requested map operations, structs map_op and
map_op_list were defined with accompanying functions to manipulate them. These
functions make sure that only one operation is send to the server for each
key-value that wants to be modified, so multiple operation on a key value are
collapsed into a single operation.
As an example, if a client using the IDL updates several times the value for
the same key, the functions will ensure that only the last value is send to
the server, instead of multiple updates. Or, if the client inserts a key-value,
and later on deletes the key before committing the transaction, then both
actions cancel out and no map operation is send for that key.
To keep track of the desired map operations on each transaction, a list of map
operations (struct map_op_list) is created for every column on the row on which
a map operation is performed. When a new map operation is requested on the same
column, the corresponding map_op_list is checked to verify if a previous
operations was performed on the same key, on the same transaction. If there is
no previous operation, then the new operation is just added into the list. But
if there was a previous operation on the same key, then the previous operation
is collapsed with the new operation into a single operation that preserves the
final result if both operations were to be performed sequentially. This design
keep a small memory footprint during transactions.
When a transaction is committed, the map operations lists are checked and
all map operations that belong to the same map are grouped together into a
single JSON RPC "mutate" operation, in which each map_op is transformed into
the necessary "insert" or "delete" mutators. Then the "mutate" operation is
added to the operations that will be send to the server.
Once the transaction is finished, all map operation lists are cleared and
deleted, so the next transaction starts with a clean board for map operations.
Using different structures and logic to handle map operations, instead of
trying to force the current structures (like 'old' and 'new' datums in the row)
to handle then, ensures that map operations won't mess up with the current
logic to generate JSON messages for other operations, avoids duplicating the
whole map for just a few changes, and is faster for insert and delete
operations, because there is no need to maintain the invariants in the 'new'
datum.
Signed-off-by: Edward Aymerich <edward.aymerich@hpe.com>
Signed-off-by: Arnoldo Lutz <arnoldo.lutz.guevara@hpe.com>
Co-authored-by: Arnoldo Lutz <arnoldo.lutz.guevara@hpe.com>
[blp@ovn.org made style changes and factored out error checking]
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-05-02 13:59:44 -06:00
|
|
|
lib/ovsdb-map-op.c \
|
|
|
|
lib/ovsdb-map-op.h \
|
2009-11-04 15:11:44 -08:00
|
|
|
lib/ovsdb-parser.c \
|
|
|
|
lib/ovsdb-parser.h \
|
|
|
|
lib/ovsdb-types.c \
|
|
|
|
lib/ovsdb-types.h \
|
2009-09-15 15:22:17 -07:00
|
|
|
lib/packets.c \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/packets.h \
|
2013-03-15 02:19:31 -07:00
|
|
|
lib/pcap-file.c \
|
|
|
|
lib/pcap-file.h \
|
2015-03-21 00:00:48 -07:00
|
|
|
lib/perf-counter.h \
|
|
|
|
lib/perf-counter.c \
|
2016-01-14 20:08:07 -08:00
|
|
|
lib/pktbuf.c \
|
|
|
|
lib/pktbuf.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/poll-loop.c \
|
|
|
|
lib/poll-loop.h \
|
|
|
|
lib/process.c \
|
|
|
|
lib/process.h \
|
2014-06-26 07:41:25 -07:00
|
|
|
lib/pvector.c \
|
|
|
|
lib/pvector.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/random.c \
|
|
|
|
lib/random.h \
|
|
|
|
lib/rconn.c \
|
|
|
|
lib/rconn.h \
|
2014-10-29 09:59:57 -07:00
|
|
|
lib/rculist.h \
|
2009-11-10 15:30:49 -08:00
|
|
|
lib/reconnect.c \
|
|
|
|
lib/reconnect.h \
|
2014-08-22 09:01:34 -07:00
|
|
|
lib/rstp.c \
|
|
|
|
lib/rstp.h \
|
|
|
|
lib/rstp-common.h \
|
|
|
|
lib/rstp-state-machines.c \
|
|
|
|
lib/rstp-state-machines.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/sat-math.h \
|
2013-08-06 09:39:10 -07:00
|
|
|
lib/seq.c \
|
|
|
|
lib/seq.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/sha1.c \
|
|
|
|
lib/sha1.h \
|
|
|
|
lib/shash.c \
|
|
|
|
lib/shash.h \
|
2012-05-22 10:32:02 -07:00
|
|
|
lib/simap.c \
|
|
|
|
lib/simap.h \
|
2012-05-22 03:47:36 -07:00
|
|
|
lib/smap.c \
|
|
|
|
lib/smap.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/socket-util.c \
|
|
|
|
lib/socket-util.h \
|
2009-11-04 15:11:44 -08:00
|
|
|
lib/sort.c \
|
|
|
|
lib/sort.h \
|
2011-03-30 13:44:10 -07:00
|
|
|
lib/sset.c \
|
|
|
|
lib/sset.h \
|
2011-09-20 15:08:05 -07:00
|
|
|
lib/stp.c \
|
|
|
|
lib/stp.h \
|
2014-10-17 10:02:45 -07:00
|
|
|
lib/stream-fd.c \
|
2009-11-04 15:02:32 -08:00
|
|
|
lib/stream-fd.h \
|
|
|
|
lib/stream-provider.h \
|
2009-12-21 13:13:48 -08:00
|
|
|
lib/stream-ssl.h \
|
2009-11-04 15:02:32 -08:00
|
|
|
lib/stream-tcp.c \
|
|
|
|
lib/stream.c \
|
|
|
|
lib/stream.h \
|
2013-12-24 09:18:42 -08:00
|
|
|
lib/stdio.c \
|
2011-02-22 10:58:36 -08:00
|
|
|
lib/string.c \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/svec.c \
|
|
|
|
lib/svec.h \
|
2015-06-13 17:22:15 -07:00
|
|
|
lib/syslog-direct.c \
|
|
|
|
lib/syslog-direct.h \
|
|
|
|
lib/syslog-libc.c \
|
|
|
|
lib/syslog-libc.h \
|
|
|
|
lib/syslog-provider.h \
|
2011-02-08 16:09:45 -08:00
|
|
|
lib/table.c \
|
|
|
|
lib/table.h \
|
2011-03-31 13:46:04 -07:00
|
|
|
lib/timer.c \
|
|
|
|
lib/timer.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/timeval.c \
|
|
|
|
lib/timeval.h \
|
2015-11-30 16:24:49 -02:00
|
|
|
lib/tnl-neigh-cache.c \
|
|
|
|
lib/tnl-neigh-cache.h \
|
2014-11-11 11:53:47 -08:00
|
|
|
lib/tnl-ports.c \
|
|
|
|
lib/tnl-ports.h \
|
2016-05-17 17:31:33 -07:00
|
|
|
lib/netdev-native-tnl.c \
|
|
|
|
lib/netdev-native-tnl.h \
|
2012-05-30 17:16:16 -07:00
|
|
|
lib/token-bucket.c \
|
tunnel: Geneve TLV handling support for OpenFlow.
The current support for Geneve in OVS is exactly equivalent to VXLAN:
it is possible to set and match on the VNI but not on any options
contained in the header. This patch enables the use of options.
The goal for Geneve support is not to add support for any particular option
but to allow end users or controllers to specify what they would like to
match. That is, the full range of Geneve's capabilities should be exposed
without modifying the code (the one exception being options that require
per-packet computation in the fast path).
The main issue with supporting Geneve options is how to integrate the
fields into the existing OpenFlow pipeline. All existing operations
are referred to by their NXM/OXM field name - matches, action generation,
arithmetic operations (i.e. tranfer to a register). However, the Geneve
option space is exactly the same as the OXM space, so a direct mapping
is not feasible. Instead, we create a pool of 64 NXMs that are then
dynamically mapped on Geneve option TLVs using OpenFlow. Once mapped,
these fields become first-class citizens in the OpenFlow pipeline.
An example of how to use Geneve options:
ovs-ofctl add-geneve-map br0 {class=0xffff,type=0,len=4}->tun_metadata0
ovs-ofctl add-flow br0 in_port=LOCAL,actions=set_field:0xffffffff->tun_metadata0,1
This will add a 4 bytes option (filled will all 1's) to all packets
coming from the LOCAL port and then send then out to port 1.
A limitation of this patch is that although the option table is specified
for a particular switch over OpenFlow, it is currently global to all
switches. This will be addressed in a future patch.
Based on work originally done by Madhu Challa. Ben Pfaff also significantly
improved the comments.
Signed-off-by: Madhu Challa <challa@noironetworks.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-04-30 18:09:57 -07:00
|
|
|
lib/tun-metadata.c \
|
openflow: Table maintenance commands for Geneve options.
In order to work with Geneve options, we need to maintain a mapping
table between an option (defined by <class, type, length>) and
an NXM field that can be operated on for the purposes of matches,
actions, etc. This mapping must be explicitly specified by the
user.
Conceptually, this table could be communicated using either OpenFlow
or OVSDB. Using OVSDB requires less code and definition of extensions
than OpenFlow but introduces the possibility that mapping table
updates and flow modifications are desynchronized from each other.
This is dangerous because the mapping table signifcantly impacts the
way that flows using Geneve options are installed and processed by
OVS. Therefore, the mapping table is maintained using OpenFlow commands
instead, which opens the possibility of using synchronization between
table changes and flow modifications through barriers, bundles, etc.
There are two primary groups of OpenFlow messages that are introduced
as Nicira extensions: modification commands (add, delete, clear mappings)
and table status request/reply to dump the current table along with switch
information.
Note that mappings should not be changed while they are in active use by
a flow. The result of doing so is undefined.
This only adds the OpenFlow infrastructure but doesn't actually
do anything with the information yet after the messages have been
decoded.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-02 15:11:00 -07:00
|
|
|
lib/tun-metadata.h \
|
2010-05-07 14:31:04 -07:00
|
|
|
lib/unaligned.h \
|
2009-11-04 14:55:53 -08:00
|
|
|
lib/unicode.c \
|
|
|
|
lib/unicode.h \
|
2009-12-07 16:24:03 -08:00
|
|
|
lib/unixctl.c \
|
|
|
|
lib/unixctl.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/util.c \
|
|
|
|
lib/util.h \
|
2009-12-07 16:24:03 -08:00
|
|
|
lib/uuid.c \
|
|
|
|
lib/uuid.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/valgrind.h \
|
|
|
|
lib/vconn-provider.h \
|
|
|
|
lib/vconn-stream.c \
|
|
|
|
lib/vconn.c \
|
2011-04-08 13:19:33 -07:00
|
|
|
lib/vlan-bitmap.c \
|
|
|
|
lib/vlan-bitmap.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/vlog.c \
|
2015-02-20 14:17:09 -05:00
|
|
|
lib/lldp/aa-structs.h \
|
|
|
|
lib/lldp/lldp.c \
|
|
|
|
lib/lldp/lldp-const.h \
|
|
|
|
lib/lldp/lldp-tlv.h \
|
|
|
|
lib/lldp/lldpd.c \
|
|
|
|
lib/lldp/lldpd.h \
|
|
|
|
lib/lldp/lldpd-structs.c \
|
|
|
|
lib/lldp/lldpd-structs.h
|
2014-01-27 08:52:57 -08:00
|
|
|
|
2014-01-09 16:26:12 -08:00
|
|
|
if WIN32
|
2014-01-27 08:52:57 -08:00
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
2014-01-16 16:16:24 -08:00
|
|
|
lib/daemon-windows.c \
|
2014-01-27 08:52:57 -08:00
|
|
|
lib/getopt_long.c \
|
2014-03-06 12:55:53 -08:00
|
|
|
lib/getrusage-windows.c \
|
2014-02-24 11:12:25 -08:00
|
|
|
lib/latch-windows.c \
|
2014-03-12 10:44:51 -07:00
|
|
|
lib/route-table-stub.c \
|
2015-07-31 14:35:02 -03:00
|
|
|
lib/if-notifier-stub.c \
|
2014-10-17 10:02:45 -07:00
|
|
|
lib/strsep.c
|
2014-01-09 16:26:12 -08:00
|
|
|
else
|
2014-01-27 08:52:57 -08:00
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
2014-04-23 09:03:38 -07:00
|
|
|
lib/daemon-unix.c \
|
2014-02-24 11:12:25 -08:00
|
|
|
lib/latch-unix.c \
|
2014-02-26 08:45:58 -08:00
|
|
|
lib/signals.c \
|
|
|
|
lib/signals.h \
|
2014-05-23 09:35:47 -07:00
|
|
|
lib/socket-util-unix.c \
|
2014-02-18 14:39:47 -08:00
|
|
|
lib/stream-unix.c
|
2014-01-09 16:26:12 -08:00
|
|
|
endif
|
|
|
|
|
2013-12-24 09:18:42 -08:00
|
|
|
EXTRA_DIST += \
|
|
|
|
lib/stdio.h.in \
|
|
|
|
lib/string.h.in
|
2012-03-15 17:10:41 -07:00
|
|
|
|
2013-12-13 18:54:28 +01:00
|
|
|
nodist_lib_libopenvswitch_la_SOURCES = \
|
2015-07-21 11:15:06 -07:00
|
|
|
lib/dirs.c \
|
|
|
|
lib/vswitch-idl.c \
|
|
|
|
lib/vswitch-idl.h
|
2013-12-13 18:54:28 +01:00
|
|
|
CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
|
2009-07-08 13:19:16 -07:00
|
|
|
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_LTLIBRARIES += lib/libsflow.la
|
2014-11-07 19:02:09 -08:00
|
|
|
lib_libsflow_la_LDFLAGS = \
|
|
|
|
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
2014-11-12 15:05:59 +01:00
|
|
|
-Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
|
|
|
|
$(AM_LDFLAGS)
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libsflow_la_SOURCES = \
|
2009-11-20 09:45:26 -08:00
|
|
|
lib/sflow_api.h \
|
|
|
|
lib/sflow.h \
|
|
|
|
lib/sflow_agent.c \
|
|
|
|
lib/sflow_sampler.c \
|
|
|
|
lib/sflow_poller.c \
|
|
|
|
lib/sflow_receiver.c
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
|
2009-11-20 09:45:26 -08:00
|
|
|
if HAVE_WNO_UNUSED
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libsflow_la_CFLAGS += -Wno-unused
|
2009-11-20 09:45:26 -08:00
|
|
|
endif
|
2010-07-30 14:47:29 -07:00
|
|
|
if HAVE_WNO_UNUSED_PARAMETER
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libsflow_la_CFLAGS += -Wno-unused-parameter
|
2010-07-30 14:47:29 -07:00
|
|
|
endif
|
2009-11-20 09:45:26 -08:00
|
|
|
|
2014-01-23 15:35:22 -08:00
|
|
|
if LINUX
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
2014-09-18 04:17:54 -07:00
|
|
|
lib/dpif-netlink.c \
|
|
|
|
lib/dpif-netlink.h \
|
2015-07-31 14:35:02 -03:00
|
|
|
lib/if-notifier.c \
|
|
|
|
lib/if-notifier.h \
|
2010-05-26 10:38:52 -07:00
|
|
|
lib/netdev-linux.c \
|
2011-04-28 11:13:53 -07:00
|
|
|
lib/netdev-linux.h \
|
2015-11-03 13:52:44 -08:00
|
|
|
lib/netlink-conntrack.c \
|
|
|
|
lib/netlink-conntrack.h \
|
2011-08-25 14:06:54 -07:00
|
|
|
lib/netlink-notifier.c \
|
|
|
|
lib/netlink-notifier.h \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/netlink-protocol.h \
|
2010-12-10 09:51:03 -08:00
|
|
|
lib/netlink-socket.c \
|
|
|
|
lib/netlink-socket.h \
|
2015-07-24 14:03:06 -07:00
|
|
|
lib/rtnetlink.c \
|
|
|
|
lib/rtnetlink.h \
|
2011-01-12 14:55:18 -08:00
|
|
|
lib/route-table.c \
|
|
|
|
lib/route-table.h
|
2009-07-08 13:19:16 -07:00
|
|
|
endif
|
|
|
|
|
2014-03-24 19:23:08 -07:00
|
|
|
if DPDK_NETDEV
|
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
|
|
|
lib/netdev-dpdk.c \
|
|
|
|
lib/netdev-dpdk.h
|
2016-04-29 13:44:01 -04:00
|
|
|
else
|
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
|
|
|
lib/netdev-nodpdk.c \
|
|
|
|
lib/netdev-dpdk.h
|
2014-03-24 19:23:08 -07:00
|
|
|
endif
|
|
|
|
|
2014-07-29 15:24:08 +00:00
|
|
|
if WIN32
|
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
2014-09-18 04:17:54 -07:00
|
|
|
lib/dpif-netlink.c \
|
|
|
|
lib/dpif-netlink.h \
|
2014-10-06 13:07:19 -07:00
|
|
|
lib/netdev-windows.c \
|
2014-07-29 15:24:08 +00:00
|
|
|
lib/netlink-notifier.c \
|
|
|
|
lib/netlink-notifier.h \
|
|
|
|
lib/netlink-protocol.h \
|
|
|
|
lib/netlink-socket.c \
|
|
|
|
lib/netlink-socket.h
|
|
|
|
endif
|
|
|
|
|
2013-07-10 11:40:28 -07:00
|
|
|
if HAVE_POSIX_AIO
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
|
2013-07-10 11:40:28 -07:00
|
|
|
else
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
|
2013-07-10 11:40:28 -07:00
|
|
|
endif
|
|
|
|
|
2012-10-05 13:24:21 -07:00
|
|
|
if ESX
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
2015-07-31 14:35:02 -03:00
|
|
|
lib/route-table-stub.c \
|
|
|
|
lib/if-notifier-stub.c
|
2012-10-05 13:24:21 -07:00
|
|
|
endif
|
|
|
|
|
2012-06-29 21:11:24 +00:00
|
|
|
if HAVE_IF_DL
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += \
|
2015-07-31 14:35:02 -03:00
|
|
|
lib/if-notifier-bsd.c \
|
2012-07-25 22:51:05 +02:00
|
|
|
lib/netdev-bsd.c \
|
|
|
|
lib/rtbsd.c \
|
|
|
|
lib/rtbsd.h \
|
2012-06-29 21:11:24 +00:00
|
|
|
lib/route-table-bsd.c
|
|
|
|
endif
|
|
|
|
|
2009-07-08 13:19:16 -07:00
|
|
|
if HAVE_OPENSSL
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
|
|
|
|
nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
|
2014-09-29 14:34:11 -07:00
|
|
|
$(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
|
2009-07-08 13:19:16 -07:00
|
|
|
openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
|
|
|
|
openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
|
|
|
|
openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
|
2014-09-29 14:34:11 -07:00
|
|
|
| sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
|
2009-07-08 13:19:16 -07:00
|
|
|
mv lib/dhparams.c.tmp lib/dhparams.c
|
2011-05-10 09:17:37 -07:00
|
|
|
else
|
2013-12-13 18:54:28 +01:00
|
|
|
lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
|
2009-07-08 13:19:16 -07:00
|
|
|
endif
|
|
|
|
|
2014-11-13 12:28:41 +01:00
|
|
|
pkgconfig_DATA += \
|
2014-11-13 12:28:44 +01:00
|
|
|
$(srcdir)/lib/libopenvswitch.pc \
|
|
|
|
$(srcdir)/lib/libsflow.pc
|
2014-11-13 12:28:41 +01:00
|
|
|
|
2009-07-08 13:19:16 -07:00
|
|
|
EXTRA_DIST += \
|
|
|
|
lib/dh1024.pem \
|
|
|
|
lib/dh2048.pem \
|
2010-11-29 12:28:26 -08:00
|
|
|
lib/dh4096.pem \
|
2016-01-12 09:35:06 +08:00
|
|
|
lib/dirs.c.in \
|
|
|
|
lib/db-ctl-base.xml
|
2009-07-08 13:19:16 -07:00
|
|
|
|
2011-08-24 10:45:32 -07:00
|
|
|
MAN_FRAGMENTS += \
|
2016-03-02 15:56:21 +01:00
|
|
|
lib/colors.man \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/common.man \
|
2009-11-06 15:35:10 -08:00
|
|
|
lib/common-syn.man \
|
2012-04-20 14:09:30 -07:00
|
|
|
lib/coverage-unixctl.man \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/daemon.man \
|
2009-11-06 15:35:10 -08:00
|
|
|
lib/daemon-syn.man \
|
2015-06-11 17:08:52 -07:00
|
|
|
lib/db-ctl-base.man \
|
2014-07-17 17:26:00 -07:00
|
|
|
lib/dpctl.man \
|
2012-07-13 10:25:27 -07:00
|
|
|
lib/memory-unixctl.man \
|
2012-11-27 10:12:26 -08:00
|
|
|
lib/ofp-version.man \
|
2011-10-27 09:39:24 -07:00
|
|
|
lib/ovs.tmac \
|
2014-01-16 16:16:24 -08:00
|
|
|
lib/service.man \
|
|
|
|
lib/service-syn.man \
|
2009-12-21 13:10:55 -08:00
|
|
|
lib/ssl-bootstrap.man \
|
2009-12-21 13:13:48 -08:00
|
|
|
lib/ssl-bootstrap-syn.man \
|
2009-12-21 13:10:55 -08:00
|
|
|
lib/ssl-peer-ca-cert.man \
|
2015-08-19 15:42:07 -07:00
|
|
|
lib/ssl-peer-ca-cert-syn.man \
|
2009-12-21 13:10:55 -08:00
|
|
|
lib/ssl.man \
|
2009-12-21 13:13:48 -08:00
|
|
|
lib/ssl-syn.man \
|
2011-02-08 16:09:45 -08:00
|
|
|
lib/table.man \
|
2010-03-23 11:22:42 -07:00
|
|
|
lib/unixctl.man \
|
|
|
|
lib/unixctl-syn.man \
|
2009-12-21 13:10:55 -08:00
|
|
|
lib/vconn-active.man \
|
|
|
|
lib/vconn-passive.man \
|
2009-09-09 11:16:55 -07:00
|
|
|
lib/vlog-unixctl.man \
|
2009-11-06 15:35:10 -08:00
|
|
|
lib/vlog-syn.man \
|
2009-07-08 13:19:16 -07:00
|
|
|
lib/vlog.man
|
|
|
|
|
2012-03-15 17:10:41 -07:00
|
|
|
# vswitch IDL
|
2015-06-10 09:04:23 -07:00
|
|
|
OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl
|
2012-03-15 17:10:41 -07:00
|
|
|
|
2015-06-10 09:04:23 -07:00
|
|
|
EXTRA_DIST += lib/vswitch-idl.ann
|
2015-07-20 19:13:49 -04:00
|
|
|
lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
|
2015-06-10 09:04:23 -07:00
|
|
|
$(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema $(srcdir)/lib/vswitch-idl.ann > $@.tmp && mv $@.tmp $@
|
2012-03-15 17:10:41 -07:00
|
|
|
|
2010-11-29 12:28:26 -08:00
|
|
|
lib/dirs.c: lib/dirs.c.in Makefile
|
2014-09-29 14:34:11 -07:00
|
|
|
$(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
|
2010-11-29 12:28:26 -08:00
|
|
|
-e 's,[@]srcdir[@],$(srcdir),g' \
|
|
|
|
-e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
|
|
|
|
-e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
|
2012-07-27 15:52:21 -07:00
|
|
|
-e 's,[@]DBDIR[@],"$(DBDIR)",g' \
|
2010-11-29 12:28:26 -08:00
|
|
|
-e 's,[@]bindir[@],"$(bindir)",g' \
|
2011-07-08 17:03:17 -07:00
|
|
|
-e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
|
2010-11-29 12:28:26 -08:00
|
|
|
-e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
|
2014-09-29 14:34:11 -07:00
|
|
|
> lib/dirs.c.tmp && \
|
2009-07-08 13:19:16 -07:00
|
|
|
mv lib/dirs.c.tmp lib/dirs.c
|
|
|
|
|
2016-04-04 21:32:07 -04:00
|
|
|
lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/meta-flow.h
|
2014-09-16 22:13:44 -07:00
|
|
|
$(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
|
2014-10-07 15:24:11 -07:00
|
|
|
lib/meta-flow.lo: lib/meta-flow.inc
|
2016-04-04 21:32:07 -04:00
|
|
|
lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/meta-flow.h
|
2014-09-16 22:13:44 -07:00
|
|
|
$(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
|
|
|
|
lib/nx-match.lo: lib/nx-match.inc
|
|
|
|
CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
|
2014-10-07 15:24:11 -07:00
|
|
|
EXTRA_DIST += build-aux/extract-ofp-fields
|
|
|
|
|
ofp-actions: Centralize all OpenFlow action code for maintainability.
Until now, knowledge about OpenFlow has been somewhat scattered around the
tree. Some of it is in ofp-actions, some of it is in ofp-util, some in
separate files for individual actions, and most of the wire format
declarations are in include/openflow. This commit centralizes all of that
in ofp-actions.
Encoding and decoding OpenFlow actions was previously broken up by OpenFlow
version. This was OK with only OpenFlow 1.0 and 1.1, but each additional
version added a new wrapper around the existing ones, which started to
become hard to understand. This commit merges all of the processing for
the different versions, to the extent that they are similar, making the
version differences clearer.
Previously, ofp-actions contained OpenFlow encoding and decoding, plus
ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which
seems an odd division. This commit moves the parsing code into ofp-actions
with the rest of the code.
Before this commit, the four main bits of code associated with a particular
ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were
all found far away from each other. This often made it hard to see what
was going on for a particular ofpact, since you had to search around to
many different pieces of code. This commit reorganizes so that all of the
code for a given ofpact is in a single place.
As a code refactoring, this commit has little visible behavioral change.
The update to ofproto-dpif.at illustrates one minor bug fix as a side
effect: a flow that was added with the action "dec_ttl" (a standard
OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira
extension to specifically direct packets bounced to the controller because
of too-low TTL), but after this commit it is correctly formatted as
"dec_ttl".
The other visible effect is to drop support for the Nicira extension
dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent
standard action. It seems unlikely that anyone was really using the
Nicira extension in OF1.1 or later.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 12:50:36 -07:00
|
|
|
lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
|
2014-09-29 14:34:11 -07:00
|
|
|
$(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
|
ofp-actions: Centralize all OpenFlow action code for maintainability.
Until now, knowledge about OpenFlow has been somewhat scattered around the
tree. Some of it is in ofp-actions, some of it is in ofp-util, some in
separate files for individual actions, and most of the wire format
declarations are in include/openflow. This commit centralizes all of that
in ofp-actions.
Encoding and decoding OpenFlow actions was previously broken up by OpenFlow
version. This was OK with only OpenFlow 1.0 and 1.1, but each additional
version added a new wrapper around the existing ones, which started to
become hard to understand. This commit merges all of the processing for
the different versions, to the extent that they are similar, making the
version differences clearer.
Previously, ofp-actions contained OpenFlow encoding and decoding, plus
ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which
seems an odd division. This commit moves the parsing code into ofp-actions
with the rest of the code.
Before this commit, the four main bits of code associated with a particular
ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were
all found far away from each other. This often made it hard to see what
was going on for a particular ofpact, since you had to search around to
many different pieces of code. This commit reorganizes so that all of the
code for a given ofpact is in a single place.
As a code refactoring, this commit has little visible behavioral change.
The update to ofproto-dpif.at illustrates one minor bug fix as a side
effect: a flow that was added with the action "dec_ttl" (a standard
OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira
extension to specifically direct packets bounced to the controller because
of too-low TTL), but after this commit it is correctly formatted as
"dec_ttl".
The other visible effect is to drop support for the Nicira extension
dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent
standard action. It seems unlikely that anyone was really using the
Nicira extension in OF1.1 or later.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 12:50:36 -07:00
|
|
|
lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
|
2014-09-29 14:34:11 -07:00
|
|
|
$(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
|
ofp-actions: Centralize all OpenFlow action code for maintainability.
Until now, knowledge about OpenFlow has been somewhat scattered around the
tree. Some of it is in ofp-actions, some of it is in ofp-util, some in
separate files for individual actions, and most of the wire format
declarations are in include/openflow. This commit centralizes all of that
in ofp-actions.
Encoding and decoding OpenFlow actions was previously broken up by OpenFlow
version. This was OK with only OpenFlow 1.0 and 1.1, but each additional
version added a new wrapper around the existing ones, which started to
become hard to understand. This commit merges all of the processing for
the different versions, to the extent that they are similar, making the
version differences clearer.
Previously, ofp-actions contained OpenFlow encoding and decoding, plus
ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which
seems an odd division. This commit moves the parsing code into ofp-actions
with the rest of the code.
Before this commit, the four main bits of code associated with a particular
ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were
all found far away from each other. This often made it hard to see what
was going on for a particular ofpact, since you had to search around to
many different pieces of code. This commit reorganizes so that all of the
code for a given ofpact is in a single place.
As a code refactoring, this commit has little visible behavioral change.
The update to ofproto-dpif.at illustrates one minor bug fix as a side
effect: a flow that was added with the action "dec_ttl" (a standard
OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira
extension to specifically direct packets bounced to the controller because
of too-low TTL), but after this commit it is correctly formatted as
"dec_ttl".
The other visible effect is to drop support for the Nicira extension
dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent
standard action. It seems unlikely that anyone was really using the
Nicira extension in OF1.1 or later.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 12:50:36 -07:00
|
|
|
lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
|
2014-08-12 11:43:43 -07:00
|
|
|
CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
|
2014-10-07 15:24:11 -07:00
|
|
|
EXTRA_DIST += build-aux/extract-ofp-actions
|
ofp-actions: Centralize all OpenFlow action code for maintainability.
Until now, knowledge about OpenFlow has been somewhat scattered around the
tree. Some of it is in ofp-actions, some of it is in ofp-util, some in
separate files for individual actions, and most of the wire format
declarations are in include/openflow. This commit centralizes all of that
in ofp-actions.
Encoding and decoding OpenFlow actions was previously broken up by OpenFlow
version. This was OK with only OpenFlow 1.0 and 1.1, but each additional
version added a new wrapper around the existing ones, which started to
become hard to understand. This commit merges all of the processing for
the different versions, to the extent that they are similar, making the
version differences clearer.
Previously, ofp-actions contained OpenFlow encoding and decoding, plus
ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which
seems an odd division. This commit moves the parsing code into ofp-actions
with the rest of the code.
Before this commit, the four main bits of code associated with a particular
ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were
all found far away from each other. This often made it hard to see what
was going on for a particular ofpact, since you had to search around to
many different pieces of code. This commit reorganizes so that all of the
code for a given ofpact is in a single place.
As a code refactoring, this commit has little visible behavioral change.
The update to ofproto-dpif.at illustrates one minor bug fix as a side
effect: a flow that was added with the action "dec_ttl" (a standard
OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira
extension to specifically direct packets bounced to the controller because
of too-low TTL), but after this commit it is correctly formatted as
"dec_ttl".
The other visible effect is to drop support for the Nicira extension
dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent
standard action. It seems unlikely that anyone was really using the
Nicira extension in OF1.1 or later.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 12:50:36 -07:00
|
|
|
|
2016-03-03 10:20:43 -08:00
|
|
|
lib/ofp-errors.inc: include/openvswitch/ofp-errors.h include/openflow/openflow-common.h \
|
2013-06-24 13:49:40 -07:00
|
|
|
$(srcdir)/build-aux/extract-ofp-errors
|
2014-09-29 14:34:11 -07:00
|
|
|
$(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
|
2016-03-03 10:20:43 -08:00
|
|
|
$(srcdir)/include/openvswitch/ofp-errors.h \
|
2014-09-29 14:34:11 -07:00
|
|
|
$(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
|
2013-06-24 13:49:40 -07:00
|
|
|
mv $@.tmp $@
|
2015-07-09 15:22:46 -04:00
|
|
|
lib/ofp-errors.lo: lib/ofp-errors.inc
|
2015-07-20 19:13:49 -04:00
|
|
|
CLEANFILES += lib/ofp-errors.inc
|
2015-06-10 09:04:23 -07:00
|
|
|
EXTRA_DIST += build-aux/extract-ofp-errors
|
2011-01-12 13:42:50 -08:00
|
|
|
|
2016-04-04 21:32:10 -04:00
|
|
|
lib/ofp-msgs.inc: include/openvswitch/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
|
2014-09-29 14:34:11 -07:00
|
|
|
$(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
|
2016-04-04 21:32:10 -04:00
|
|
|
$(srcdir)/include/openvswitch/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
|
2015-07-09 15:22:46 -04:00
|
|
|
lib/ofp-msgs.lo: lib/ofp-msgs.inc
|
2015-07-20 19:13:49 -04:00
|
|
|
CLEANFILES += lib/ofp-msgs.inc
|
2015-06-10 09:04:23 -07:00
|
|
|
EXTRA_DIST += build-aux/extract-ofp-msgs
|
2012-07-19 23:23:17 -07:00
|
|
|
|
2011-07-06 10:43:03 -07:00
|
|
|
INSTALL_DATA_LOCAL += lib-install-data-local
|
2010-08-25 10:26:40 -07:00
|
|
|
lib-install-data-local:
|
2009-07-08 13:19:16 -07:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(RUNDIR)
|
|
|
|
$(MKDIR_P) $(DESTDIR)$(PKIDIR)
|
|
|
|
$(MKDIR_P) $(DESTDIR)$(LOGDIR)
|
2012-07-27 15:52:21 -07:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(DBDIR)
|