Subject: Re: [PATCH iproute2] fq_codel: add per queue memory limit

From: Stephen Hemminger <[email-masked]>
Date: Wed, 1 Jun 2016 08:53:40 -0700

On Wed, 01 Jun 2016 07:23:31 -0700
Eric Dumazet <[email-masked]> wrote:
> +		} else if (strcmp(*argv, "memory_limit") == 0) {
> +			NEXT_ARG();
> +			if (get_size(&memory, *argv)) {
> +				fprintf(stderr, "Illegal \"memory_limit\"\n");
> +				return -1;
> +			}

Do you really want to allow memory limit of 0?

> +	if (tb[TCA_FQ_CODEL_MEMORY_LIMIT] &&
> +	    RTA_PAYLOAD(tb[TCA_FQ_CODEL_MEMORY_LIMIT]) >= sizeof(__u32)) {
> +		memory_limit = rta_getattr_u32(tb[TCA_FQ_CODEL_MEMORY_LIMIT]);
> +
> +		fprintf(f, "memory_limit %s ", sprint_size(memory_limit, b1));
> +	}

Why the size check? other parameters don't do it?