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

Ben Pfaff blp at nicira.com
Mon Feb 25 18:38:44 UTC 2013

That makes sense.

Guru, since you've been doing the most work on bugtool lately, will
you please review this and, if you're happy with it, apply it?



On Mon, Feb 25, 2013 at 10:07:17AM -0800, Shih-Hao Li wrote:
> 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)
> thanks
> Shih-Hao
> ----- 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