[ovs-dev] [PATCH 04/10] dpif-linux: Consolidate buffer usage in flow_dump_next().

Joe Stringer joestringer at nicira.com
Mon Jan 13 23:50:24 UTC 2014


On 13 January 2014 14:28, Ben Pfaff <blp at nicira.com> wrote:
>
> Let's allocate at least 4096 bytes (or NL_DUMP_BUFSIZE if we define
> that) because the kernel always tries to fill up a full 4096 bytes (or
> 8192 on systems with big pages, but I don't think we care much about
> those):
> > -    state->buf = NULL;
> > +    state->buf = ofpbuf_new(1024);
>

OK. I think there are various places that could make use of an
NL_DUMP_BUFSIZE. I'll fix them up.


> But I think that this commit has a serious bug: by discarding
> state->buf and replacing it with a new one, we lose any buffered
> messages that the next nl_dump_next() would pull out (via
> nl_msg_next()).
>

You're right. I'm pretty sure that all of the code in this patch is
replaced in later patches anyhow, so I may as well drop it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140113/8fbdc98b/attachment-0003.html>


More information about the dev mailing list