Commit 44edf2f8 authored by Nogah Frankel's avatar Nogah Frankel Committed by David S. Miller

net: sched: Move offload check till after dump call

Move the check of the offload state to after the qdisc dump action was
called, so the qdisc could update it if it was changed.

Fixes: 7a4fa291 ("net: sched: Add TCA_HW_OFFLOAD")
Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
Reviewed-by: default avatarYuval Mintz <yuvalm@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8234af2d
...@@ -807,11 +807,10 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, ...@@ -807,11 +807,10 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
tcm->tcm_info = refcount_read(&q->refcnt); tcm->tcm_info = refcount_read(&q->refcnt);
if (nla_put_string(skb, TCA_KIND, q->ops->id)) if (nla_put_string(skb, TCA_KIND, q->ops->id))
goto nla_put_failure; 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) if (q->ops->dump && q->ops->dump(q, skb) < 0)
goto nla_put_failure; goto nla_put_failure;
if (nla_put_u8(skb, TCA_HW_OFFLOAD, !!(q->flags & TCQ_F_OFFLOADED)))
goto nla_put_failure;
qlen = qdisc_qlen_sum(q); qlen = qdisc_qlen_sum(q);
stab = rtnl_dereference(q->stab); stab = rtnl_dereference(q->stab);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment