diff options
Diffstat (limited to 'net/sched/sch_api.c')
| -rw-r--r-- | net/sched/sch_api.c | 17 | 
1 files changed, 3 insertions, 14 deletions
| diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b6c4f536876b..52529b7f8d96 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -795,6 +795,8 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,  	tcm->tcm_info = refcount_read(&q->refcnt);  	if (nla_put_string(skb, TCA_KIND, q->ops->id))  		goto nla_put_failure; +	if (nla_put_u8(skb, TCA_HW_OFFLOAD, !!(q->flags & TCQ_F_OFFLOADED))) +		goto nla_put_failure;  	if (q->ops->dump && q->ops->dump(q, skb) < 0)  		goto nla_put_failure;  	qlen = q->q.qlen; @@ -1061,17 +1063,6 @@ static struct Qdisc *qdisc_create(struct net_device *dev,  	}  	if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) { -		if (qdisc_is_percpu_stats(sch)) { -			sch->cpu_bstats = -				netdev_alloc_pcpu_stats(struct gnet_stats_basic_cpu); -			if (!sch->cpu_bstats) -				goto err_out4; - -			sch->cpu_qstats = alloc_percpu(struct gnet_stats_queue); -			if (!sch->cpu_qstats) -				goto err_out4; -		} -  		if (tca[TCA_STAB]) {  			stab = qdisc_get_stab(tca[TCA_STAB]);  			if (IS_ERR(stab)) { @@ -1113,7 +1104,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev,  		ops->destroy(sch);  err_out3:  	dev_put(dev); -	kfree((char *) sch - sch->padded); +	qdisc_free(sch);  err_out2:  	module_put(ops->owner);  err_out: @@ -1121,8 +1112,6 @@ err_out:  	return NULL;  err_out4: -	free_percpu(sch->cpu_bstats); -	free_percpu(sch->cpu_qstats);  	/*  	 * Any broken qdiscs that would require a ops->reset() here?  	 * The qdisc was never in action so it shouldn't be necessary. |