ofproto: Fix memory leak in rule_actions_unref().

Found by valgrind.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
hmap: Make bad hash functions easier to find.

The hmap code has for a long time incremented a counter when a hash bucket
grew to have many entries.  This can let a developer know that some hash
function is performing poorly, but doesn't give any hint as to which one.
This commit improves the situation by adding rate-limited debug logging
that points out a particular line of code as the source of the poor hash
behavior.  It should make issues easier to track down.

Bug #19926.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Lauded-by: Keith Amidon <keith@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ofproto-dpif-upcall: Fix typos in comments.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: pritesh <pritesh.kothari@cisco.com>
ovs-dpctl: Remove stale comment.

The '-m' option is documented in the manpage.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ovs-dpctl: Add a missing simap_destroy()

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ovs-dpctl: Parse the arguments correctly for del-flow.

Inside dpctl_del_flow() argv[0] is 'del-flow' and argv[1] can
be the flow in the absence of the optional datapath argument.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
odp-util: Parse the in_port as a name correctly.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ovs-dpctl: Update usage where datapath name is optional.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif-upcall: Fix a memory leak.

The "key" member in struct flow_miss refers to memory held by the "struct
upcall", hence the upcalls should be freed only after the flow misses are
processed by the main thread.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: Fix typos in comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: pritesh <pritesh.kothari@cisco.com>
Acked-by: Jesse Gross <jesse@nicira.com>
packets: Remove unused function eth_mpls_depth

eth_mpls_depth() has been unused as of 1ac7c9bdb2b6fdcb ("ofproto-dpif: Use
execute_actions to execute controller actions").

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
for ovs-appctl bridge/dump-flows, don't show "priority" twice

before the change:

duration=2110s, priority=0, n_packets=3151646, n_bytes=3104180388, \
priority=0,actions=CONTROLLER:65535
table_id=254, duration=2136s, priority=0, n_packets=0, n_bytes=0, \
priority=0,reg0=0x3,actions=drop
table_id=254, duration=2136s, priority=0, n_packets=0, n_bytes=0, \
priority=0,reg0=0x1,actions=controller(reason=no_match)
table_id=254, duration=2136s, priority=0, n_packets=0, n_bytes=0, \
priority=0,reg0=0x2,actions=drop

after the change:

duration=2924s, n_packets=5316116, n_bytes=5260045454, \
priority=0,actions=CONTROLLER:65535
table_id=254, duration=2924s, n_packets=0, n_bytes=0, \
priority=0,reg0=0x3,actions=drop
table_id=254, duration=2924s, n_packets=0, n_bytes=0, \
priority=0,reg0=0x1,actions=controller(reason=no_match)
table_id=254, duration=2924s, n_packets=0, n_bytes=0, \
priority=0,reg0=0x2,actions=drop

(i wrapped long lines by hand)

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
OPENFLOW-1.1+: update for OF1.3 ONF Extentions and OF1.4

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tunnel: Make tnl_find() easier to understand.

Suggested-by: pritesh <pritesh.kothari@cisco.com>
Acked-by: pritesh <pritesh.kothari@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>