On Wed, Jun 04, 2014 at 10:30:13AM +1200, Joe Stringer wrote:
> Would this incremental alleviate your concerns?
> 
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index e8f3dbf..aa8cea1 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -3000,11 +3000,11 @@ xlate_learn_action(struct xlate_ctx *ctx, const
> struct ofpact_learn *learn)
>          entry = xlate_cache_add_entry(ctx->xin->xcache, XC_LEARN);
>          entry->u.learn.ofproto = ctx->xbridge->ofproto;
>          entry->u.learn.fm = xmalloc(sizeof *entry->u.learn.fm);

This is good:

> -        entry->u.learn.ofpacts = ofpbuf_new(1024);
> +        entry->u.learn.ofpacts = ofpbuf_new(64);
>          xlate_learn_action__(ctx, learn, entry->u.learn.fm,
>                               entry->u.learn.ofpacts);
>      } else if (ctx->xin->may_learn) {

I'd leave this out, though, since 1024 bytes of stack space doesn't
really cost anything:

> -        uint64_t ofpacts_stub[1024 / 8];
> +        uint64_t ofpacts_stub[64 / 8];
>          struct ofputil_flow_mod fm;
>          struct ofpbuf ofpacts;

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to