datapath: Fix ovs_vport_cmd_del return value on success

If the pointer does not represent an error then the PTR_ERR macro may still
return a nonzero value. The fix is the same as in ovs_vport_cmd_set.

Signed-off-by: Rich Lane <rlane@bigswitch.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
AUTHORS: Add Rich Lane.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Optimize classifier by maintaining the priority of the highest priority rule in each table.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: Fix ovs_vport_cmd_new return value on success

This bug was introduced in 1fc7083d (datapath: Remove vport MAC address
configuration.)

Signed-off-by: Rich Lane <rlane@bigswitch.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
tunnel: Log tunneling changes at INFO level.

These log messages occur infrequently, and are quite useful when
debugging problems after the fact.  So they should be logged at
info level which makes them more readily available.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
tunnel: Treat in_key=0 the same as a missing in_key.

The documented behavior of ovs is that a missing key is the
same as a zero key.  However, the tunneling code actually treated
them differently.  This could cause problems with tunneling modes
such as vxlan which always have a key.  Specifically, a tunnel with
no key configured, would send have to send traffic with a key of
zero.  However, the same tunnel would drop incoming traffic with a
zero key because it was expecting there to be none at all.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs-pki: Increase the validity period for all certificates.

This patch increases the certificate validity to 100 years
for certificate authorities, the certificates that they certify
and for self signed certificates.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
classifier: Maintain tables in descending priority order.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
[blp@nicira.com: this along with Jarno's previous patch to the
 classifier give me a combined 15% boost in "ovs-benchmark rate"
 with a complicated flow table involving multiple resubmits]
Signed-off-by: Ben Pfaff <blp@nicira.com>
stream-unix: Use rundir as root for relative paths.

Until now, "unix:" and "punix:" paths that are not absolute have
been considered relative to the current working directory.  It
is more useful to consider them relative to the rundir, so this
commit makes that change to the C and Python implementations of
the stream code.

This commit also relaxes the whitelist check in the bridge code
so that any name that does not contain a "/" is considered OK.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
classifier: Refactor table priority updates and tables_priority reordering.

I find this organization clearer.

CC: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Fix error path in netflow test.

Otherwise, if the test bails out before finishing, the test-netflow daemon
doesn't get killed and the test hangs.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
poll-loop: Reduce high-CPU log messages from WARN to INFO.

These can happen occasionally in normal circumstances.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
bond: Reduce log level from WARN to INFO for interface status updates.

An interface coming up or going down isn't a big deal.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
tests: Set explicit bond mode in LACP test.

This avoids a log warning:

    bridge|WARN|port bond: Using the default bond_mode active-backup.
    Note that in previous versions, the default bond_mode was balance-slb

This warning is harmless, but I'm trying to add checks for "warn" and
higher severity log messages to the tests, so it makes sense to get rid of
this one.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
timeval: Don't issue poll interval warnings when we warp time.

It's not meaningful in that case.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto-macros: Fail a test that logs a WARN or higher level message.

It is necessary to whitelist a couple of tests that appear to legitimately
have WARN messages.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
netdev-dummy: Correctly maintain port statistics.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
tests: Add test for self-modifying learn action.

CC: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
vswitchd: Require "target" column to be unique in OVS database.

Commit cc7ecee48 (vswitchd: Add unique indexes for some columns.) says,
in part:

    With this commit, the database server itself rejects attempts to add
    Port or Interface records with duplicate names or Controller or
    Manager records with duplicate targets.

but in fact didn't change the Controller table as described.  This commit
fixes that.

This commit updates the schema version number's major version, because this
is a potentially non-backward compatible change, if some user depended on
the ability to add Controller records with duplicate targets.  However, if
anyone thinks this is a bad idea, then I'm open to discussion.

Reported-by: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofp-msgs: Fix typos in comment.

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