2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 12:58:00 +00:00

663 Commits

Author SHA1 Message Date
Thomas Graf
bbe6109de7 vswitchd: Add error column to Interface table to store error condition
Store the error condition of a failed port configuration in a new
column 'error' in the Interface table.

Example:
$ ovs-vsctl add-port br0 test -- \
     set Interface test type=vxlan options:unknown=1
ovs-vsctl: Error detected while setting up 'test'.  [...]

$ ovs-vsctl list Interface test | grep error
error         : "test: could not set configuration (Invalid argument)"

Fixing the error will clear the error column:
$ ovs-vsctl set Interface test options:remote_ip=1.1.1.1
$ ovs-vsctl list Interface test | grep error
error         : []
$

For now, the high level error messages when opening and configuring
the netdev are used. Further patches can extend passing the error
pointer into the individual netdev implementations to allow for more
fine grained error messages to be stored.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-19 15:42:30 -07:00
Jarno Rajahalme
f017d9868e Use prefix trie lookup for IPv4 by default.
Unless otherwise configured, the prefix trie lookup is enabled for
IPv4 destination and source address fields.  A new keyword "none" is
accepted as the value of "prefixes" in the OVSDB Flow_Table column.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2014-05-16 12:51:11 -07:00
Ryan Wilson
fe83f81df9 netdev: Remove netdev from global shash when the user is changing interface configuration.
When the user changes port type (i.e. changing p0 from type 'internal' to
'gre'), the netdev must first be deleted, then re-created with the new type.
Deleting the netdev requires there exist no more references to the netdev.
However, the xlate cache holds references to netdevs and the cache is only
invalidated by revalidator threads. Thus, if cache is not invalidated prior to
the netdev being re-created, the netdev will not be able to be re-created and
the configuration change will fail.

This patch always removes the netdev from the global netdev shash when the
user changes port type. This ensures that the new netdev can always be created
while handler and revalidator threads can retain references to the old netdev
until they are finished.

Signed-off-by: Ryan Wilson <wryan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-16 11:35:38 -07:00
Ben Pfaff
aa233d5772 Remove --enable-of14 option because the implementation is now safe.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-14 10:31:43 -07:00
YAMAMOTO Takashi
8c1c334250 bridge: Fix a NULL dereference
Introduced by commit 12eb035b.
("bridge: Allow users to configure statistics update to OVSDB.")

Cc: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-05-05 08:37:31 +09:00
Alex Wang
12eb035b81 bridge: Allow users to configure statistics update to OVSDB.
This commit adds a new configuration "stats-update-interval" in
"other_config" of Open_Vswitch table.  So users can control the
statistics update frequency.  A possible use case is that, users
can lower the update frequency to reduce the cpu consumption of
the ovs-vswitchd thread.

The configured value should always be greater than or equal to
5000 ms.  And more frequent statistics update should be achieved
via OpenFlow.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-05-02 13:29:40 -07:00
Joe Stringer
6e9231f70f bridge: Remove traces of flow-eviction-threshold.
This configuration option was shifted in 2.0, then removed in 2.1.
Remove the misleading log message.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2014-05-01 10:01:58 +12:00
Alex Wang
6a5f9a8fbd bridge: Refactor the 'Instant' stats logic.
This commit refactors the 'Instant' stats related logic in bridge.c
by moving it into bridge_run().

This change brings the following effects:

1. bridge.c will wait on the global connectivity sequence number when
   there is no pending instant stats transaction.  and the main thread
   will no longer be waken up every 100 ms for 'Instant' stats check.
   the related overhead is eliminated.

2. the netdev's sequence number is used to avoid updating unchanged netdev
   status.  so, the update is more efficient.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-04-27 21:21:51 -07:00
Alex Wang
88bf179aa3 bfd/cfm: Check status change before update status to database.
This commit adds boolean flag in bfd/cfm module for checking
status change.  If there is no status change, the current
update to OVS database will skip the bfd/cfm session.

