netdev-bsd: Update for recent ofpbuf api changes

Leftovers from commit commit 1f317cb5.
("ofpbuf: Introduce access api for base, data and size.")

This fixes regressons introduced by commit 3f976e12.
("lib/ofpbuf: Rename private fields to discourage direct use.")

Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
learn.at: Fix a shell syntax

Fix a botch in commit 7f12bdcc.
("learn.at: Fix a race in "self-modifying flow with idle_timeout" test")

Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
ofproto-dpif.at: Update MPLS test names.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
vlandev: Fix an obvious predicate logic crash bug.

Signed-off-by: ZhengLingyun <konghuarukhr@163.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
SubmittingPatches: Rename to CONTRIBUTING.

This makes the GitHub interface aware of the contribution guidelines,
so it will be displayed to contributors when they submit issues or pull
requests.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Skip queue limit tests if the queues are very large.

This should prevent timing out.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
netflow: Correctly track flow creation time.

'created' is supposed to be the time the flow was created, but it was
getting reset to zero on every expiration, causing the flow start time to
be wonky after the first active expiration on a flow.

Reported-by: Lior Neudorfer <lior@guardicore.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS: Add Lior Neudorfer <lior@guardicore.com>.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev: Add 'change_seq' back to netdev.

This commit can be seen as a partial revert of commit
da4a619179d (netdev: Globally track port status changes)
by adding the 'change_seq' to 'struct netdev'.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
netdev-dpdk: Indicate the change of etheraddr and mtu.

This commit makes the netdev-dpdk module signal the change of
etheraddr and mtu by changing the global sequence number and
incrementing its 'change_seq'.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto: Use netdev's 'change_seq' to reduce port modification check.

This commit uses the 'change_seq' in 'struct netdev' to determine
whether to update the 'ofport'.  This helps eliminate unnecessary
update.

In the experiment of configuring 5K internal port, there is neither
observable configuration overhead nor additional cpu consumption
after configuration finishes.  When one internal port state is
flapped every 0.3 second, this commit reduces the cpu utilization
of ovs-vswitchd thread from 40 to 12.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
openflow-1.1.h: improve struct ofp11_group_stats definition

Uncomment bucket_stats definition in struct ofp11_group_stats
to better match OpenFlow spec 1.1's definition on page 48.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
openflow-1.3.h: improve struct ofp13_group_stats definition

Uncomment bucket_stats definition in struct ofp13_group_stats
to better match OpenFlow spec 1.3.3's definition on page 91.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofp-util.c: Simplify ofputil_group_stats_to_* functions.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
debian: Better document how to get a kernel module in README.Debian.

This moves existing text from INSTALL.Debian into the README.Debian
installed as part of the openvswitch-switch package, and adds a reference
from the former to the latter.

Reported-by: Brian Candler <b.candler@pobox.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
Clarify tunnel wildcarding.

It would seem we should set the 'tunnel.ip_dst' in 'wc' when calling
tnl_port_should_receive(), as it is reading that flow field.  However,
since tunnels' datapath port numbers are different from the non-tunnel
ports, and we always unwildcard the 'in_port', we do not need to
unwildcard the 'tunnel.ip_dst' for non-tunneled packets.

Also, 'nw_tos' need not be unwildcarded if it is not examined.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Makefile.am: Fix build hang when .git and Git are present but don't work.

If the .git directory is there, and "git --version" works, but "git
ls-files" fails to print any file names (e.g. perhaps because .git is a
symlink to an inaccessible directory) then the "grep" command in the
thread-safety-check rule would hang forever because it had an empty list
of files and therefore expected to read from stdin.  This fixes the problem
by adding the name of an empty file to the command, which is harmless.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
ofproto-macros.at: Assert daemon commands creates pidfile before exiting

I observed that "ofproto-dpif - ofproto-dpif-monitor 2" test,
which merely accesses ovsdb, failed in OVS_VSWITCHD_STOP's
"ovs-appctl -t ovs-vswitchd exit".  This commit tries to catch
the problem earlier by sprinkling AT_CHECKs.
ofproto-dpif.at: Fix some races

These races were exposed on my environment by commit c2a77f33.
("tests/ofproto-dpif: Use vlog to test dpif behaviour.")
ofproto-dpif.at: Use OVS_APP_EXIT_AND_WAIT where appropriate

Leftover of commit 0c473314.
("ofproto-dpif.at: Wait for the monitor's pidfile disappears where necessary")