netdev: Make naming more consistent

netdev-dummy and netdev-vport use the function name netdev_poll_notify()
for the same purpose as netdev-linux/bsd's netdev_*_changed(). This patch
changes the former two to be more consistent with the linux/bsd naming
scheme.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
cfm: Count flaps when logging is disabled

Previously, the flap count logic for CFM was dependent on the state of
the logging facility. This patch ensures flaps are always counted when
there is a transition between non-fault and fault (and vice versa).

Found by inspection.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Check ofproto_port_query_by_name() return value when adding port.

Otherwise, if the port add succeeds but the query that looks up the port
number fails, then ofproto_port_add() would return zero as the OpenFlow
port number and ignore the error.

Reported-by: Guolin Yang <gyang@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Document a few Nicira extensions as standardized in OF1.1+.

The update is incomplete, so document that also.

Reported-by: Stephen Finucane <stephen.finucane@intel.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Factor code out of ofproto_unixctl_trace().

This new function will have an additional caller in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Improve help output for ofproto/trace.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: New unixctl command ofproto/trace-packet-out.

Feature #20543.
Requested-by: Ronghua Zhang <rzhang@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: Switch away from odd use of "q" in "enqueue" action format.

The formatting of the "enqueue" action uses a "q" to separate the port
number from the queue number, as in "enqueue:123q456".  This is different
from every other action.  This commit improves the situation by:

    * Switching the formatting to use a colon (e.g. "enqueue:123:456"),
      which is a little less odd-looking but still accepted by older
      versions of Open vSwitch.

    * Improving the parser to accept "enqueue(123,456)" also.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Improve manpage.

Fixes misspelling of "OpenFlow".

Fixes the indentation of the paragraph beginning "Any \fIreason\fR...".

Changes "target" to "action" in the introduction of actions, which seems
like a better name.

Reorders action descriptions to group all the simple forms of output
together.

Consistently mentions that output actions don't output to the input port.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netlink: New function nl_msg_put_unspec_zero().

This function already had a few potential users, which this commit
converts.  An upcoming commit adds more users.

Signed-off-by: Ben Pfaff <blp@nicira.com>
odp-util: Fix IPFIX breakage with old kernel modules.

Before commit e995e3df57ea (Allow OVS_USERSPACE_ATTR_USERDATA to be
variable length.) userdata attributes in userspace actions were expected
to be exactly 64 bits long.  The kernel only actually enforced that they
were at least 64 bits long (the previously referenced commit's log message
contains misinformation on this account).

Initially this was no problem, because all of the userdata that userspace
actually used was exactly 8 bytes long.  Commit 29089a540c (Implement IPFIX
export), however, exposed a problem by reducing the length of userdata for
IPFIX support to just 4 bytes.  This meant that IPFIX no longer worked on
older datapaths, because the userdata was no longer at least 8 bytes long.

This commit fixes the problem by padding out userdata attributes less than
8 bytes long to 8 bytes.

CC: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Romain Lenglet <rlenglet at vmware.com>
odp-util: Fix formatting of ipfix action cookies, to fix a testsuite failure

Problem introduced by previous commit 96ed775f19 (odp-util: Fix IPFIX
breakage with old kernel modules.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-dev.py: Remove duplicate name from the help string.

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