ofproto-dpif: Query port existence by name to prevent warnings.
authorJustin Pettit <jpettit@nicira.com>
Fri, 16 Nov 2012 07:00:39 +0000 (23:00 -0800)
committerJustin Pettit <jpettit@nicira.com>
Fri, 16 Nov 2012 20:35:55 +0000 (12:35 -0800)
commit02f8d6460afdb95d18e193bc0476f1fa8933aeb3
tree8dd31bebe95880cc7fd48359cf1f6ad8051f6efd
parentbee6b8bc16b1c42fef8843cffe4d68b464cddadf
ofproto-dpif: Query port existence by name to prevent warnings.

The port_destruct() function checks if the port still exists in the
datapath to see if additional cleanup is necessary.  It used
dpif_port_query_by_number(), since the datapath port number is readily
available and cheap to use as a lookup handle.  Unfortunately, that
function logs a warning message if a port with that number doesn't exist
(because the datapath did remove it), which is confusing.  The
dpif_port_query_by_name() function doesn't log such an warning, so use
it instead.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
ofproto/ofproto-dpif.c