In the experiment with 5K bfd sessions, when one session is
flapping at rate of every 0.3 second, this patch reduces the
cpu utilization of the ovs-vswitchd thread from 13 to 6.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2014-04-24 15:30:55 -07:00
Ben Pfaff
96be8de595 bridge: When ports disappear from a datapath, add them back.
Before commit 2a73b1d73d4bdb (bridge: Reconfigure in single pass.), if a
port disappeared, for one reason or another, from a datapath, the next
bridge reconfiguration pass would notice and, if the port was still
configured in the database, add the port back to the datapath.  That
commit, however, removed the logic from bridge_refresh_ofp_port() that
did that and failed to add the same logic to the replacement function
bridge_delete_or_reconfigure_ports().  This commit fixes the problem.

To see this problem on a Linux kernel system:

ovs-vsctl add-br br0                             # 1
tunctl -t tap                                    # 2
ovs-vsctl add-port br0 tap                       # 3
ovs-dpctl show                                   # 4
tunctl -d tap                                    # 5
ovs-dpctl show                                   # 6
tunctl -t tap                                    # 7
ovs-vsctl del-port tap -- add-port br0 tap       # 8
ovs-dpctl show                                   # 9

Steps 1-4 create a bridge and a tap and add it to the bridge and
demonstrate that the tap is part of the datapath.  Step 5 and 6 delete
the tap and demonstrate that it has therefore disappeared from the
datapath.  Step 7 recreates a tap with the same name, and step 8
forces ovs-vswitchd to reconfigure.  Step 9 shows the effect of the
fix: without the fix, the new tap is not added back to the datapath;
with this fix, it is.

Special thanks to Gurucharan Shetty <gshetty@nicira.com> for finding a
simple reproduction case and then bisecting to find the commit that
introduced the problem.

Bug #1238467.
Reported-by: Ronald Lee <ronaldlee@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2014-04-23 18:33:36 -07:00
Thomas Graf
65a0903b26 bridge: improve vlan mode related error messages when adding port
Inform about fallback to trunk mode and convert errors to warnings
when we are not failing.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-04-09 09:57:42 -07:00
Flavio Leitner
1839c35676 bridge: don't bring up internal ports by default.
It should be an administrator task to bring up devices as they
are configured properly.

Currently, Fedora is deleting the bridges when the interface is
brought down. Therefore, there is no bridge on the next boot and
the initscripts can apply the networking configuration properly
for a new bridge.

However, if the system didn't execute ifdown for some reason, the
bridge is left in the ovsdb and since internal ports are brought
up by default, there is no way for initscripts to known if the
adminitrator has already configured it or not.

This patch reverts commit bef071a5fdf8e2dd87677b04b3cf7a8f5094edcb
(bridge: Always "up" internal devices.).

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-04-03 13:42:58 -07:00
Pravin Shelar
1f317cb5c2 ofpbuf: Introduce access api for base, data and size.
These functions will be used by later patches.  Following patch
does not change functionality.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2014-03-30 06:18:43 -07:00
Ben Pfaff
b71273f60d bitmap: Make bitmap_scan() able to scan for 0-bits or 1-bits.
An upcoming commit will make use of this feature.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-03-23 23:00:22 -07:00
Ben Pfaff
ecb229bebb Disable OF1.4 in ovs-vswitchd and ovs-ofctl without specially enabling.
When the OF1.4 is made safe, so that receiving an unimplemented message
cannot crash the switch, this commit should be reverted.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-03-23 14:47:47 -07:00
Joe Stringer
72310b041c upcall: Configure datapath max-idle through ovs-vsctl.
This patch adds a new configuration option, "max-idle" to the
Open_vSwitch "other-config" column. This sets how long datapath flows
are cached in the datapath before revalidators expire them.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2014-03-07 18:33:21 -08:00
Helmut Schaa
21a955fc29 vswitchd: Limit fake bridge MAC selection to ports in the same VLAN
Limit fake bridge MAC address selection to only consider ports
that use the same VLAN as the fake bridge itself.

