sliver-openvswitch.git
10 years agoMerge remote-tracking branch 'ovs-dev/master'
Giuseppe Lettieri [Wed, 31 Jul 2013 20:17:34 +0000 (22:17 +0200)]
Merge remote-tracking branch 'ovs-dev/master'

Conflicts:
.gitignore

10 years agoofproto-dpif-ipfix: Make the ofproto-dpif-ipfix module thread safe.
Ethan Jackson [Tue, 23 Jul 2013 00:39:14 +0000 (17:39 -0700)]
ofproto-dpif-ipfix: Make the ofproto-dpif-ipfix module thread safe.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif-sflow: Make the ofproto-dpif-sflow module thread safe.
Ethan Jackson [Mon, 22 Jul 2013 19:32:19 +0000 (12:32 -0700)]
ofproto-dpif-sflow: Make the ofproto-dpif-sflow module thread safe.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotunnel: Make the ofproto-dpif tunnel module thread safe.
Ethan Jackson [Tue, 23 Jul 2013 19:03:37 +0000 (12:03 -0700)]
tunnel: Make the ofproto-dpif tunnel module thread safe.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agolacp: Make the LACP module thread safe.
Ethan Jackson [Tue, 23 Jul 2013 01:35:28 +0000 (18:35 -0700)]
lacp: Make the LACP module thread safe.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agocompiler: Fix OVS_LOCKS_EXCLUDED on non clang compilers.
Ethan Jackson [Wed, 31 Jul 2013 17:49:34 +0000 (10:49 -0700)]
compiler: Fix OVS_LOCKS_EXCLUDED on non clang compilers.

This patch renames OVS_LOCKS_EXCLUDED to simply OVS_EXCLUDED so it's
more consistent with the other thread safety annotations.  It also
adds it to the non-clang compilers.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agodatapath: always export priority and skb_mark in netlink message
Andy Zhou [Wed, 31 Jul 2013 02:49:12 +0000 (19:49 -0700)]
datapath: always export priority and skb_mark in netlink message

Handling of missing attributes in netlink can be tricky and turns out
to be error prone. The value (savings in netlink bandwidth) does not
seem to be significant enough to justify allowing them. This patch
series make both kernel and userspace always export priority and
skb_mark attribute. There will be follow on patches in the
direction of making all attributes explicit.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agoovsdb-doc: Add ovsdb-doc to distribution tar ball.
Gurucharan Shetty [Wed, 31 Jul 2013 16:24:46 +0000 (09:24 -0700)]
ovsdb-doc: Add ovsdb-doc to distribution tar ball.

Certain platforms like xenserver do not have the latest
python libraries that are needed by ovsdb-doc (which in-turn
creates ovs-vswitchd.conf.db.5). When we run 'make dist' and
copy over the tar ball to xenserver ddk environemt, we
already include ovs-vswitchd.conf.db.5. But the absence of
ovsdb-doc results in an attempt to regenerate ovs-vswitchd.conf.db.5
and that fails because of the missing python libraries.

Instead of producing ovsdb-doc from ovsdb-doc.in dynamically, we
statically provide ovsdb-doc and pass on the version information
to it through the command line option --version.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agotest-atomic: Re-enable atomic read-write-modify tests.
Ben Pfaff [Mon, 15 Jul 2013 21:14:05 +0000 (14:14 -0700)]
test-atomic: Re-enable atomic read-write-modify tests.

This reverts commit 05d299e0ccca80736cd4438c3224540c5448a7d4 (test-atomic:
Drop atomic read-modify-write tests for the moment.) because the
test for detecting whether GCC support atomic operation built-ins has
been fixed.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoconfigure: Add configure-time check for GCC 4.0+ atomic built-ins.
Ben Pfaff [Mon, 15 Jul 2013 21:13:53 +0000 (14:13 -0700)]
configure: Add configure-time check for GCC 4.0+ atomic built-ins.

We found out earlier that GCC sometimes produces an error only at link time
for atomic built-ins that are not supported on a platform.  This actually
tries the link at configure time and should thus reliably detect whether
the atomic built-ins are really supported.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoclang: Add annotations for thread safety check.
Ethan Jackson [Tue, 30 Jul 2013 22:31:48 +0000 (15:31 -0700)]
clang: Add annotations for thread safety check.

This commit adds annotations for thread safety check. And the
check can be conducted by using -Wthread-safety flag in clang.

Co-authored-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: link upper device for port devices
Jiri Pirko [Tue, 30 Jul 2013 23:27:31 +0000 (16:27 -0700)]
datapath: link upper device for port devices

Link upper device properly. That will make IFLA_MASTER filled up.
Set the master to port 0 of the datapath under which the port belongs.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agoBFD: Unit tests for BFD.
Pavithra Ramesh [Sat, 27 Jul 2013 09:58:06 +0000 (09:58 +0000)]
BFD: Unit tests for BFD.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoovs-vswitchd.conf.db: Correct the header and footer lines.
Gurucharan Shetty [Tue, 30 Jul 2013 17:53:02 +0000 (10:53 -0700)]
ovs-vswitchd.conf.db: Correct the header and footer lines.

