2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00
Commit Graph

68 Commits

Author SHA1 Message Date
Alex Wang
2d21cf728c bfd: Fix check_tnl_key error.
This commit fixes the bug introduced by commit 26131299fa (bfd: Make the
BFD module thread safe.). The bug caused the opposite of the intended
behaviour.

Unit test is added for the 'check_tnl_key' feature.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-14 13:49:40 -07:00
Alex Wang
70e575d980 bfd: Delete trailing whitespace in 'bfd/show' output.
This commit chops off the trailing whitespace in the 'flag' field
of 'bfd/show' output.  This is for the string matching in bfd
unit test.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-13 09:54:17 -07:00
Alex Wang
344e21d47e clang: Pass objects, not their addresses, to thread-safety macros.
This commit changes the code such that arguments to thread-safety
macros are not ampersanded.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-09 13:48:11 -07:00
Alex Wang
bd3950ddfa clang: Use OVS_REQUIRES() instead of OVS_REQ_WRLOCK() for plain mutex.
This commit changes the code to use OVS_REQUIRES() instead of
OVS_REQ_WRLOCK(), for plain mutex.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-09 13:48:11 -07:00
YAMAMOTO Takashi
2fbf137dbb bfd: Fix build on netbsd-6.
ip.h requires in_systm.h here.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-07 23:31:05 -07:00
Gurucharan Shetty
de8d2ef9dd bfd: Optimize BFD for Megaflows.
The current situation is that whenever any packet enters the
userspace, bfd_should_process_flow() looks at the UDP destination
port to figure out whether that is a BFD packet. This means that
UDP destination port cannot be wildcarded for all the other flows
too.

To optimize BFD for megaflows, we introduce a new
'bfd:bfd_dst_mac' field in the database. Whenever this field is set
by a controller, it is assumed that all the BFD packets to/from
this interface will have the destination mac address set as the one
specified in the bfd:bfd_dst_mac field. If this field is set, we
first look at the destination mac address of a packet and if it
does not match the mac address set in bfd:bfd_dst_mac, we do not
process that packet as bfd. If the field does match, we go ahead
and look at the UDP destination port too.

Also, change the default BFD destination mac address to
"00:23:20:00:00:01".

Feature #18850.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-05 13:12:40 -07:00
Pavithra Ramesh
b644259ff2 BFD: Populate ToS field in BFD packets.
Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-05 13:00:06 -07:00
Ethan Jackson
26131299fa bfd: Make the BFD module thread safe.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-08-01 12:24:13 -07:00
Ethan Jackson
6a690106a4 bfd: Downgrade long delay messages to INFO level.
On my system the long delay messages can cause a transient BFD unit
test failure due to the log checking.  These messages don't *really*
need to be at WARN level, so this patch downgrades them.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-07-31 13:31:51 -07:00
Ben Pfaff
f645ee9cdd bfd: Use htonll() instead of htonl() for tunnel ID constant.
This is not a real bug, since htonl(0) and htonll(0) have the same value
although not the same type.

Found by sparse.

CC: Pavithra Ramesh <paramesh@vmware.com>
CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-07-17 10:35:55 -07:00
Pavithra Ramesh
fab52e16f7 BFD: Add check_tnl_key feature to BFD code.
This change adds the check_tnl_key functionality for BFD.
When the feature is enabled, BFD will only accept control
packets with a tunnel key of 0.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-07-15 19:22:54 -07:00
Pavithra Ramesh
91aaf1248e BFD: Add forwarding_override command for BFD.
Added appctl commands to override the bfd forwarding status. Values
of true/false/normal are allowed. When set to normal, the bfd
forwarding status is left unchanged. Else, the forwarding status is
set to the specified value - true/false.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-07-07 02:59:06 -07:00
Ethan Jackson
92cfab82fc bfd: Reference count 'struct bfd'.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-06-27 18:23:39 -07:00
Ben Pfaff
5798ed6d3e bfd: Fix typo in comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-26 15:54:19 -07:00
Justin Pettit
7431e17196 ofproto-dpif: Always un-wildcard 'dl_type'.
We always look at the fragment status and often look at other L3
headers when processing the packet, so just un-wildcard the
Ethertype.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-06-25 21:29:28 -07:00
Justin Pettit
642dc74ddb ofproto-dpif: Don't wildcard fields used in special processing.
A number of fields are looked at when determining whether special
processing (slow-path) is needed.  This commit removes wildcarding when
they were consulted.

Reported-by: Ethan Jackson <ethan@nicira.com>
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-06-17 21:57:29 -07:00
Pavithra Ramesh
8aee94b6ea BFD: Reconfigure BFD on port deletion.
Invoke the function to reconfigure BFD when a port/interface
is deleted.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-05-28 12:37:32 -07:00
Ethan Jackson
ccc096898c 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>
2013-05-07 16:31:14 -07:00