[ovs-dev] [PATCH 2/2] vswitchd: Remove port from datapath before setting ofport column to -1

Jesse Gross jesse at nicira.com
Mon Mar 26 11:31:25 PDT 2012


On Fri, Mar 23, 2012 at 6:07 PM, Ansis Atteka <aatteka at nicira.com> wrote:
>> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
>> index 6449333..e1a663d 100644
>> --- a/vswitchd/bridge.c
>> +++ b/vswitchd/bridge.c
>> @@ -1199,6 +1199,11 @@ bridge_add_ofproto_ports(struct bridge *br)
>>                     /* We already reported a related error, don't bother
>>                      * duplicating it. */
>>                 }
>> +                if (!ofproto_port_query_by_name(br->ofproto, port->name,
>> +
>> &ofproto_port)) {
>> +                    ofproto_port_del(br->ofproto, ofproto_port.ofp_port);
>> +                    ofproto_port_destroy(&ofproto_port);
>> +                }
>
> RFC: Not sure if it would have been more correctly to use
> dpif_linux_port_del directly here? Perhaps someone can
> clarify?

I think using the ofproto functions are correct - the dpif_linux
functions are several layers down.



More information about the dev mailing list