vxlan: Correct comments and NEWS to reflect IANA port assigment.

Signed-off-by: Jesse Gross <jesse@nicira.com>
dpif-netdev: Update max_mtu correctly.

What a dumb bug.

Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: Use generic struct pcpu_tstats.

Rather than defining ovs specific stats struct (vport_percpu_stats),
we can use existing pcpu_tstats to achieve exactly same functionality.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Prepare for 1.11.0

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Prepare for post-1.11.0 (1.11.90).

Signed-off-by: Justin Pettit <jpettit@nicira.com>
timeval: Remove prototype for unimplemented function.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netlink-socket: Minor style fix.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netlink-socket: Use xmalloc() instead of malloc().

This was the only obvious use of bare malloc() in the tree, other
than in the implementation of wrapper functions.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vswitchd: Disable system stats collection on a concurrently running daemon.

There are very rare cases (ex: ovs-vswitchd.pid is inadvertantly deleted),
when multiple ovs-vswitchd daemons can end up running at the same time.
In a situation like that one of the daemons can wait on the poll()
with a 0 ms wait time as it would be expecting system stats to be collected.

But system stats are never run for the daemon that does not have the
lock on the database and hence it takes up 100% of the CPU if its state
machine for stats collection previously was S_WAITING.

With this patch, we disable the system stats collection for the daemon that
does not have the database lock. When it eventually gets the lock on the
database, system stats are automatically enabled if other_config:\
enable-statistics=true.

Bug #16669.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
worker: Prevent worker from being responsible for pidfile deletion.

Currently we are creating the worker process after creation of the pidfile.
This means that the responsibility of deleting the pidfile after process
termination rests with the worker process.

When we restart openvswitch using the startup scripts, we SIGTERM the main
process and once it is cleaned up, we start ovs-vswitchd again. This results
in a race condition. The new ovs-vswitchd will create a pidfile because it is
unlocked. But, if the old worker process exits after the start of new
ovs-vswitchd, it will simply delete the pidfile underneath the new ovs-vswitchd.
This will eventually result in multiple ovs-vswitchd daemons.

This patch gives the responsibility of deleting the pidfile to the main
process.

Bug #16669.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
datapath: Remove unneeded ovs_netdev_get_ifindex()

The only user is get_dpifindex(), no need to redirect via the port
operations.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
ofproto-dpif: Fix 'size' argument to fix_sflow_action().

The sflow action only uses 8 bytes of the total 16 for user_action_cookie,
but fix_sflow_action() was checking for the presence of all 16, so if the
sflow action wasn't followed by a few other actions then 'cookie' would
end up NULL and the assertion would segfault.

Bug #16659.
Reported-by: Dhaval Badiani <dbadiani@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Add ipfix-entities.def to gitignore.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
dpif-netdev: Shorten delay loops.

Um, I mean, remove useless code.

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