[ovs-dev] [PATCH 3/3] ofproto: Cache result in ofproto_enumerate_types
blp at nicira.com
Tue Jan 22 18:19:27 UTC 2013
On Mon, Jan 21, 2013 at 03:10:02PM +0900, Simon Horman wrote:
> Given the current implementation it is not clear to me that the result
> calculated by ofproto_enumerate_types() can ever change.
> By caching the lookup made by ofproto_enumerate_types() calls to
> shash_add() and shash_destroy() destroy are avoided reducing the use of
> malloc(), free() and hash_bytes().
> In my test environment this increased the rate at which packets could be
> received from ~25.6kpps to ~27.0kpps.
> Signed-off-by: Simon Horman <horms at verge.net.au>
That's an impressive improvement.
ofproto_enumerate_types() needs a comment update.
In ofproto.h please don't break the ofproto_enumerate_types() prototype
across two lines.
More information about the dev