This prevents OVS from selecting a MAC address that was not really
present in the VLAN of the fake bridge before.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-02-26 12:52:54 -08:00
Helmut Schaa
4bc1cfdead vswitchd: Split pick_local_hw_addr
This allows to reuse find_local_hw_addr for fake bridges.
Preparation for upcoming MAC address inheritance for fake bridges.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-02-26 12:52:53 -08:00
Gurucharan Shetty
1bbd172824 Replace inet_aton() with inet_pton().
Windows does not have inet_aton(), but does have a inet_pton().
inet_aton() is not defined in POSIX. But inet_pton() is.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-02-21 14:44:31 -08:00
Joe Stringer
2784a40b81 ofproto: Remove 'force-miss-model' configuration.
This configuration item was introduced to assist testing of upcall
handling behaviour with and without facets. Facets were removed in
commit e79a6c833e0d7237, so this patch removes the configuration item.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-02-19 13:38:27 -08:00
Arun Sharma
e731d71bf4 Add IPv6 support for OpenFlow, OVSDB, NetFlow, and sFlow.
Does not add IPv6 support for in-band control.

Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Nandan Nivgune <nandan.nivgune@calsoftinc.com>
Signed-off-by: Abhijit Bhopatkar <abhijit.bhopatkar@calsoftinc.com>
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-02-06 16:08:34 -08:00
Ben Pfaff
59804c80a9 bridge: Set ofport column in every database transaction.
Database transactions can occasionally fail due to concurrent changes in
the database.  When that happens, the next transaction should repeat the
changes that ovs-vswitchd tried to make the first time (adjusted for the
changes to the database).

The code to report the OpenFlow port number in use didn't do that.  It set
the ofport field once when it created the port and never set it again, even
if the transaction to set it failed.  This commit fixes the problem.

Bug #23047.
Reported-by: Suganya Ramachandran <suganyar@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2014-01-30 16:57:16 -08:00
Helmut Schaa
ddd43de9ba vswitchd: Inherit parents mac address for fake bridges
When adding a physical port to the main bridge the mac address
of the bridge is updated. We can do the same for fake bridges by
copying the mac address of the parent bridge.