Right now, the following 2 lines are how the header and footer
looks like for ovs-vswitchd.conf.db

@VERSION@(5)   Open vSwitch Manual    @VERSION@(5)
Open vSwitch   Open_vSwitch           @VERSION@(5)

After this commit, they look like this:
ovs-vswitchd.conf.db(5)   Open vSwitch Manual   ovs-vswitchd.conf.db(5)
Open vSwitch              1.12.90               ovs-vswitchd.conf.db(5)

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Only track drop flows that are installed
Andy Zhou [Tue, 30 Jul 2013 17:52:35 +0000 (10:52 -0700)]
ofproto-dpif: Only track drop flows that are installed

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Unset DPIF_FP_MODIFY flag when creating a new flo
Andy Zhou [Tue, 30 Jul 2013 17:52:34 +0000 (10:52 -0700)]
ofproto-dpif: Unset DPIF_FP_MODIFY flag when creating a new flo

Remove the DPIF_FP_MODIFY flag when creating a new flow. When flows arrive in
a batch, userspace may push down multiple unique flow definitions that
overlap when wildcards are applied. Kernels support flow wildcarding
will reject these flow as duplicates (EEXIST), which will be logged
at a lower logging level.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agovalgrind: Update glibc timer_create() suppression.
Ethan Jackson [Mon, 29 Jul 2013 22:27:15 +0000 (15:27 -0700)]
valgrind: Update glibc timer_create() suppression.

For some reason the current suppression fails to actually suppress the
warning.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoovs-dev.py: Use custom suppressions when running valgrind.
Ethan Jackson [Mon, 29 Jul 2013 22:26:17 +0000 (15:26 -0700)]
ovs-dev.py: Use custom suppressions when running valgrind.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agodatapath: Add vxlan and flow_dissector to gitignore.
Ethan Jackson [Mon, 29 Jul 2013 21:23:27 +0000 (14:23 -0700)]
datapath: Add vxlan and flow_dissector to gitignore.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years agoAvoid C preprocessor trick where macro has the same name as a function.
Ben Pfaff [Mon, 29 Jul 2013 22:24:45 +0000 (15:24 -0700)]
Avoid C preprocessor trick where macro has the same name as a function.

In C, one can do preprocessor tricks by making a macro expansion include
the macro's own name.  We actually used this in the tree to automatically
provide function arguments, e.g.:

    int f(int x, const char *file, int line);
    #define f(x) f(x, __FILE__, __LINE__)

...

    f(1);    /* Expands to a call like f(1, __FILE__, __LINE__); */

However it's somewhat confusing, so this commit stops using that trick.

Reported-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ed Maste <emaste@freebsd.org>
10 years agoofproto-dpif: Tolerate spontaneous changes in datapath port numbers.
Ben Pfaff [Mon, 29 Jul 2013 22:11:49 +0000 (15:11 -0700)]
ofproto-dpif: Tolerate spontaneous changes in datapath port numbers.

This can happen on ESX.

Also adds a test to make sure this works.

Bug #17634.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Guolin Yang <gyang@vmware.com>
10 years agoofproto-dpif: Correctly refresh all ports on ENOBUFS from dpif_port_poll().
Ben Pfaff [Thu, 13 Jun 2013 20:20:17 +0000 (13:20 -0700)]
ofproto-dpif: Correctly refresh all ports on ENOBUFS from dpif_port_poll().

dpif_port_poll() is allowed to return ENOBUFS if something might have
changed, but the specific change isn't easily reportable.  type_run()
didn't handle this case, so it wouldn't notice any changes when this
happened.

dpif-netdev (including dpif-dummy) uses ENOBUFS exclusively to report
changes, so this fixes a problem there.  dpif-linux rarely uses ENOBUFS but
it can do so if a kernel-to-user Netlink buffer overflows.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: Fix missing VLAN netlink attribute handling
Andy Zhou [Mon, 29 Jul 2013 21:05:23 +0000 (14:05 -0700)]
datapath: Fix missing VLAN netlink attribute handling

Missing VLAN netlink attribute should be interpreted as exact match
of no VLAN tag, instead of wildcarded match for all VLAN tags.

Bug #18736.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agoovs-dev.py: Add support for clang builds.
Ethan Jackson [Sat, 27 Jul 2013 00:06:15 +0000 (17:06 -0700)]
ovs-dev.py: Add support for clang builds.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-dev.py: Rely on configure for warning options.
Ethan Jackson [Mon, 29 Jul 2013 20:34:57 +0000 (13:34 -0700)]
ovs-dev.py: Rely on configure for warning options.

