[ovs-dev] [cleanups 07/12] ofproto-dpif: Query port existence by name to prevent warnings.
Justin Pettit
jpettit at nicira.com
Fri Nov 16 18:39:12 UTC 2012
On Nov 16, 2012, at 9:49 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Fri, Nov 16, 2012 at 12:03:00AM -0800, Justin Pettit wrote:
>> 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 at nicira.com>
>
> Why not use dpif_port_exists() here? It seems tailor-made for the job.
Much better. Thanks.
--Justin
More information about the dev
mailing list