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" <[email protected]>
To: "Shih-Hao Li" <[email protected]>
Cc: [email protected], "Shih-Hao Li" <[email protected]>
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 <[email protected]>
> 
> 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 <[email protected]>

Is there a reason to distinguish between text and binary data?  That
is, could we just use a fixed-size buffer in every case?
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to