Both -Wall and -Wextra are handled by autoconf, so there's no longer a
need for ovs-dev.py to pass them through CFLAGS.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: fix a bug in SF_FLOW_KEY_PUT macro
Andy Zhou [Mon, 29 Jul 2013 20:26:08 +0000 (13:26 -0700)]
datapath: fix a bug in SF_FLOW_KEY_PUT macro

This bug will cause mask values to corrupt the flow key value. So far
the bug has not showed up because we don't write mask value when
there is no mask Netlink attributes.  However, it needs to be fixed for
the next and future commits where we will start to set default
values for key and mask for missing Netlink attributes.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agodatapath: list: Fix double fetch of pointer in hlist_entry_safe()
Pravin B Shelar [Fri, 26 Jul 2013 20:52:24 +0000 (13:52 -0700)]
datapath: list: Fix double fetch of pointer in hlist_entry_safe()

Following patch backports commit f65846a1800ef8c48d (list: Fix double
fetch of pointer in hlist_entry_safe()) from upstream kernel.
This patch fixes following panic. Thanks to Jesse for helping to
debug this issue.

BUG: unable to handle kernel NULL pointer dereference at 0000000000000118
[129608.216422] IP: [<ffffffffa02436da>] ovs_masked_flow_lookup+0xda/0x140 [openvswitch]
[129608.216918] PGD 11500a067 PUD 120851067 PMD 0
[129608.216994] Oops: 0000 [#1] SMP
[129608.217049] CPU 0
[129608.218697]
[129608.218726] Pid: 0, comm: swapper/0 Tainted: G           O
3.2.39-server-nn21 #1 VMware, Inc. VMware Virtual Platform/440BX Desktop
Reference Platform
[129608.219288] RIP: 0010:[<ffffffffa02436da>]  [<ffffffffa02436da>]
ovs_masked_flow_lookup+0xda/0x140 [openvswitch]
[129608.219454] RSP: 0018:ffff88013fc03b60  EFLAGS: 00010282
[129608.219536] RAX: 0000000000000020 RBX: ffff880123087100 RCX:
ffff88012098e000
[129608.219719] RDX: ffff8800b3b0ca30 RSI: 000000000000010a RDI:
ffff88011df8c000
[129608.220121] RBP: ffff88013fc03c30 R08: 0000000000000001 R09:
0000000020069825
[129608.220287] R10: 0000000000000020 R11: 0000000000000001 R12:
ffff880036e1c6c0
[129608.220451] R13: ffff88013fc03b98 R14: 0000000000000024 R15:
ffffffffffffffe0
[129608.220618] FS:  0000000000000000(0000) GS:ffff88013fc00000(0000)
knlGS:0000000000000000
[129608.220794] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[129608.220911] CR2: 0000000000000118 CR3: 00000001190c9000 CR4:
00000000000406f0
[129608.221122] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[129608.221320] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[129608.221488] Process swapper/0 (pid: 0, threadinfo ffffffff81c00000,
task ffffffff81c0d020)
[129608.221669] Stack:
[129608.221725]  0000000000000044 0000000000000020 ffff88013fc03c60
0000000000000000
[129608.221906]  0000000000000000 0000000000000000 0000000000000000
f014232200000002
[129608.222069]  1973f0142322015a 0000000600080000 1973f0140579f414
000000002f1dc7ec
[129608.222211] Call Trace:
[129608.222264]  <IRQ>
[129608.222316]  [<ffffffffa02445bd>] ovs_flow_lookup+0x5d/0x70
[openvswitch]
[129608.222411]  [<ffffffffa0242550>] ovs_dp_process_received_packet+0x70/0x110 [openvswitch]
[129608.222541]  [<ffffffff8104d6ec>] ? resched_task+0x2c/0x80
[129608.222644]  [<ffffffffa0249b20>] ? netdev_create+0x120/0x120
[openvswitch]
[129608.222743]  [<ffffffffa02483f8>] ovs_vport_receive+0x38/0x40
[openvswitch]
[129608.222838]  [<ffffffffa0249bc3>] netdev_frame_hook+0xa3/0xf0
[openvswitch]
[129608.222933]  [<ffffffffa0249b20>] ? netdev_create+0x120/0x120
[openvswitch]
[129608.223029]  [<ffffffff81539318>] __netif_receive_skb+0x1c8/0x620
[129608.223114]  [<ffffffff81325740>] ? map_single+0x60/0x60
[129608.223192]  [<ffffffff81539b71>] process_backlog+0xb1/0x190
[129608.223274]  [<ffffffff8153ae64>] net_rx_action+0x134/0x290
[129608.223355]  [<ffffffff8106e1a8>] __do_softirq+0xa8/0x210
[129608.223433]  [<ffffffff816458de>] ? _raw_spin_lock+0xe/0x20
[129608.223513]  [<ffffffff8164fcac>] call_softirq+0x1c/0x30
[129608.223590]  [<ffffffff81016215>] do_softirq+0x65/0xa0
[129608.223665]  [<ffffffff8106e58e>] irq_exit+0x8e/0xb0
[129608.223738]  [<ffffffff81650573>] do_IRQ+0x63/0xe0
[129608.223808]  [<ffffffff81645d6e>] common_interrupt+0x6e/0x6e
[129608.223887]  <EOI>
[129608.223933]  [<ffffffff8103ced6>] ? native_safe_halt+0x6/0x10
[129608.224014]  [<ffffffff8101c6a3>] default_idle+0x53/0x1d0
[129608.224092]  [<ffffffff81013236>] cpu_idle+0xd6/0x120
[129608.224167]  [<ffffffff8161785e>] rest_init+0x72/0x74
[129608.224252]  [<ffffffff81cfcbaa>] start_kernel+0x3b5/0x3c2
[129608.224331]  [<ffffffff81cfc347>]
x86_64_start_reservations+0x132/0x136
[129608.224421]  [<ffffffff81cfc140>] ? early_idt_handlers+0x140/0x140
[129608.224506]  [<ffffffff81cfc44d>] x86_64_start_kernel+0x102/0x111
[129608.224589] Code: 25 48 63 53 28 48 8d 42 01 48 c1 e0 04 49 01 c7 49
8b 07 48 85 c0 74 61 4d 8b 3f 48 c1 e2 04 48 83 c2 10 49 29 d7 4d 85 ff
74 26 <4d> 39 a7 38 01 00 00 75 cd 48 8b 95 38 ff ff ff 4c 89 ee 49 8d
[129608.224949] RIP  [<ffffffffa02436da>] ovs_masked_flow_lookup+0xda/0x140 [openvswitch]

Original commit msg:

list: Fix double fetch of pointer in hlist_entry_safe()

The current version of hlist_entry_safe() fetches the pointer twice,
once to test for NULL and the other to compute the offset back to the
enclosing structure.  This is OK for normal lock-based use because in
that case, the pointer cannot change.  However, when the pointer is
protected by RCU (as in "rcu_dereference(p)"), then the pointer can
change at any time.  This use case can result in the following sequence
of events:

1.  CPU 0 invokes hlist_entry_safe(), fetches the RCU-protected
    pointer as sees that it is non-NULL.

2.  CPU 1 invokes hlist_del_rcu(), deleting the entry that CPU 0
    just fetched a pointer to.  Because this is the last entry
    in the list, the pointer fetched by CPU 0 is now NULL.

3.  CPU 0 refetches the pointer, obtains NULL, and then gets a
    NULL-pointer crash.

This commit therefore applies gcc's "({ })" statement expression to
create a temporary variable so that the specified pointer is fetched
only once, avoiding the above sequence of events.  Please note that
it is the caller's responsibility to use rcu_dereference() as needed.
This allows RCU-protected uses to work correctly without imposing
any additional overhead on the non-RCU case.

Many thanks to Eric Dumazet for spotting root cause!

Reported-by: CAI Qian <caiqian@redhat.com>
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Li Zefan <lizefan@huawei.com>
Bug #17099

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years agoImplement OpenFlow 1.3 queue stats duration feature.
Ben Pfaff [Wed, 17 Jul 2013 22:56:22 +0000 (15:56 -0700)]
Implement OpenFlow 1.3 queue stats duration feature.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-util: Fix port and queue stat counting for OpenFlow 1.3.
Ben Pfaff [Wed, 17 Jul 2013 22:53:26 +0000 (15:53 -0700)]
ofp-util: Fix port and queue stat counting for OpenFlow 1.3.

OpenFlow 1.0, 1.1, and 1.2 all have the same struct size for port and
queue stats.  OpenFlow 1.3 has larger structs, but the ofp-util code didn't
realize that.  This fixes the problem.

It appears that the only consequence of this problem would have been
printing the wrong count in ofp-print output.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: Use non rcu hlist_del() flow table entry.
Pravin B Shelar [Thu, 25 Jul 2013 18:28:02 +0000 (11:28 -0700)]
datapath: Use non rcu hlist_del() flow table entry.

Flow table destroy is done in rcu call-back context.  Therefore
there is no need to use rcu variant of hlist_del().

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@niciria.com>
10 years agodatapath: Use correct type while allocating flex array.
Pravin B Shelar [Thu, 25 Jul 2013 18:25:21 +0000 (11:25 -0700)]
datapath: Use correct type while allocating flex array.

Flex array is used to allocate hash buckets which is type struct
hlist_head, but we use `struct hlist_head *` to calculate
array size.  Since hlist_head is of size pointer it works fine.

Following patch use correct type.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years ago.gitignore: ignore temporary _debian packaging content
Mark Hamilton [Thu, 25 Jul 2013 19:41:55 +0000 (12:41 -0700)]
.gitignore: ignore temporary _debian packaging content

Signed-off-by: Mark Hamilton <mhamilton@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif: Make dpifs thread-safe, and document it.
Ben Pfaff [Thu, 25 Jul 2013 17:31:42 +0000 (10:31 -0700)]
dpif: Make dpifs thread-safe, and document it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agodpif-netdev: Make internally thread-safe by introducing a global mutex.
Ben Pfaff [Tue, 23 Jul 2013 23:56:26 +0000 (16:56 -0700)]
dpif-netdev: Make internally thread-safe by introducing a global mutex.

This can be improved later but it is the simple thing to do for now.

I marked a couple of races with XXX.  I don't have a really good solution
for these, but I hope to find one.  They may be harmless in practice.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agodpif-linux: Make use of channels thread-safe.
Ben Pfaff [Tue, 23 Jul 2013 19:41:57 +0000 (12:41 -0700)]
dpif-linux: Make use of channels thread-safe.

This seems to be the last remaining thread-unsafe code in dpif-linux.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agodpif-linux: Make port change notification thread-safe.
Ben Pfaff [Mon, 22 Jul 2013 22:00:49 +0000 (15:00 -0700)]
dpif-linux: Make port change notification thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoovs-thread: Add wrappers for "destroy" functions too.
Ben Pfaff [Mon, 22 Jul 2013 22:24:36 +0000 (15:24 -0700)]
ovs-thread: Add wrappers for "destroy" functions too.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agometa-flow: Be pickier about format of Ethernet addresses.
Ben Pfaff [Thu, 25 Jul 2013 16:48:36 +0000 (09:48 -0700)]
meta-flow: Be pickier about format of Ethernet addresses.

Otherwise, input with invalid trailing data was accepted, such as input
that had 7 colon-separated segments instead of 6.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoutil: Set thread name via pthreads in set_subprogram_name().
Ben Pfaff [Thu, 25 Jul 2013 16:45:43 +0000 (09:45 -0700)]
util: Set thread name via pthreads in set_subprogram_name().

This makes "top" and "ps" output more readable on FreeBSD at least, and
the names are also visible in debuggers.

Suggested-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Tested-by: Andy Zhou <azhou@nicira.com>
10 years agoovs-bugtool: Increase max size of CAP_HARDWARE_INFO.
Gurucharan Shetty [Mon, 22 Jul 2013 17:17:53 +0000 (10:17 -0700)]
ovs-bugtool: Increase max size of CAP_HARDWARE_INFO.

Current size feels very low when we are collecting o/p of
'dmidecode' and 'lspci -vv'

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-bugtool: Separate capability for general network info.
Gurucharan Shetty [Fri, 19 Jul 2013 19:37:03 +0000 (12:37 -0700)]
ovs-bugtool: Separate capability for general network info.

Current situation is that CAP_NETWORK_STATUS has a max size of 50 MB.
When we have around 100,000 openflow flows, we over-run that size
by just running the "ovs-ofctl dump-flows" command. All the openvswitch
commands run through the plugin scripts in this repo won't have its
data stored in the debug bundle in this case as they are part of
CAP_NETWORK_STATUS too. One option to correct this is to increase
the CAP_NETWORK_STATUS max size to a higher number. But CAP_NETWORK_STATUS
also includes a bunch of general network related information collected
by running commands like ethtool, tc etc. and we probably want to limit
the data collected through those commands.

With this commit, we create a new capability called CAP_NETWORK_INFO
and collect general network related information through them. For OVS
related information, we continue to use CAP_NETWORK_STATUS, but remove
the maximum size restriction. One rationale to keep OVS related
information in CAP_NETWORK_STATUS is because xen-bugtool probably expects
OVS information in that capability.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-bugtool: Remove duplicate bond/show command.
Gurucharan Shetty [Thu, 18 Jul 2013 20:44:51 +0000 (13:44 -0700)]
ovs-bugtool: Remove duplicate bond/show command.

ovs-appctl bond/show is being run through the plugin by
calling the script ovs-bugtool-bond-show.

So remove the redundant code.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoofproto-dpif-xlate: Fix invalid memory read on port removal.
Ethan Jackson [Mon, 22 Jul 2013 19:54:09 +0000 (12:54 -0700)]
ofproto-dpif-xlate: Fix invalid memory read on port removal.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoPrepare for post-1.12.0 (1.12.90).
Justin Pettit [Tue, 23 Jul 2013 22:06:08 +0000 (15:06 -0700)]
Prepare for post-1.12.0 (1.12.90).

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoPrepare for 1.12.0.
Justin Pettit [Tue, 23 Jul 2013 22:03:52 +0000 (15:03 -0700)]
Prepare for 1.12.0.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoclang: Fix the alignment warning.
Alex Wang [Mon, 22 Jul 2013 22:47:19 +0000 (15:47 -0700)]
clang: Fix the alignment warning.

This commit fixes the warning issued by 'clang' when pointer is casted
to one with greater alignment.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif-linux: Add some internal "const" qualifiers.
Ben Pfaff [Fri, 19 Jul 2013 21:51:32 +0000 (14:51 -0700)]
dpif-linux: Add some internal "const" qualifiers.

This makes it a little easier to see what functions actually need to modify
members of struct dpif_linux.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agovlog: Mark vlog_module_ptr_* as const.
Ben Pfaff [Mon, 15 Jul 2013 20:13:17 +0000 (13:13 -0700)]
vlog: Mark vlog_module_ptr_* as const.

This makes them more obviously thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agofatal-signal: Make thread-safe.
Ben Pfaff [Thu, 9 May 2013 17:54:04 +0000 (10:54 -0700)]
fatal-signal: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agocommand-line: Make proctitle changing commands thread-safe.
Ben Pfaff [Fri, 26 Apr 2013 20:28:33 +0000 (13:28 -0700)]
command-line: Make proctitle changing commands thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-vport: Make pid checking in set_tunnel_config() thread-safe
Ben Pfaff [Fri, 26 Apr 2013 20:20:30 +0000 (13:20 -0700)]
netdev-vport: Make pid checking in set_tunnel_config() thread-safe

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoofp-msgs: Make alloc_xid() thread-safe.
Ben Pfaff [Fri, 26 Apr 2013 20:07:33 +0000 (13:07 -0700)]
ofp-msgs: Make alloc_xid() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agonetdev-dummy: Make counter thread-safe.
Ben Pfaff [Fri, 26 Apr 2013 19:58:14 +0000 (12:58 -0700)]
netdev-dummy: Make counter thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoovsdb-idlc: Ensure that initialization occurs single-threaded.
Ben Pfaff [Fri, 26 Apr 2013 18:25:00 +0000 (11:25 -0700)]
ovsdb-idlc: Ensure that initialization occurs single-threaded.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoofp-parse: Make parse_ofp_str() thread-safe.
Ben Pfaff [Fri, 26 Apr 2013 18:22:19 +0000 (11:22 -0700)]
ofp-parse: Make parse_ofp_str() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agonetdev-linux: Work on thread safety.
Ben Pfaff [Mon, 29 Apr 2013 21:34:57 +0000 (14:34 -0700)]
netdev-linux: Work on thread safety.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agouuid: Make uuid_generate() thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 23:37:44 +0000 (16:37 -0700)]
uuid: Make uuid_generate() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agosocket-util: Make get_max_fds() and get_null_fd() thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 23:19:21 +0000 (16:19 -0700)]
socket-util: Make get_max_fds() and get_null_fd() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agopackets: Make eth_addr_is_reserved() thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 22:03:57 +0000 (15:03 -0700)]
packets: Make eth_addr_is_reserved() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agoovsdb-types: Make ovsdb_base_type_get_enum_type() thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 22:02:13 +0000 (15:02 -0700)]
ovsdb-types: Make ovsdb_base_type_get_enum_type() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
10 years agovlan-splinter: Fix inverted logic bug.
Alex Wang [Tue, 23 Jul 2013 01:15:49 +0000 (18:15 -0700)]
vlan-splinter: Fix inverted logic bug.

