[ovs-dev] [PATCH] ofproto-dpif: Batch interacting with the dpif on flow miss operations.
Ben Pfaff
blp at nicira.com
Fri Oct 14 20:55:42 UTC 2011
On Thu, Oct 13, 2011 at 05:28:59PM -0700, Ethan Jackson wrote:
> Looks good to me. Minor comments.
>
> - * Each request uses 2 iovecs so we cap batching at MAX_IOVS / 2.
> - *
> * In practice, most of the requests that we batch either have no reply at
> * all or a brief reply. */
> max_batch_count = MAX(sock->rcvbuf / 4096, 1);
> - max_batch_count = MIN(max_batch_count, MAX_IOVS / 2);
> + max_batch_count = MIN(max_batch_count, max_iovs);
>
> Why does this change?
That leaked into the wrong commit. The comment portion got deleted
because it's wrong (each request uses 1 iovec, not 2). The MAX_IOVS
changes to max_iovs since we compute it dynamically in
nl_sock_create().
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index e0f9ed1..1a324a0 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -28,6 +28,7 @@
> #include "coverage.h"
> #include "cfm.h"
> #include "dpif.h"
> +#include "dpif-linux.h"
> #include "dynamic-string.h"
> #include "fail-open.h"
> #include "hmapx.h"
>
> I don't think this added include is necessary. If it is, it seems like a
> layering violation. On my system the code compiles without it.
It's not needed, thanks for pointing that out.
More information about the dev
mailing list