Commit 6e1978a9 authored by Allen Pais's avatar Allen Pais Committed by Jakub Kicinski
Browse files

net: sched: convert tasklets to use new tasklet_setup() API



In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <apais@linux.microsoft.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b5bd8b62
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ static inline void *qdisc_priv(struct Qdisc *q)
	return &q->privdata;
}

static inline struct Qdisc *qdisc_from_priv(void *priv)
{
	return container_of(priv, struct Qdisc, privdata);
}

/* 
   Timer resolution MUST BE < 10% of min_schedulable_packet_size/bandwidth
   
+4 −4
Original line number Diff line number Diff line
@@ -466,10 +466,10 @@ drop: __maybe_unused
 * non-ATM interfaces.
 */

static void sch_atm_dequeue(unsigned long data)
static void sch_atm_dequeue(struct tasklet_struct *t)
{
	struct Qdisc *sch = (struct Qdisc *)data;
	struct atm_qdisc_data *p = qdisc_priv(sch);
	struct atm_qdisc_data *p = from_tasklet(p, t, task);
	struct Qdisc *sch = qdisc_from_priv(p);
	struct atm_flow_data *flow;
	struct sk_buff *skb;

@@ -563,7 +563,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt,
	if (err)
		return err;

	tasklet_init(&p->task, sch_atm_dequeue, (unsigned long)sch);
	tasklet_setup(&p->task, sch_atm_dequeue);
	return 0;
}