Commit a1ac3a7c authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net_sched: sch_tfs: implement lockless etf_dump()



Instead of relying on RTNL, codel_dump() can use READ_ONCE()
annotations.

There is no etf_change() yet, this patch imply aligns
this qdisc with others.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c45bd26c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -467,15 +467,15 @@ static int etf_dump(struct Qdisc *sch, struct sk_buff *skb)
	if (!nest)
		goto nla_put_failure;

	opt.delta = q->delta;
	opt.clockid = q->clockid;
	if (q->offload)
	opt.delta = READ_ONCE(q->delta);
	opt.clockid = READ_ONCE(q->clockid);
	if (READ_ONCE(q->offload))
		opt.flags |= TC_ETF_OFFLOAD_ON;

	if (q->deadline_mode)
	if (READ_ONCE(q->deadline_mode))
		opt.flags |= TC_ETF_DEADLINE_MODE_ON;

	if (q->skip_sock_check)
	if (READ_ONCE(q->skip_sock_check))
		opt.flags |= TC_ETF_SKIP_SOCK_CHECK;

	if (nla_put(skb, TCA_ETF_PARMS, sizeof(opt), &opt))