[ovs-dev] [PATCH] Add binary option for command outputs collected by ovs-bugtool

Shih-Hao Li shihli at vmware.com
Mon Feb 25 18:07:17 UTC 2013

Because users can provide a filter for command output,
they may prefer the filter is applied on a line-by-line basis. 
I believe that is mainly for text output.

For binary output, I am not sure if users want to do filtering.
I'm using a fixed 1MB buffer for now. Or we can use a different option
so that users can decide their own buffer size. For example,
bufsize == 1 (line buffer as before), 
bufsize == 0 (unbuffered)
otherwise (user-defined)


----- Original Message -----
From: "Ben Pfaff" <blp at nicira.com>
To: "Shih-Hao Li" <shihli at nicira.com>
Cc: dev at openvswitch.org, "Shih-Hao Li" <shihli at vmware.com>
Sent: Monday, February 25, 2013 9:39:13 AM
Subject: Re: [ovs-dev] [PATCH] Add binary option for command outputs collected by ovs-bugtool

On Fri, Feb 22, 2013 at 08:54:04AM -0800, Shih-Hao Li wrote:
> From: Shih-Hao Li <shihli at vmware.com>
> Current ovs-bugtool collects command outputs as text strings.
> Thus it reads the output by lines. For commands that generate
> huge binary data, it becomes very inefficient to read the output.
> The change here is to use a 1MB buffer to read binary data
> instead of reading them by lines.
> Signed-off-by: Shih-Hao Li <shihli at vmware.com>

Is there a reason to distinguish between text and binary data?  That
is, could we just use a fixed-size buffer in every case?

More information about the dev mailing list