Re: [RESEND 2.6.27] netlink: Remove compat API for nested attributes
From: Alexander Duyck <hidden>
Date: 2008-09-02 21:46:47
Thomas Graf wrote:
Removes all _nested_compat() functions from the API. The prio qdisc no longer requires them and netem has its own format anyway. Their existance is only confusing. Resend: Also remove the wrapper macro. Signed-off-by: Thomas Graf <tgraf@suug.ch>
I don't think we need to do anything as drastic as completely throwing out this part of the Kernel ABI. This is what I have been trying to get at all along. All we need to do is revert the two patches that we talked about earlier and everything goes back to working.
quoted hunk ↗ jump to hunk
Index: net-2.6/net/sched/sch_prio.c ===================================================================--- net-2.6.orig/net/sched/sch_prio.c 2008-08-28 12:52:07.000000000 +0200 +++ net-2.6/net/sched/sch_prio.c 2008-08-28 15:33:14.000000000 +0200@@ -254,16 +254,12 @@ { struct prio_sched_data *q = qdisc_priv(sch); unsigned char *b = skb_tail_pointer(skb); - struct nlattr *nest; struct tc_prio_qopt opt; opt.bands = q->bands; memcpy(&opt.priomap, q->prio2band, TC_PRIO_MAX+1); - nest = nla_nest_compat_start(skb, TCA_OPTIONS, sizeof(opt), &opt); - if (nest == NULL) - goto nla_put_failure; - nla_nest_compat_end(skb, nest); + NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); return skb->len;
This is the one section of this patch that I do completely agree with. There is no need to generate a nested compat attribute when there is nothing there to nest. Since "multiqueue" is gone, this change can be made to just clean up the netlink portion of prio. Thanks, Alex