There exists only one fake bridge per vlan, hence it is safe
to copy the mac address of the parent bridge.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-01-16 17:43:11 -08:00
YAMAMOTO Takashi
fb2ec1e9a8 bridge: Update a comment
This looks like a leftover of commit 2a73b1d73d.
("bridge: Reconfigure in single pass.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-01-15 09:59:01 -08:00
Alex Wang
ae6bde49ab 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>
2013-12-30 14:22:10 -08:00
Ethan Jackson
e79a6c833e 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>
2013-12-19 13:27:23 -08:00
Ben Pfaff
aeed787905 bridge: Let ofprotos run once before reporting configuration complete.
Occasionally in the unit tests the following race can happen:

   1. ovs-vsctl updates database
   2. ovs-vswitchd reconfigures, notifies ovs-vsctl that it is complete
   3. ovs-appctl ofproto/trace fails to see newly added port
   4. ovs-vswitchd main loop calls ofproto's ->type_run(), making the
      new port visible to translation.

This race may be seen in the failures of tests 5 and 624 here:
https://launchpadlibrarian.net/151884888/buildlog_ubuntu-precise-amd64.openvswitch_2.0~201309300804-1ppa1~precise_FAILEDTOBUILD.txt.gz

Reported-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-12-17 14:13:49 -08:00
Ben Pfaff
61c7584076 bridge: Remove superfluous "inline" from ofp12_controller_role_to_str().
Putting "static inline" on a function definition in a .c file does not help
the compiler and does suppress warnings for unused functions that one would
want, should the function ever become unused.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2013-12-16 09:21:42 -08:00
Ethan Jackson
6567010fff ofproto: Simplify thread creation API.
There's no particular reason for the function controlling the number
of threads to be bound up with dpif_recv_set().  This patch breaks
them up, but as a side effect means threads will run doing nothing
when datapath upcall receiving is disabled.  By doing this, the udpif
thread creation API becomes a bit easier to reason about once there
are multiple types of thread introduced in future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-12-13 09:35:00 -08:00
Ethan Jackson
1c030aa570 ofproto-dpif-upcall: Add memory usage stats.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-12-12 20:21:11 -08:00
Ethan Jackson
a6b7506dab ofproto: Remove run_fast() functions.
They don't really make sense in a multithreaded architecture.  Once
flow miss batches are dispatched with, they will be extra useless.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-12-12 20:21:11 -08:00
Joe Stringer
7f8f2757f3 bridge: Only store instant_stats on device changes
Previously, we iterated through all interfaces in instant_stats_run(),
grabbing up-to-date information about device and port status. After
assembling all of this information for all interfaces, we would
determine whether anything changed and only send an update to
ovsdb-server if something changed.

This patch uses the new global connectivity_seq to determine whether
there have been any changes before polling all interfaces, which reduces
unnecessary processing in the average case. In a test environment of
5000 internal ports and 50 tunnel ports with bfd, this reduces average
CPU usage of the main thread from about 15% to about 5%. When ports
change status more often than every 100ms, CPU usage is expected to
increase to previous rates.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-12-12 15:08:21 -08:00
Ben Pfaff
4abb8608af bridge: Support changing port numbers.
Feature #21293.
Requested-by: Anuprem Chalvadi <achalvadi@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-12-11 22:12:35 -08:00
Ben Pfaff
2a73b1d73d bridge: Reconfigure in single pass.
This greatly simplifies the reconfiguration code, making it much easier
to understand and modify.  The old multi-pass configuration had the
property that it didn't delay block packet processing as much, but that's
not much of a worry anymore now that latency critical activities have
been moved outside the main thread.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-12-11 22:12:34 -08:00
Ben Pfaff
4f6b993481 netdev: Log a warning when netdev_set_config() fails.
This allows its callers to avoid duplicating the code.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-12-11 11:08:33 -08:00
Jarno Rajahalme
13751fd88c Classifier: Track address prefixes.
Add a prefix tree (trie) structure for tracking the used address
space, enabling skipping classifier tables containing longer masks
than necessary for an address field value in a packet header being
classified.  This enables less unwildcarding for datapath flows in
parts of the address space without host routes.

Trie lookup is interwoven to the staged lookup, so that a trie is
searched only when the configured trie field becomes relevant
for the lookup.  The trie lookup results are retained so that each
trie is checked at most once for each classifier lookup.

This implementation tracks the number of rules at each address prefix
for the whole classifier.  More aggressive table skipping would be
possible by maintaining lists of tables that have prefixes at the
lengths encountered on tree traversal, or by maintaining separate
tries for subsets of rules separated by metadata fields.

Prefix tracking is configured via OVSDB.  A new column "prefixes" is
added to the database table "Flow_Table".  "prefixes" is a set of
string values listing the field names for which prefix lookup should
be used.

As of now, the fields for which prefix lookup can be enabled are:
- tun_id, tun_src, tun_dst
- nw_src, nw_dst (or aliases ip_src and ip_dst)
- ipv6_src, ipv6_dst

There is a maximum number of fields that can be enabled for any one
flow table.  Currently this limit is 3.

Examples:

ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- \
 --id=@N1 create Flow_Table name=table0
ovs-vsctl set Bridge br0 flow_tables:1=@N1 -- \
 --id=@N1 create Flow_Table name=table1

ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src
ovs-vsctl set Flow_Table table1 prefixes=[]

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-12-11 11:07:01 -08:00
Joe Stringer
fd28ce3ae7 bridge: Refresh STP statistics separately from status
Currently, we refresh STP status (id, state, role) alongside
statistics (rx, tx, errors), all within instant_stats_run(). This
patch splits statistics out, and refreshes them with the 5 second
stats instead. This paves the way to reducing execution of
instant_stats_run().

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-12-10 17:28:20 -08:00
Andy Zhou
9a54394ac9 ofproto: Move bond files to ofproto
Relocating bond.[ch] to allow bond.c to make ofproto calls.
This is needed for upcoming patches that enable megaflow support
for bond ports.

Signed-off-by: Andy Zhou <azhou@nicira.com>
2013-12-06 15:04:14 -08:00
Ben Pfaff
820b35a330 bridge: Improve iface_set_ofport() style.
This should behave the same as before but the code reads more naturally to
me this way.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-12-05 11:43:50 -08:00
Romain Lenglet
88afd5fcc3 ipfix: allow empty targets column in table IPFIX
The "targets" column in IPFIX had a min=1 constraints, so OVSDB
implicitly adds an empty string "" into that column if no value is
given.  No connection can be opened to a target with address "", so
the whole IPFIX exporter for that row was disabled until that ""
target was removed by users.  That behavior is correct but proved to
be unintuitive to users.

This patch removes the min=1 constraint, to avoid the trouble for
users who insert IPFIX rows with no targets: it eliminates the log
messages due to failed connections to target "", and eliminates the
need to manually remove the "" target after row insertion.

This doesn't impact the behavior for any existing row, whether it has
a "" target or not.

Signed-off-by: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-20 16:31:26 -08:00
Romain Lenglet
3388e51a73 ipfix: fix segfault for Flow_Sample_Collector_Set without ipfix
Guard any access to an IPFIX row referenced from
Flow_Sample_Collector_Set by a test that the reference is not NULL.

Signed-off-by: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-20 16:30:53 -08:00
Ben Pfaff
c2c28dfd68 Switch from sscanf() to ovs_scan() throughout the tree.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-15 08:55:02 -08:00
Ravi Kondamuru
9dd165e050 bond: Use active-backup mode on LACP failure.
Commit bdebeece5 (lacp: Require successful LACP negotiations when
configured.) makes successful LACP negotiation mandatory for the
bond to come UP. This patch provides a configuration option to
bring up the bond by falling back to active-backup mode on LACP
negotiation failure.

Several of the physical switches that support LACP block all traffic
for ports that are configured to use LACP, until LACP is negotiated
with the host. When configuring a LACP bond on a OVS host
(eg: XenServer), this means that there will be an interruption of the
network connectivity between the time the ports on the physical
switch and the bond on the OVS host are configured. The interruption
may be relatively long, if different people are responsible for
managing the switches and the OVS host.

Such network connectivity failure can be avoided if LACP can be
configured on the OVS host before configuring the physical switch,
and having the OVS host fall back to a bond mode (active-backup) till
the physical switch LACP configuration is complete. An option
"lacp-fallback-ab" is introduced with this patch to provide such
behavior on openvswitch.

Signed-off-by: Ravi Kondamuru <Ravi.Kondamuru@citrix.com>
Signed-off-by: Dominic Curran <Dominic.Curran@citrix.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-11-12 14:22:48 -08:00
alex wang
76c4290d8a cfm: Add ovsdb column "cfm_flap_count".
This commit adds a new ovsdb column "cfm_flap_count".  It counts the
number of cfm fault flaps since boot.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-11-04 14:46:28 -08:00
Justin Pettit
efc295d2e6 ovsdb: Define official port number.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-01 16:21:41 -07:00
Justin Pettit
ca843648e3 Don't differentiate between TCP and SSL ports for OpenFlow and OVSDB.
The OVS code has always made a distinction between the unencrypted (TCP)
and SSL port numbers for the OpenFlow and OVSDB protocols.  The default
port numbers for both protocols has changed, and there continues to be
no distinction between the unencrypted and SSL versions.  This
commit removes the distinction in port numbers.  A future patch will
recognize the change in default port number.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-01 16:18:45 -07:00
Alex Wang
b6843801d2 vswitchd: Clear bfd_status column when bfd is disabled or not supported
This commit makes vswitchd clear the 'bfd_status' column
in ovsdb when bfd is disabled or not supported.

Reported-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-09-12 14:10:26 -07:00
Alex Wang
70fa1ecbf4 bridge: Always call smap_destroy() after smap_init()
This commit fixes a place in bridge.c where smap_destroy() is not
always called after smap_init().  Though there is no memory leak
now, it is necessary to fix it and prevent memory leak in the
future when smap_init() may be modified to allocate dynamic memory.

Reported-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-09-12 11:54:34 -07:00
Alex Wang
31ef9f5178 timeval: Remove CACHE_TIME scheme.
This commit removes the CACHE_TIME scheme from timeval module.  This
is for eliminating the lock contention over the read/write lock of
the cached time.  To get the time, the thread now will directly do
the system call 'clock_gettime()'.

As a side effect, timer can only be warpped after timer is stopped
by 'appctl time/stop' command.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-09-04 16:57:40 -07:00
Ben Pfaff
89454bf477 netdev: Fix deadlock when netdev_dump_queues() callback calls into netdev.
We have a call chain like this:

    iface_configure_qos() calls
        netdev_dump_queues(), which calls
            netdev_linux_dump_queues(), which calls back through 'cb' to
                qos_unixctl_show_cb(), which calls
                    netdev_delete_queue(), which calls
                        netdev_linux_delete_queue().

Both netdev_dump_queues() and netdev_linux_delete_queue() take the same
mutex in the same netdev, which deadlocks.

This commit fixes the problem by getting rid of the callback.

netdev_linux_dump_queue_stats() would benefit from the same treatment but
it's less urgent because I don't see any callbacks from that function that
call back into a netdev function.

Bug #19319.
Reported-by: Scott Hendricks <shendricks@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-27 21:50:40 -07:00