[ovs-dev] [PATCH] jsonrpc: Alters jsonrpc_recv to return the RPC message if fully consumed.

Chris Hydon chydon at aristanetworks.com
Thu Apr 3 23:15:47 UTC 2014


On 2014-04-03 4:00 PM, Ben Pfaff wrote:
> On Thu, Apr 03, 2014 at 03:56:44PM -0700, Chris Hydon wrote:
>> It looks like your change also fixes the problem, and I don't see
>> any bugs. I agree entirely: the current code is needlessly complex!
>> My only comment is that with your change, for long messages up to
>> twice as much is read from the socket as before. If 50 was a
>> strategically chosen value, the number of loops maybe ought to be
>> reduced to 25, otherwise this is not an issue.
> The previous value was arbitrary.  I chose it to be big enough to get
> a significant amount of work done in one call, but not so big that a
> single connection could soak up all the CPU and prevent other work
> from getting done.
Then I see no issues.

> I'll push this to master in a little while.  Is this causing trouble
> for you on any particular branch?  I'm willing to backport it to older
> versions, since that should be trivial.
Thanks, but we're actually using a fairly old version right now - we 
maintain a small set of patches specific to our needs anyway, so we can 
just include this patch and then drop it when we finally do upgrade.



More information about the dev mailing list