[ovs-dev] [PATCH] ofproto-dpif-xlate: Limit actions, stack use to 64 kB at resubmit time.

Justin Pettit jpettit at nicira.com
Fri Oct 4 00:15:33 UTC 2013


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.

Acked-by: Justin Pettit <jpettit at nicira.com>

--Justin





More information about the dev mailing list