On Tue, Sep 20, 2011 at 9:35 AM, Ben Pfaff <[email protected]> wrote:
> On Mon, Sep 19, 2011 at 04:09:31PM -0700, Jesse Gross wrote:
>> It's possible to start receiving packets on a datapath as soon as
>> the internal device is created.  It's therefore important that the
>> datapath be fully initialized before this, which it currently isn't.
>> In particular, the fact that dp->stats_percpu is not yet set is
>> potentially fatal.  In addition, if allocation of the Netlink response
>> failed it would leak the percpu memory.  This fixes both problems.
>>
>> Found by code inspection, in practice the datapath is probably always
>> done initializing before someone can send a packet on it.
>>
>> Signed-off-by: Jesse Gross <[email protected]>
>
> "git am" says:
>
>    /home/blp/db/.git/rebase-apply/patch:163: trailing whitespace.
>            free_percpu(dp->stats_percpu);
>    warning: 1 line adds whitespace errors.

Fixed.

> There's an existing instance of
> vport_get_ifindex(get_vport_protected(dp, OVSP_LOCAL)) in
> dp_fill_ifinfo().  I don't know whether you want to convert that one
> to use get_dpifindex() or not.  The existing call should always get an
> ifindex, but then so should most of the calls to get_dpifindex().

Yes, it probably makes sense.

> Acked-by: Ben Pfaff <[email protected]>

Thanks, pushed.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to