When "other-config:enable-vlan-splinters=true" is set, the existing
vlans with ip address must be retained. The bug actually does the
opposite and retains the vlans without ip address. This commit fixes
it.

Reported-by: Roman Sokolkov <rsokolkov@gmail.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoMerge branch 'mainstream'
Giuseppe Lettieri [Tue, 23 Jul 2013 08:56:22 +0000 (10:56 +0200)]
Merge branch 'mainstream'

10 years agodatapath: remove RCU annotation from flow->mask
Andy Zhou [Mon, 22 Jul 2013 22:08:00 +0000 (15:08 -0700)]
datapath: remove RCU annotation from flow->mask

After a mask is assigned to a flow, it will not change for the life of
the flow. Since flow access is protected by RCU lock, access to
flow->mask after getting a flow is always safe.

Suggested-by: Jesse Gross <jesse@nicira.com>
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agosparse: Avoid sparse warnings for additional pthread initializers.
Ben Pfaff [Mon, 22 Jul 2013 20:30:01 +0000 (13:30 -0700)]
sparse: Avoid sparse warnings for additional pthread initializers.

Reported-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoconfigure: Remove -Wno-override-init, add -Wextra to compile options.
Ben Pfaff [Mon, 22 Jul 2013 20:38:25 +0000 (13:38 -0700)]
configure: Remove -Wno-override-init, add -Wextra to compile options.

