netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: davem@davemloft.net
Cc: gerrit@erg.abdn.ac.uk, kuba@kernel.org, edumazet@google.com,
	kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
	johannes@sipsolutions.net, alex.aring@gmail.com,
	stefan@datenfreihafen.org, santosh.shilimkar@oracle.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	steffen.klassert@secunet.com, herbert@gondor.apana.org.au,
	netdev@vger.kernel.org, Allen Pais <apais@linux.microsoft.com>,
	Romain Perier <romain.perier@gmail.com>
Subject: [net-next v2 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API
Date: Wed,  7 Oct 2020 15:42:13 +0530	[thread overview]
Message-ID: <20201007101219.356499-3-allen.lkml@gmail.com> (raw)
In-Reply-To: <20201007101219.356499-1-allen.lkml@gmail.com>

From: Allen Pais <apais@linux.microsoft.com>

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: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
---
 net/ipv4/tcp_output.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index bf48cd73e..6e998d428 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1038,9 +1038,9 @@ static void tcp_tsq_handler(struct sock *sk)
  * transferring tsq->head because tcp_wfree() might
  * interrupt us (non NAPI drivers)
  */
-static void tcp_tasklet_func(unsigned long data)
+static void tcp_tasklet_func(struct tasklet_struct *t)
 {
-	struct tsq_tasklet *tsq = (struct tsq_tasklet *)data;
+	struct tsq_tasklet *tsq = from_tasklet(tsq,  t, tasklet);
 	LIST_HEAD(list);
 	unsigned long flags;
 	struct list_head *q, *n;
@@ -1125,9 +1125,7 @@ void __init tcp_tasklet_init(void)
 		struct tsq_tasklet *tsq = &per_cpu(tsq_tasklet, i);
 
 		INIT_LIST_HEAD(&tsq->head);
-		tasklet_init(&tsq->tasklet,
-			     tcp_tasklet_func,
-			     (unsigned long)tsq);
+		tasklet_setup(&tsq->tasklet, tcp_tasklet_func);
 	}
 }
 
-- 
2.25.1


  parent reply	other threads:[~2020-10-07 10:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 10:12 [net-next v2 0/8] net: convert tasklets to use new Allen Pais
2020-10-07 10:12 ` [net-next v2 1/8] net: dccp: convert tasklets to use new tasklet_setup() API Allen Pais
2020-10-07 10:12 ` Allen Pais [this message]
2020-10-07 10:12 ` [net-next v2 3/8] net: mac80211: " Allen Pais
2020-10-07 10:55   ` Johannes Berg
2020-10-07 10:57     ` Allen Pais
2020-10-07 10:12 ` [net-next v2 4/8] net: mac802154: " Allen Pais
2020-10-07 10:12 ` [net-next v2 5/8] net: rds: " Allen Pais
2020-10-07 10:12 ` [net-next v2 6/8] net: sched: " Allen Pais
2020-10-07 16:52   ` Eric Dumazet
2020-10-07 10:12 ` [net-next v2 7/8] net: smc: " Allen Pais
2020-10-07 19:17   ` Karsten Graul
2020-10-07 10:12 ` [net-next v2 8/8] net: xfrm: " Allen Pais
2020-10-09 15:44 ` [net-next v2 0/8] net: convert tasklets to use new Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201007101219.356499-3-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=apais@linux.microsoft.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gerrit@erg.abdn.ac.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=romain.perier@gmail.com \
    --cc=santosh.shilimkar@oracle.com \
    --cc=stefan@datenfreihafen.org \
    --cc=steffen.klassert@secunet.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).