Subject: Re: [PATCH 6/7] Make qdisc changeable.

From: Patrick McHardy <[email-masked]>
Date: Mon, 06 Aug 2007 14:06:12 +0200

Corey Hickey wrote:
> Patrick McHardy wrote:
> 
>>> +    if ((err = sfq_q_init(&tmp, opt)))
>>> +        return err;
>>
>>
>>
>> This will also use defaults for all unspecified values. It would
>> be more consistent with other qdiscs to only change those values
>> that are actually specified, so something like "tc qdisc change ...
>> perturb 10" will *only* change the perturbation parameter.
> 
> 
> I'm fixed this for all the parameters except one--your example above.
> Since 0 is a valid value for perturb, I can't see any clever way to
> differentiate between the user specifying "perturb 0" or leaving perturb
> unspecified. Either way, opt->perturb_period is 0.
> 
> The only way I can see would be to add another member, say,
> opt->perturb_specified, and use that accordingly. Unfortunately, this
> would break usage of sfq with older versions of tc, so I'm hoping
> there's a better approach.
> 
> Do you have any suggestions? I've looked at the other qdisc files and I
> don't see any other instances like this.

Maybe use the nested compat attribute and split the base SFQ
struct in the individual members ..