The build is clean against -Wextra at least with GCC 4.4.

(-Wextra includes -Woverride-init.)

Suggested-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoclang: Fix the "expression result unused" warning.
Alex Wang [Mon, 22 Jul 2013 16:19:57 +0000 (09:19 -0700)]
clang: Fix the "expression result unused" warning.

This commit makes macro function "ASSIGN_CONTAINER()" evaluates
to "(void)0". This is to avoid the 'clang' warning: "expression
result unused", since most of time, the final evaluated value
is not used.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoclang: Fix segfault in unit tests.
Alex Wang [Mon, 22 Jul 2013 16:19:56 +0000 (09:19 -0700)]
clang: Fix segfault in unit tests.

It seems that 'clang' compiler applies strict protection on pointer
dereference. And it causes unexpected execution in macro functions
like "HMAP_FOR_EACH()" and unit test failures. This commit fixes
this issue and pass all unit tests.

Co-authored-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovsdb-data: Make ovsdb_atom_default() thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 22:00:06 +0000 (15:00 -0700)]
ovsdb-data: Make ovsdb_atom_default() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif: Serialize initialization.
Ben Pfaff [Tue, 23 Apr 2013 21:35:29 +0000 (14:35 -0700)]
dpif: Serialize initialization.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodirs: Make thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 21:04:54 +0000 (14:04 -0700)]
dirs: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoxenserver: Make thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 20:21:07 +0000 (13:21 -0700)]
xenserver: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agometa-flow: Make thread-safe.
Ben Pfaff [Mon, 15 Apr 2013 22:30:03 +0000 (15:30 -0700)]
meta-flow: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agomemory: Add note about threaded usage to comment.
Ben Pfaff [Mon, 15 Apr 2013 22:10:47 +0000 (15:10 -0700)]
memory: Add note about threaded usage to comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agolockfile: Make thread-safe.
Ben Pfaff [Mon, 15 Apr 2013 22:05:19 +0000 (15:05 -0700)]
lockfile: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agojsonrpc: Make thread-safe.
Ben Pfaff [Mon, 15 Apr 2013 21:35:18 +0000 (14:35 -0700)]
jsonrpc: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-msgs: Make thread-safe.
Ben Pfaff [Wed, 19 Jun 2013 18:41:06 +0000 (11:41 -0700)]
ofp-msgs: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif-netdev: Make 'max_mtu' a per-dp feature, for thread safety.
Ben Pfaff [Wed, 19 Jun 2013 18:10:57 +0000 (11:10 -0700)]
dpif-netdev: Make 'max_mtu' a per-dp feature, for thread safety.

