On Fri, Jan 10, 2014 at 11:43:09AM -0800, Joe Stringer wrote:
> This patch simplifies buffer usage in dpif_linux_flow_dump_next() in
> preparation for later changes.
> 
> Signed-off-by: Joe Stringer <joestrin...@nicira.com>

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);

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()).
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to