On Fri, Jan 10, 2014 at 11:43:07AM -0800, Joe Stringer wrote:
> This should help to highlight the different users of nl_dump.buffer.
> A later patch will remove this field.
> 
> Signed-off-by: Joe Stringer <[email protected]>

The wording here is vague.  Everyone adding a call will have to figure
out what "enough space" is:

    /* Attempts to retrieve another reply from 'dump' into 'buffer'. 'dump' must
     * have been initialized with nl_dump_start(), and 'buffer' must have been
     * initialized with enough space to receive a netlink reply.

I suggest adding an NL_DUMP_BUFSIZE or similar in the header and
suggesting in the comment that at least that much space should
available.  (There is no harm if there isn't, because the netlink
receive function will reallocate the buffer and copy data around, but
performance is better without that.)
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to