This ensures that an external lock around a dpif_netdev will allow
thread-safe access to it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: Conditionally define skb_unclone in datapath compat code
Kyle Mestery [Mon, 22 Jul 2013 14:38:13 +0000 (10:38 -0400)]
datapath: Conditionally define skb_unclone in datapath compat code

Recent versions of Fedora have skb_unclone included in their
kernels. This patch adds a conditional check into the compat directory so as
not to error out by defining it twice. This allows the latest OVS kernel
module to build on Fedora 19.

Signed-off-by: Kyle Mestery <kmestery@cisco.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agodatapath: Restructure vxlan tunneling.
Pravin B Shelar [Mon, 1 Jul 2013 21:38:33 +0000 (14:38 -0700)]
datapath: Restructure vxlan tunneling.

Following patch restructures vxlan tunneling so that it is more
in sync with upstream vxlan tunneling code.

Signed-off-by: Pravin Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years agodatapath: Improve net-namespace compat code.
Pravin B Shelar [Mon, 1 Jul 2013 21:36:51 +0000 (14:36 -0700)]
datapath: Improve net-namespace compat code.

Following patch improves compat net-namespace code which is mostly
targeted for 2.6.32 kernel. upcoming vxlan restructuring patch
needs this patch.

Signed-off-by: Pravin Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years agodatapath: Add mask check during flow lookup
Andy Zhou [Fri, 19 Jul 2013 18:11:24 +0000 (11:11 -0700)]
datapath: Add mask check during flow lookup

