jsonrpc: Keep jsonrpc_recv() from taking over the CPU.
authorBen Pfaff <blp@nicira.com>
Tue, 24 Apr 2012 17:57:41 +0000 (10:57 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 25 Apr 2012 22:17:31 +0000 (15:17 -0700)
commit3a4548cfb2fb7e7344618f449ab9bf651ef83e6b
tree80c0c73d778978ce152304a9481097f74659733d
parent896b32721d2d7a0bf0d032e174d066965cfa2b83
jsonrpc: Keep jsonrpc_recv() from taking over the CPU.

jsonrpc_recv() could take an unbounded amount of CPU time as long as data
kept arriving, preventing other work from taking place.  This limits the
amount of work to processing at most 25 kB of received data and then
yielding to the caller.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/jsonrpc.c