[ovs-dev] [Single DP 06/15] ofproto: Add initialization function.

Justin Pettit jpettit at nicira.com
Mon Oct 29 22:18:57 UTC 2012


On Oct 19, 2012, at 10:53 AM, Ben Pfaff <blp at nicira.com> wrote:

> Hmm, putting "return;" in an otherwise empty function isn't our usual
> practice:
> 
>> static void
>> +init(const struct shash *iface_hints OVS_UNUSED)
>> +{
>> +    return;
>> +}

Removed

>> @@ -319,6 +319,15 @@ struct ofproto_class {
>> /* ## ----------------- ## */
>> /* ## Factory Functions ## */
>> /* ## ----------------- ## */
> 
> It'd be nice to have a blank line here.

Okey-dokey.

>> +    /* Iinitializes provider.  The caller may pass in 'iface_hints',
> 
> s/Iinitializes/Initializes/.

Fixed.

>> +     * which contains an shash of "iface_hint" elements indexed by the
> 
> Would you mind saying "struct iface_hint" elements?  It took me a minute
> to understand that was what you meant.

Sure.

>> +     * interface's name.  The provider may use these hints to describe
>> +     * the startup configuration in order to reinitialize its state.
>> +     * The caller owns the provided data, so a provider must make copies
>> +     * of anything required.  An ofproto provider must remove any
>> +     * existing state that is not described by the hint, and may choose
>> +     * to remove it all. */
>> +    void (*init)(const struct shash *iface_hints);
> 
> Otherwise this looks good, thank you.

Thanks!

--Justin





More information about the dev mailing list