[ovs-dev] [PATCH] ofproto-dpif-xlate: Limit actions, stack use to 64 kB at resubmit time.
Ben Pfaff
blp at nicira.com
Fri Oct 4 15:47:31 UTC 2013
On Thu, Oct 03, 2013 at 05:15:33PM -0700, Justin Pettit wrote:
>
> On Aug 23, 2013, at 10:04 AM, Ben Pfaff <blp at nicira.com> wrote:
>
> > @@ -1667,7 +1674,18 @@ static void
> > xlate_table_action(struct xlate_ctx *ctx,
> > ofp_port_t in_port, uint8_t table_id, bool may_packet_in)
> > {
> > - if (ctx->recurse < MAX_RESUBMIT_RECURSION) {
> > + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
> > +
> > + if (ctx->recurse >= MAX_RESUBMIT_RECURSION) {
> > + VLOG_ERR_RL(&rl, "resubmit actions recursed over %d times",
> > + MAX_RESUBMIT_RECURSION);
> > + } else if (ctx->resubmits >= MAX_RESUBMITS) {
> > + VLOG_ERR_RL(&rl, "over %d resubmit actions", MAX_RESUBMITS);
> > + } else if (ctx->xout->odp_actions.size >= 65536) {
>
> In other parts of the code, the max action size is UINT16_MAX. It
> might be nice to be consistent.
OK, I changed >= 65536 to > UINT16_MAX.
> Acked-by: Justin Pettit <jpettit at nicira.com>
Thanks.
More information about the dev
mailing list