Re: [PATCH 10/10] Use nested compat attributes to pass parameters.

2007-10-01 Thread Patrick McHardy
Corey Hickey wrote: > Patrick McHardy wrote: > >>> +nest = RTA_NEST_COMPAT(skb, TCA_OPTIONS, sizeof(opt), &opt); >>> + >>> +RTA_PUT_U32(skb, TCA_SFQ_QUANTUM, q->quantum); >>> +RTA_PUT_U32(skb, TCA_SFQ_PERTURB, q->perturb_period); >>> +RTA_PUT_U32(skb, TCA_SFQ_LIMIT, q->limit); >>

Re: [PATCH 10/10] Use nested compat attributes to pass parameters.

2007-10-01 Thread Corey Hickey
Patrick McHardy wrote: Corey Hickey wrote: + +#define GET_PARAM(dst, nest, compat) do { \ + struct rtattr *rta = tb[(nest) - 1]; \ + if (rta) \ + (dst) = RTA_GET_U32(rta); \ + else if ((compat)) \ + (dst) = (compat); \ +} while (0) An inline funct

Re: [PATCH 10/10] Use nested compat attributes to pass parameters.

2007-10-01 Thread Patrick McHardy
Corey Hickey wrote: > This fixes the ambiguity between, for example: > tc qdisc change ... perturb 0 > tc qdisc change ... > > Without this patch, there is no way for SFQ to differentiate between > a parameter specified to be 0 and a parameter that was omitted. > > diff --git a/net/sched/sch_sfq

[PATCH 10/10] Use nested compat attributes to pass parameters.

2007-09-28 Thread Corey Hickey
This fixes the ambiguity between, for example: tc qdisc change ... perturb 0 tc qdisc change ... Without this patch, there is no way for SFQ to differentiate between a parameter specified to be 0 and a parameter that was omitted. Signed-off-by: Corey Hickey <[EMAIL PROTECTED]> --- include/linux/

[PATCH 10/10] Use nested compat attributes to pass parameters.

2007-08-25 Thread Corey Hickey
This fixes the ambiguity between, for example: tc qdisc change ... perturb 0 tc qdisc change ... Without this patch, there is no way for SFQ to differentiate between a parameter specified to be 0 and a parameter that was omitted. Signed-off-by: Corey Hickey <[EMAIL PROTECTED]> --- include/linux/