A mega flow matches when the masked key matches and the mask applied
is the same as the mask used to create the mega flow.

This patch adds the implementation of the second match condition
mentioned above. Without this fix, mega flow lookup may result false
match.

Bug #18584

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
10 years agobond: Support null argument to bond_ref().
Ethan Jackson [Fri, 19 Jul 2013 19:59:51 +0000 (12:59 -0700)]
bond: Support null argument to bond_ref().

This is consistent with the other ref functions, and was causing
segmentation faults in some test cases.

Reported-by: Mukesh Hira <mhira@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-vswitchd: Document the ovs-appctl bfd/* commands.
Pavithra Ramesh [Fri, 19 Jul 2013 07:00:26 +0000 (07:00 +0000)]
ovs-vswitchd: Document the ovs-appctl bfd/* commands.

Added man-page entries for bfd/show and bfd/set-forwarding commands.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoAvoid designated initializers and static decls of arrays of unknown size.
Linda Sun [Fri, 19 Jul 2013 17:04:47 +0000 (10:04 -0700)]
Avoid designated initializers and static decls of arrays of unknown size.

MSVC can't handle either one.

Signed-off-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoMerge branch 'mainstream'
Giuseppe Lettieri [Fri, 19 Jul 2013 10:51:38 +0000 (12:51 +0200)]
Merge branch 'mainstream'

10 years agosystem-stats: Move into separate thread.
Ben Pfaff [Thu, 25 Apr 2013 23:42:04 +0000 (16:42 -0700)]
system-stats: Move into separate thread.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agovlog: Make thread-safe.
Ben Pfaff [Wed, 17 Jul 2013 18:42:10 +0000 (11:42 -0700)]
vlog: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agovlog: Use async I/O.
Ben Pfaff [Wed, 10 Jul 2013 18:43:46 +0000 (11:43 -0700)]
vlog: Use async I/O.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-util: Un-"inline" should_send_version_bitmap().
Ben Pfaff [Thu, 18 Jul 2013 22:48:33 +0000 (15:48 -0700)]
ofp-util: Un-"inline" should_send_version_bitmap().

There is no reason to mark this function as inline.  Let the compiler do
its job.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
10 years agoasync-append: New library to allow asynchronous appending to a log file.
Ben Pfaff [Wed, 10 Jul 2013 18:40:28 +0000 (11:40 -0700)]
async-append: New library to allow asynchronous appending to a log file.

This will be hooked into the vlog library in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetlink: Avoid designated initializers because MSVC does not support them.
Ben Pfaff [Thu, 18 Jul 2013 21:52:02 +0000 (14:52 -0700)]
netlink: Avoid designated initializers because MSVC does not support them.

CC: Linda Sun <lsun@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetlink-socket: Make thread-safe.
Ben Pfaff [Wed, 19 Jun 2013 18:39:11 +0000 (11:39 -0700)]
netlink-socket: Make thread-safe.

The uses of vlog in this module are not thread-safe, because vlog itself
is not yet thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetlink-socket: Simplify use of transactions and dumps.
Ben Pfaff [Mon, 29 Apr 2013 20:57:50 +0000 (13:57 -0700)]
netlink-socket: Simplify use of transactions and dumps.

This disentangles "struct nl_dump" from "struct nl_sock", clearing the way
to make the use of either one thread-safe in an obviously correct manner.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-linux: avoid negative value cast to non-negative in comparison
ZhengLingyun [Thu, 18 Jul 2013 08:08:06 +0000 (16:08 +0800)]
netdev-linux: avoid negative value cast to non-negative in comparison

I am using a userspace OVS, there is a constant ERR message in log:
"dpif_netdev|ERR|error receiving data from ovs-netdev: Message too long"
Check the code and find there is a comparison between ssize_t and size_t type in
netdev_rx_linux_recv(). It makes the negative "retval" greater than the "size".

Change the sequence of comparison to avoid negative return value cast to
a positive and become greater then a non-negative value.

Signed-off-by: ZhengLingyun <konghuarukhr@163.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-msgs: Consistently include "STATS" in the names of stats messages.
Ben Pfaff [Fri, 28 Jun 2013 20:41:53 +0000 (13:41 -0700)]
ofp-msgs: Consistently include "STATS" in the names of stats messages.

This is the convention that I've meant to maintain, but missed a number of
messages.  This corrects them.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Make "ovs-appctl dpif/dump-flows" megaflow-aware.
Justin Pettit [Wed, 17 Jul 2013 07:19:49 +0000 (00:19 -0700)]
ofproto-dpif: Make "ovs-appctl dpif/dump-flows" megaflow-aware.

The "ovs-appctl dpif/dump-flows" command wasn't updated to print
megaflows, so the output would not include wildcards even though the
datapath may, so the output was inconsistent and confusing.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agoofproto-dpif: Expire fin_timeout actions when no previous timeout set.
Justin Pettit [Wed, 17 Jul 2013 06:05:10 +0000 (23:05 -0700)]
ofproto-dpif: Expire fin_timeout actions when no previous timeout set.

Commit e503cc199 (ofproto: Optimise OpenFlow flow expiry) optimized
OpenFlow flow expiration by putting expirable flows on a list.  However,
the list is only configured at rule creation time.  If the rule is
created without a timeout, but is later set by the fin_timeout action,
it will never expire.  This commit adds the rule to the list when the
action is triggered.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoutil: New macros ROUND_UP_POW2, ROUND_DOWN_POW2.
Ben Pfaff [Thu, 25 Apr 2013 18:18:10 +0000 (11:18 -0700)]
util: New macros ROUND_UP_POW2, ROUND_DOWN_POW2.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoMake attribute packed equivalent for MSC compilers.
Linda Sun [Wed, 17 Jul 2013 19:08:25 +0000 (12:08 -0700)]
Make attribute packed equivalent for MSC compilers.

Signed-off-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agobyteq: Make the queue size variable instead of fixed at BYTEQ_SIZE bytes.
Ben Pfaff [Thu, 25 Apr 2013 17:48:03 +0000 (10:48 -0700)]
byteq: Make the queue size variable instead of fixed at BYTEQ_SIZE bytes.

Signed-off-by: Ben Pfaff <blp@nicira.com>