Ben Pfaff [Wed, 8 Jan 2014 23:58:11 +0000 (15:58 -0800)]
dpif-netdev: Make thread-safety much more granular.
This will allow for parallelism in multithreaded forwarding in an upcoming
commit.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 27 Dec 2013 17:42:51 +0000 (09:42 -0800)]
dpif-netdev: Introduce new mutex to protect queues.
This is a first step in making thread safety more granular in dpif-netdev,
to allow for multithreaded forwarding.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 8 Jan 2014 22:37:13 +0000 (14:37 -0800)]
dpif-netdev: Break actions out into new struct dp_netdev_actions.
This is analogous to the split between rule and rule_actions in
ofproto. As there, it will allow retaining a reference to a rule's
actions, while processing them, without having to retain a reference
to the rule itself.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sat, 28 Dec 2013 03:41:10 +0000 (19:41 -0800)]
dpif-netdev: Take advantage of ovs_refcount for dp_netdev.
By making "destroyed" own a reference, we can treat dp_netdev's ref_cnt
like any other in Open vSwitch.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sat, 28 Dec 2013 03:39:24 +0000 (19:39 -0800)]
ovs-atomic: Introduce a new 'struct ovs_refcount'.
This is a thin wrapper around an atomic_uint. It is useful anyhow because
each ovs_refcount_ref() or ovs_refcount_unref() call saves a few lines of
code.
This commit also changes all the potential direct users over to use the new
data structure.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 8 Jan 2014 18:42:12 +0000 (10:42 -0800)]
ovs-atomic: Add atomic_destroy() and use everywhere it is needed.
C11 is able to require that atomics don't need to be destroyed, but some
of the OVS implementations do.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 9 Jan 2014 01:13:28 +0000 (17:13 -0800)]
ovs-atomic: New functions atomic_flag_init(), atomic_flag_destroy().
Standard C11 doesn't need these functions because it is able to require
implementations not to need them. But we can't construct a portable
implementation that does not need them in every case, so this commit adds
them.
These functions are only needed for atomic_flag objects that are
dynamically allocated (because statically allocated objects can use
ATOMIC_FLAG_INIT). So far there aren't any of those, but an upcoming
commit will introduce one.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Mon, 23 Dec 2013 23:46:22 +0000 (15:46 -0800)]
dpif-netdev: Remove max_mtu tracking.
Normally all the ports have the same mtu anyhow, so there is little
advantage in keeping track of the maximum mtu on a per-bridge basis. In
upcoming commits, tracking mtu will require more locking and present
even less advantage (because the packet buffer will become per-thread, so
that reallocating once per thread becomes essentially a null cost).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Wed, 25 Dec 2013 00:08:57 +0000 (16:08 -0800)]
dpif-netdev: Use hmap instead of list+array for tracking ports.
The goal is to make it easy to divide the ports into groups for handling
by threads. It seems easy enough to do that by hash value, and a little
harder otherwise.
This commit has the side effect of raising the maximum number of ports from
256 to UINT32_MAX-1. That is why some tests need to be updated:
previously, internally generated port names like "ovs_vxlan_4341" were
ignored because 4341 is bigger than the previous limit of 256.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Mon, 23 Dec 2013 22:04:13 +0000 (14:04 -0800)]
dpif-netdev: Use new "ovsthread_counter" to track dp statistics.
ovsthread_counter is an abstract interface that could be implemented
different ways. The initial implementation is simple but less than
optimally efficient.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 23 Dec 2013 22:34:01 +0000 (14:34 -0800)]
dpif: Remove unused 'get_max_ports' from provider interface.
Nothing ever called this function.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Thu, 26 Dec 2013 06:27:25 +0000 (22:27 -0800)]
netdev-dummy: Make netdev_rx_wait() wakeups work cross-thread for dummies.
Until now, netdev_dummy_rx_wait() has only checked whether the receive
queue for the dummy device is currently empty. This has worked OK because
in practice packets were queued to dummy devices only from the same thread
that attempted to receive them. An upcoming commit will use different
threads for these purposes, so this commit switches to a notification
method that works cross-thread.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Thu, 26 Dec 2013 01:15:20 +0000 (17:15 -0800)]
netdev-dummy: Remove unused member 'listening' from struct netdev_dummy.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Sat, 28 Dec 2013 00:29:24 +0000 (16:29 -0800)]
ofproto-dpif-upcall: Slightly simplify udpif_upcall_handler().
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Thu, 9 Jan 2014 00:52:15 +0000 (16:52 -0800)]
ofproto/trace: Show megaflow fields in each resubmit.
This commit makes the ofproto/trace show the megaflow fields
for each resubmit.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 9 Jan 2014 00:52:14 +0000 (16:52 -0800)]
ofproto/trace: Change output field name.
This commit changes the output field name from "Relevant fields"
to "Megaflow".
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 9 Jan 2014 00:52:13 +0000 (16:52 -0800)]
ofproto/trace: Remove the unused variables.
This commit removes the unused variables in ofproto_trace() function.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 9 Jan 2014 00:52:12 +0000 (16:52 -0800)]
ofproto/trace: Use final flow to compute "Relevant fields".
Commit
bcd2633a (ofproto-dpif: Store relevant fields for wildcarding
in facet.) introduced the bug that uses original input flow as final
flow to compute the "Relevant fields" in ofproto/trace ouput. This
commit fixes this bug.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Daniele Venturino [Thu, 9 Jan 2014 00:03:07 +0000 (16:03 -0800)]
utilities: Wrong command syntax in ovs-vsctl manpage.
The command shown in the man page to disable the STP protocol on a bridge
is:
ovs-vsctl clear Bridge br0 stp_enable
Calling that, the following warning message is returned:
ovs-vsctl: "clear" operation cannot be applied to column stp_enable
of table Bridge, which is not allowed to be empty
It seems correct to use the command:
ovs-vsctl set Bridge br0 stp_enable=false
Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Wei Yongjun [Wed, 8 Jan 2014 14:07:52 +0000 (06:07 -0800)]
datapath: Use kmem_cache_free() instead of kfree()
memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().
Fixes:
e298e5057006 ('openvswitch: Per cpu flow stats.')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jesse Gross <jesse@nicira.com>
YAMAMOTO Takashi [Wed, 8 Jan 2014 06:07:30 +0000 (15:07 +0900)]
Fix !HAVE_NETLINK build
Fix a regression introduced by commit
4b97b70d
("ofproto-dpif: Enable NXAST_SAMPLE only if the datapath supports it.")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Andy Zhou [Tue, 7 Jan 2014 08:17:25 +0000 (00:17 -0800)]
ofproto-dpif: Fix a vlan-splinter megaflow bug
When vlan-splinter is enabled, ovs receives non-vlan flows from the
kernel vlan ports, vlan tag is then added to the incoming flow before
xlating, so that they look like those received from a trunk port.
In case megaflow is enabled, xlating may set vlan masks during rule
processing as usual. If those vlan masks were serialized and downloaded
to the kernel (this bug), those mega flows will be rejected due to
unexpected vlan mask encapsulation, since the original kernel flows do
not have vlan tags. This bug does not break connectivity, but impacts
performance since all traffic received on vlan splinter ports will now
be handled by vswitchd, as no datapath flows can be successfully
installed.
This fix is to make sure no vlan mask encapsulation is generated for
the datapath flow if its in_port was re-written by vlan-splinter
receiving logic.
Bug #22567
Signed-off-by: Andy Zhou <azhou@nicira.com>
Simon Horman [Tue, 7 Jan 2014 05:33:37 +0000 (14:33 +0900)]
netdev: Update rx_recv documentation for NULL case
Replace truncated description of when rx_recv() may be NULL
with text used for other fields of netdev_class.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Tue, 7 Jan 2014 04:48:08 +0000 (13:48 +0900)]
ofproto-dpif-xlate: Correct check for MPLS LSE
zero is a valid MPLS LSE so it is not valid check against
that value for MPLS LSE presence. Instead, check against
the flow's dl_type which should be an MPLS type if an LSE is present.
This problem appears to have been introduced by
b2dd70be133bf86c ("Native Set-Field action.").
Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Fri, 3 Jan 2014 23:44:28 +0000 (15:44 -0800)]
datapath: Check for backported sctp_compute_cksum().
This is backported by RHEL7.
Reported-by: Ashok Byahatti <ashok.byahatti@embrane.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
Jesse Gross [Fri, 3 Jan 2014 17:31:38 +0000 (09:31 -0800)]
FAQ: Add entry on GRE module conflicts.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Tue, 31 Dec 2013 18:36:19 +0000 (10:36 -0800)]
odp-util: Simplify logic in odp_flow_key_to_flow__().
Simplify (a && b) || (!a && c) to just a ? b : c.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 31 Dec 2013 19:32:16 +0000 (11:32 -0800)]
odp-util: Avoid null dereference in parse_8021q_onward().
For parsing a mask, this code in parse_8021q_onward() always read out
the OVS_KEY_ATTR_VLAN attribute without first checking whether it existed.
The correct behavior, implemented by this commit, appears to be treating
the VLAN as wildcarded and to continue parsing the flow.
Bug #22312.
Reported-by: Krishna Miriyala <miriyalak@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Jarno Rajahalme [Mon, 30 Dec 2013 23:58:58 +0000 (15:58 -0800)]
dpif: Use explicit packet metadata.
This helps reduce confusion about when a flow is a flow and when it is
just metadata.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Mon, 30 Dec 2013 23:58:58 +0000 (15:58 -0800)]
odp-execute: Consolidate callbacks.
Use one callback instead of many, helps in adding new functionality
later on.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Mon, 30 Dec 2013 23:42:36 +0000 (15:42 -0800)]
tests: Make some tests more robust.
These tests break if OVS internal hash function is changed. Some of
this is due to dependency on the order in which elements are iterated
from hash maps, or the algorithm used is just dependent on the
specific hash values produced for specific inputs (groups). These
changes make these test cases more robust, so that they will not break
so easily due to OVS internal hash function implementation changes.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Mon, 30 Dec 2013 23:15:52 +0000 (15:15 -0800)]
bfd: Make bfd decay test robust.
With ovs multithreading implementation, the bfd decay test
becomes fragile due to its high dependency on timing sequence.
This commit removes these dependencies and makes the test robust.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Dec 2013 22:49:25 +0000 (14:49 -0800)]
ofproto-dpif: Enable NXAST_SAMPLE only if the datapath supports it.
This prevents using an older datapath from breaking forwarding.
CC: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Mon, 30 Dec 2013 22:21:40 +0000 (14:21 -0800)]
bridge: Fix reversed string parsing in bridge_configure_flow_miss_model().
This commit fixes a command matching error introduced by commit
7155fa52f (ofproto-dpif: Add 'force-miss-model' configuration).
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 5 Dec 2013 17:21:14 +0000 (09:21 -0800)]
connmgr: Log when a packet-in is dropped due to queue overflow.
Reported-by: Anton Matsiuk <anton.matsiuk@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 4 Dec 2013 23:46:55 +0000 (15:46 -0800)]
netdev-linux: Simplify get_stats_via_netlink().
There's no need to obtain the ifindex, because RTM_GETLINK is happy to take
the interface name. There's no need to do a full nl_policy_parse(),
because we only need a single attribute.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 4 Dec 2013 23:43:31 +0000 (15:43 -0800)]
netdev-linux: Drop support for pre-2.6.19 kernels.
The OVS kernel module requires 2.6.32 or later, so there's no reason for
userspace to support older kernels. This commit removes the special
fallback code for retrieving Linux netdev stats in pre-2.6.19 kernels,
which should no longer be useful.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Fri, 20 Dec 2013 23:12:58 +0000 (15:12 -0800)]
ofproto-dpif-monitor: Remove monitor_init().
Commit
881d47a9fa9 (monitor: Replace monitor_seq with periodic
wakeup.) removes the global "struct seq" in ofproto-dpif-monitor
module. This change makes the monitor_init() no longer needed.
This commit removes the monitor_init() from ofproto-dpif-monitor.c.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Dec 2013 19:35:41 +0000 (11:35 -0800)]
tests: Remove \r from source tree.
An ovsdb-server test had a literal carriage return in a check that
validates a directory name. It isn't really necessary (who puts a carriage
return in a directory name?) and it does cause problems for passing around
patches via email, so just delete it.
CC: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 24 Dec 2013 16:37:32 +0000 (08:37 -0800)]
Makefile.am: Always use C locale for "sort" and "comm".
Otherwise, if the user changes locales between running the "dist-hook-git"
and "distfiles" targets (e.g. in different invocations of "make"), then
the "dist-hook-git" target might falsely report that the distribution is
missing files.
Reported-by: John Darrington <john@darrington.wattle.id.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alin Serdean [Thu, 19 Dec 2013 18:23:12 +0000 (18:23 +0000)]
Add common definitions for Windows builds.
Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Wed, 25 Dec 2013 00:50:53 +0000 (16:50 -0800)]
bfd: Notify connectivity_seq on rmt_state changes.
The bfd module did not previously change the global connectivity_seq
when the remote state changed, which means that such state changes may
not be propagated to the database. This is particularly bad if this is
the last state transition to happen in an otherwise stable environment.
This patch checks for transitions in remote state, and ensures that the
main thread will update the database when these happen.
Bug #22136.
Co-authored-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Tue, 24 Dec 2013 01:43:48 +0000 (17:43 -0800)]
ofproto-dpif: Verbosity option for dpif/dump-flows command.
The display of port names instead of port number for in_port
is considered useful. Enabling the verbosity option also lets
you see all the wildcarded fields and can be helpful.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Daisuke Kotani [Mon, 23 Dec 2013 09:19:48 +0000 (18:19 +0900)]
ofp-parse: Check port number only after parsing it in parse_output().
This patch allows to set max_len to UINT16_MAX in parse_output
if output port is OFPP_CONTROLLER.
Signed-off-by: Daisuke Kotani <kotani@net.ist.i.kyoto-u.ac.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 24 Dec 2013 17:18:42 +0000 (09:18 -0800)]
stdio: New module, initially to provide working [v]snprintf() on Windows.
This should transparently define snprintf() and vsnprintf() wrappers for
use on Windows.
CC: Saurabh Shah <ssaurabh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 23 Dec 2013 12:54:59 +0000 (21:54 +0900)]
ofproto: Make check_table_id generic
Update check_table_id() so that rather than returning a flow_mod specific
error it simply returns true of false. And update callers accordingly.
This is in preparation for using check_table_id() in conjunction
with table_mod.
Also update check_table_id to use OFPTT_ALL.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Tue, 24 Dec 2013 01:39:58 +0000 (10:39 +0900)]
INSTALL.NetBSD: Some installation/setup notes for NetBSD
Mainly for ovs developers who kindly want to test on NetBSD
but not familiar with it.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Tue, 24 Dec 2013 01:04:08 +0000 (10:04 +0900)]
ofproto: Avoid leaving a broken def
On errors, don't leave a broken ipfix-entries.def, which might cause
mysterious errors later.
(Probably the most common cause is the lack of python xml libraries.)
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Tue, 24 Dec 2013 00:17:50 +0000 (16:17 -0800)]
Prepare for post-2.1.0 (2.1.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Tue, 24 Dec 2013 00:15:46 +0000 (16:15 -0800)]
Prepare for 2.1.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Mon, 23 Dec 2013 03:43:58 +0000 (19:43 -0800)]
datapath: compat: Configure check GRE DEMUX.
RHEL6-openstack kernel has backported gre DEMUX module,
Therefore add configure check to detect it.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #21936
Pravin B Shelar [Fri, 20 Dec 2013 23:34:40 +0000 (15:34 -0800)]
datapath: compat: Add configure check for lockdep_rtnl_is_held()
RHEL6-openstack kernel has backported lockdep_rtnl_is_held().
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Fri, 20 Dec 2013 22:30:28 +0000 (14:30 -0800)]
datapath: compat: Fix skb_has_frag_list definition.
RHEL6-openstack kernel has already replaced skb_has_frags
with skb_has_frag_list().
Fix compilation error on RHEL6-openstack.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Mon, 23 Dec 2013 20:56:14 +0000 (12:56 -0800)]
bitmap: add bitmap_count1 function
Signed-off-by: Alexander Wu <alexander.wu@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Thu, 12 Dec 2013 03:04:10 +0000 (19:04 -0800)]
ovs-dev.py: Pass leak-check=full to valgrind.
This valgrind leak checker isn't really useful without this.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
Joe Stringer [Fri, 20 Dec 2013 20:52:52 +0000 (12:52 -0800)]
compiler.h: Update documentation
OVS_LOCKS_EXCLUDED doesn't exist. This should be OVS_EXCLUDED.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 23 Dec 2013 18:41:14 +0000 (10:41 -0800)]
NEWS: Mention new ovs-ofctl ofp-parse-pcap command.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 22 Nov 2013 21:17:23 +0000 (13:17 -0800)]
ovs-ofctl: New command "ofp-parse-pcap" to dump OpenFlow from PCAP files.
Based on the number of people who ask about Wireshark support for OpenFlow,
this is likely to be widely useful.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 22 Nov 2013 19:42:06 +0000 (11:42 -0800)]
pcap-file: Add timestamp support for reading and writing pcap files.
Only the write support is initially useful, but an upcoming commit will add
a user for the read support.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 22 Nov 2013 19:42:42 +0000 (11:42 -0800)]
ofpbuf: New function ofpbuf_shift().
An upcoming commit will add the first user.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Chris Luke [Sun, 22 Dec 2013 22:43:33 +0000 (14:43 -0800)]
datapath: bug.h missing from distfiles
commit
7c359202 introduced datapath/linux/compat/include/bug.h
but did not include it in datapath/linux/Modules.mk, which results
in the following build error:
> The distribution is missing the following files:
> datapath/linux/compat/include/linux/bug.h
Signed-off-by: Chris Luke <chris_luke@cable.comcast.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Andy Zhou [Sat, 21 Dec 2013 00:18:58 +0000 (16:18 -0800)]
datapath: Fix sparse warning on BUILD_BUG_ON_INVALID()
Sparse gives the following warnings when compile against Linux kernel
3.5:
CHECK /root/projs/ovs/openvswitch/datapath/linux/skbuff-openvswitch.c
include/linux/mm.h:405:9: error: undefined identifier
'BUILD_BUG_ON_INVALID'
include/linux/mm.h:405:9: error: not a function <noident>
The same issue may also exist in kernel 3.6.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Alex Wang [Fri, 20 Dec 2013 22:53:52 +0000 (14:53 -0800)]
bfd: Send FINAL immediately after receiving POLL.
Commit
307464a11 (ofproto-dpif-monitor: Use heap to order the mport
wakeup time.) makes bfd only send packet at specified periodic instant.
This fails to meet the RFC5880 requirement, which requires bfd send
FINAL immediately after receiving POLL.
This commit fixes the above issue by scheduling bfd to send FINAL
within 100 ms after receiving POLL.
Signed-off-by: Alex Wang <alexw@nicira.com>
Jesse Gross [Tue, 17 Dec 2013 18:22:40 +0000 (10:22 -0800)]
datapath: Check for backported netdev_features_t.
This is apparently used by CentOS 6.5.
Reported-by: Phil Daws <uxbod@splatnix.net>
Reported-by: Edouard Bourguignon <madko@linuxed.net>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Thomas Graf [Thu, 19 Dec 2013 15:20:42 +0000 (16:20 +0100)]
linux: Report supported user features to the kernel
Following commit (''netlink: Do not enforce alignment of last Netlink
attribute''), signal the ability to receive unaligned Netlink messages
to the datapath to enable utilization of zerocopy optimizations.
Opening a datapath is now done by issueing a OVS_DP_CMD_SET in order
to overwrite previously set user features.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Gurucharan Shetty [Fri, 20 Dec 2013 17:30:21 +0000 (09:30 -0800)]
ovs-check-dead-ifs: Flush buffer before calling execvp.
According to Python documentation here for execvp:
http://docs.python.org/2/library/os.html
"The current process is replaced immediately. Open file objects
and descriptors are not flushed, so if there may be data buffered
on these open files, you should flush them using sys.stdout.flush()
or os.fsync() before calling an exec* function.
Without the flush, we will miss the print statements before that
if we redirect the o/p to a file.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 20 Dec 2013 16:39:27 +0000 (08:39 -0800)]
ofp-print: Print durations with at least three decimals.
Occasionally I run a command like this:
watch -n.1 ovs-ofctl dump-flows br0
to see how flows change over time. Until now, it has been more difficult
than necessary to spot real changes, because flows "jump around" as the
number of decimals printed for duration changes from moment to moment.
That is, you might see
cookie=0x0, duration=4.566s, table=0, n_packets=0, ...
one moment, and then
cookie=0x0, duration=4.8s, table=0, n_packets=0, ...
the next moment. Shortening 4.8 to 4.800 shifts everything following it
two places to the left, creating a visual jump.
This commit avoids that problem by always printing at least three decimals
if we print any. There can still be an occasional jump if a duration is
exactly on a second boundary, but that only happens 1/1000 of the time.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Jarno Rajahalme [Fri, 20 Dec 2013 16:16:31 +0000 (08:16 -0800)]
lib/flow: Skip minimask value checks.
We allow zero 'values' in a miniflow for it to have the same map
as the corresponding minimask. Minimasks themselves never have
zero data values, though. Document this and optimize the code
accordingly.
v2:
- Made miniflow_get_map_in_range() to return data offset instead of
a pointer via the last parameter.
- Simplified minimatch_hash_in_range() by removing pointer arithmetic.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:06 +0000 (19:31 +0900)]
tests/learn.at: Workaround a race
This test seems to assume that the switch completes
processing of the first packet before start processing
the second one. I don't see any code ensuring that.
Workaround the problem by giving 1 second for the upcall.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:05 +0000 (19:31 +0900)]
timeval: Workaround for threaded test failures
BFD tests have the code like the following.
# wait for a while to stablize everything.
for i in `seq 0 9`; do ovs-appctl time/warp 500; done
They no longer work as intended because BFD code is run in a
separate monitor thread these days. The loop merely "warp"
the time by 5000. The monitor thread should have been woken
at least once, but it's far from "wait for a while to stablize
everything."
This commit mitigates the problem by sleeping a little in the
appctl handler. This is not ideal but makes BFD tests success
on my environment.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:04 +0000 (19:31 +0900)]
tests/ofproto-dpif.at: Workaround a race
This test seems to assume only the first packets in flows
counted as 'miss'. I don't see any code ensuring that.
The test would fail if the upcall handler for the flow doesn't
run fast enough. Workaround the problem by giving 1 second
for the miss upcall.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:03 +0000 (19:31 +0900)]
ofproto-dpif-upcall: Reduce log level of "Spent unreasonably long" msg
This message can be caused by a time warp and make tests fail.
The message was introduced by commit
e79a6c83.
("ofproto: Handle flow installation and eviction in upcall.")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:02 +0000 (19:31 +0900)]
tests/ofproto.at: Avoid stdout/stderr ordering assumptions
Stop assuming the order of outputs from separate streams.
(stdout and stderr)
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:01 +0000 (19:31 +0900)]
tests/ofproto-dpif.at: Portability improvement
The output of "wc -l" have leading spaces on some platforms.
(NetBSD, OSX, ...)
This fixes a test failure introduced by commit
e79a6c83.
("ofproto: Handle flow installation and eviction in upcall.")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Fri, 20 Dec 2013 10:31:00 +0000 (19:31 +0900)]
tests/daemon-py.at: Skip if no python
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Lorand Jakab [Fri, 20 Dec 2013 10:46:53 +0000 (12:46 +0200)]
.gitignore: add /libtool
The ./configure script now generates a 'libtool' file in the top-level
directory. Add it to .gitignore
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Tue, 24 Sep 2013 20:39:56 +0000 (13:39 -0700)]
ofproto: Handle flow installation and eviction in upcall.
This patch moves flow installation and eviction from ofproto-dpif and
the main thread, into ofproto-dpif-upcall. This performs
significantly better (approximately 2x TCP_CRR improvement), and
allows ovs-vswitchd to maintain significantly larger datapath flow
tables. On top of that, it significantly simplifies the code,
retiring "struct facet" and friends.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Wed, 20 Nov 2013 22:25:43 +0000 (14:25 -0800)]
unixctl: Make dpif/dump-flows fetch kernel flows.
Previously we used facets for ovs-appctl dpif/dump-flows commands.
This switches to fetching flows directly from the dpif. This is
necessary because future patches remove facets and subfacet entirely.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Wed, 18 Dec 2013 18:57:33 +0000 (10:57 -0800)]
datapath: Fix build failure on RHEL 6.4
Patch fixes following build failure:-
make[4]: Entering directory
`/usr/src/kernels/2.6.32-358.18.1.el6.x86_64'
CC [M] openvswitch/datapath/linux/actions.o
In file included from
openvswitch/datapath/linux/actions.c:21:
openvswitch/datapath/linux/compat/include/linux/skbuff.h:273:
error: redefinition of ‘__skb_fill_page_desc’
include/linux/skbuff.h:1123: note: previous definition of
‘__skb_fill_page_desc’ was here
-----
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Alin Serdean [Thu, 19 Dec 2013 17:20:17 +0000 (09:20 -0800)]
entropy: Add Windows support.
Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Thu, 19 Dec 2013 05:35:09 +0000 (21:35 -0800)]
xenserver: Fix build failures because of libraries in /usr/lib.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Tue, 17 Dec 2013 23:43:30 +0000 (15:43 -0800)]
datapath: Fix deadlock during stats update.
Stats-read needs to lock stats but same lock is taken in stats
update in irq context. Therefore it needs to disable irq to
avoid following deadlock :-
BUG: soft lockup - CPU#1 stuck for 23s! [ovs-vswitchd:1425]
CPU 1
Pid: 1425, comm: ovs-vswitchd Tainted: G O 3.2.39-server-nn23 #1 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
RIP: 0010:[<
ffffffff8103db22>] [<
ffffffff8103db22>] __ticket_spin_lock+0x22/0x30
RSP: 0018:
ffff88003fd03b30 EFLAGS:
00000297
RAX:
0000000000000001 RBX:
0000000000000000 RCX:
0000000000000050
RDX:
0000000000000002 RSI:
ffff88003d0a9900 RDI:
ffff88003ae19598
RBP:
ffff88003fd03b30 R08:
0000000000000000 R09:
ffff88003ad44048
R10:
0000000000000001 R11:
0000000000000001 R12:
ffff88003fd03aa8
R13:
ffffffff8164e5de R14:
ffff88003fd03b30 R15:
ffff88003ae19580
FS:
00007ffb0b428940(0000) GS:
ffff88003fd00000(0000) knlGS:
0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
CR2:
00007f3c0ef94000 CR3:
00000000250e2000 CR4:
00000000000006e0
DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
Process ovs-vswitchd (pid: 1425, threadinfo
ffff88002514a000, task
ffff8800250aae00)
Stack:
ffff88003fd03b40 ffffffff8164596e ffff88003fd03b70 ffffffffa027622d
ffff88003d0a9900 ffffe8ffffd03800 ffff8800297f5a80 ffff88003fd03ba8
ffff88003fd03c60 ffffffffa02759af ffff88003fd03de0 ffff88003fd03e4c
Call Trace:
<IRQ>
[<
ffffffff8164596e>] _raw_spin_lock+0xe/0x20
[<
ffffffffa027622d>] ovs_flow_stats_update+0x5d/0x100 [openvswitch]
[<
ffffffffa02759af>] ovs_dp_process_received_packet+0x8f/0x130 [openvswitch]
[<
ffffffffa027c0ca>] ovs_vport_receive+0x2a/0x30 [openvswitch]
[<
ffffffffa027db18>] netdev_frame_hook+0xb8/0x120 [openvswitch]
[<
ffffffffa027da60>] ? free_port_rcu+0x30/0x30 [openvswitch]
[<
ffffffff81539318>] __netif_receive_skb+0x1c8/0x620
[<
ffffffff8153a4c0>] netif_receive_skb+0x80/0x90
[<
ffffffff8115f14c>] ? ksize+0x1c/0xc0
[<
ffffffff8153a610>] napi_skb_finish+0x50/0x70
[<
ffffffff8153ac15>] napi_gro_receive+0xf5/0x140
[<
ffffffffa00368ae>] vmxnet3_rq_rx_complete+0x51e/0x7c0 [vmxnet3]
[<
ffffffff8101ac90>] ? nommu_map_sg+0xe0/0xe0
[<
ffffffffa0036da5>] vmxnet3_poll_rx_only+0x45/0xc0 [vmxnet3]
[<
ffffffff8153ae64>] net_rx_action+0x134/0x290
[<
ffffffff8103db0d>] ? __ticket_spin_lock+0xd/0x30
[<
ffffffff8106e1a8>] __do_softirq+0xa8/0x210
[<
ffffffff8164596e>] ? _raw_spin_lock+0xe/0x20
[<
ffffffff8164fd6c>] call_softirq+0x1c/0x30
[<
ffffffff81016215>] do_softirq+0x65/0xa0
[<
ffffffff8106e58e>] irq_exit+0x8e/0xb0
[<
ffffffff81650633>] do_IRQ+0x63/0xe0
[<
ffffffff81645e2e>] common_interrupt+0x6e/0x6e
-----------
Bug #21853
Reported-by: Pawan Shukla <shuklap@vmware.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Wed, 18 Dec 2013 17:20:49 +0000 (09:20 -0800)]
ofproto-dpif: Get rid of mirror_mask_ffs() function.
There's no need for it because we have the equivalent (actually more
convenient) function raw_ctz(), which works with any integer type.
Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Alin Serdean <aserdean@cloudbasesolutions.com>
CC: Gurucharan Shetty <shettyg@nicira.com>
Gurucharan Shetty [Wed, 18 Dec 2013 17:05:40 +0000 (09:05 -0800)]
rhel: Fix build failures because of libraries in /usr/lib.
Reported-by: Igor Sever <igor@xorops.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 18 Dec 2013 21:47:16 +0000 (13:47 -0800)]
ofp-tcpdump: Fix tcpdump patch breakage due to libtool.
The recently introduced use of libtool, in commit
38b7a52b618b98
(openvswitch: Use libtool and allow building shared libs) broke the
tcpdump patch. This fixes the problem.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
YAMAMOTO Takashi [Wed, 18 Dec 2013 08:21:23 +0000 (17:21 +0900)]
AUTHORS: update my entry
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Wed, 18 Dec 2013 08:16:15 +0000 (17:16 +0900)]
netdev-bsd: remove an unused variable
this is a leftover of commit
da4a6191.
("netdev: Globally track port status changes")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 18 Dec 2013 05:44:25 +0000 (21:44 -0800)]
INSTALL: Mention --enable-Werror.
I think that some developers haven't noticed this, but it's useful, so
mention it.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Simon Horman [Mon, 16 Dec 2013 08:53:22 +0000 (17:53 +0900)]
ofproto: Add table config to struct ofproto
Add table config to to struct ofproto and set it
when a table mod message is received.
This is in preparation for changing the behaviour of the switch
based on table config.
Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Wed, 27 Nov 2013 05:08:41 +0000 (14:08 +0900)]
dpif-netdev: Remove unnecessary parameters from dp_netdev_port_input()
The skb_priority, pkt_mark and tunl parameters of dp_netdev_port_input()
are always passed as 0, 0 and NULL respectively. So rather than
passing these values to dp_netdev_port_input() just use them directly.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Helmut Schaa [Fri, 13 Dec 2013 17:54:28 +0000 (18:54 +0100)]
openvswitch: Use libtool and allow building shared libs
Currently openvswitch builds all libraries static only. However,
libopenvswitch is linked into nearly all openvswitch executables
making it hardly possible to run openvswitch on embedded devices
(for example running OpenWrt).
Convert openvswitch to use libtool for building its internal libs.
This allows "--enable-shared" and "--enable-static" as configure
arguments. Default is "--disable-shared" thus keeping the current
behavior with the only change that static libs are installed by
"make install".
Since the openvswitch library interfaces are internal and thus not
stable (yet) encode the openvswitch version into the library name:
libopenvswitch-2.0.90.so
Binary size is reduced to around 1/3 when using shared libs.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Mon, 16 Dec 2013 18:08:08 +0000 (10:08 -0800)]
cfm: Add test for fault_override
This patch adds tests for the cfm fault_override feature which can be
set through "ovs-appctl cfm/set-fault <port> <value>". It brings up two
ports with CFM, sets a fault, then checks that the fault status has
propagated correctly to the CFM module and the database. Finally, it
sets the fault override behaviour to normal and checks that the fault
has gone away.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Tue, 17 Dec 2013 23:54:30 +0000 (15:54 -0800)]
Do not free uninitialized packets.
Commit da546e0 (dpif: Allow execute to modify the packet.) uninitializes
the "dpif_upcall.packet" of "struct upcall" when dpif_recv() returns error.
The packet ofpbuf is likely uninitialized in this case, hence calling
ofpbuf_uninit() on it will likely cause a SEGFAULT.
This commit fixes this bug by only uninitializing packet's ofpbuf on
successfully received upcalls.
A note warning about this is added on the comment of dpif_recv() in
dpif.c and dpif-provider.h.
Reported-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Tue, 17 Dec 2013 23:54:30 +0000 (15:54 -0800)]
Remove unnecessary memset().
We already set all the fields of the upcall, so memsetting right before
is unnecessary.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Fri, 13 Dec 2013 19:29:09 +0000 (11:29 -0800)]
ofproto-dpif-monitor: Acquire write lock in monitor_run().
Commit
307464a1 (ofproto-dpif-monitor: Use heap to order the mport
wakeup time.) re-heapifies the heap in monitor_run(). So the
monitor_run() should be protected by the write lock, rather than
the read lock.
This commit fixes the issue.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Tue, 17 Dec 2013 22:37:10 +0000 (14:37 -0800)]
dpif-linux: Do not call nl_sock_pid() on NULL sock pointer.
This commit adds check of sock pointer in dpif_linux_port_get_pid().
If the pointer is NULL, do not call nl_sock_pid().
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Tue, 17 Dec 2013 22:37:09 +0000 (14:37 -0800)]
dpif-linux: Fix the return type of dpif_linux_port_dump_next__().
Commit 222837 (dpif-linux: Factor out port dumping helper functions.)
introduced a bug by making dpif_linux_port_dump_next__() return 'bool'
instead of 'int' as defined in dpif-provider.h. This bug causes ovs-
vswitchd failure with SEGFAULT when processing slow-path packet.
This commit fixes the bug by following the dpif-provider specification.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 17 Dec 2013 23:07:12 +0000 (15:07 -0800)]
Remove stream, vconn, and rconn functions to get local/remote IPs/ports.
These functions don't have any ultimate users. The in-band control code
used to use them, but not anymore, so we might as well delete them all.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Stephen Hemminger [Tue, 17 Dec 2013 22:57:46 +0000 (14:57 -0800)]
datapath: make functions local
Several functions and datastructures could be local
Found with 'make namespacecheck'
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Joe Stringer [Fri, 6 Dec 2013 20:22:07 +0000 (12:22 -0800)]
bfd: Set next_tx correctly when processing packets
In the case where we have not yet sent a control packet for a bfd
connection, and we receive a control packet from the remote host,
bfd->next_tx is updated to an unusual value. This causes the logging to
incorrectly report that there has been long delays (in the order of
weeks) since the last bfd transmission time.
This patch only modifies bfd->next_tx in this case if we are not
expecting to immediately send a control packet. This should mean that
bfd->next_tx is either 0 (immediate tx) or in the order of time_msec().
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>