From patchwork Tue Oct 6 06:31:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A806C41604 for ; Tue, 6 Oct 2020 06:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5F55206DD for ; Tue, 6 Oct 2020 06:32:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p+AaWphc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbgJFGcU (ORCPT ); Tue, 6 Oct 2020 02:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGcT (ORCPT ); Tue, 6 Oct 2020 02:32:19 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CFAC0613A7 for ; Mon, 5 Oct 2020 23:32:19 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id d23so720873pll.7 for ; Mon, 05 Oct 2020 23:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ro7FF8spJG58a2mM1edxZvD4AVGYl3L6lHSI77Kj9ao=; b=p+AaWphc0H66phAGtXk793c+E/sXIGFDnOXBHJ4i1L03TQs7M3AgJqUIKu0/GxOwz1 kvUlge1Iu9NTy/lmoz41iLrQQXNZcgZgLMPbBaAx9vgJV5kWRsrg8jHCisQ7J5DxVyK7 LDIExTT4j2jVb9Bf6gtuM7kNddD1mZ2jx4Kd+bkKdfjH6d17f/o9bKyuICuWhNpAEbWg DsRF3xTIeMELEnxg89vqxIE0xKZ0JD1YlTH/Fghh9nNy9xEKDkp+Uj59rFhK0NEtuoIg VOiGc3nhTcMbHHiYZEBb974t0B62u24XpRngUKznSCHKbLHLVJgnh2Don4HzO0E9s8Bg or2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ro7FF8spJG58a2mM1edxZvD4AVGYl3L6lHSI77Kj9ao=; b=Ksjw4LQnCoffqF2Duh6h+8FBNle/YMHgfc9fhlyTIlnp2jGCkwgno0RfEtuvGOOkjP hqx1A+BIz6l+bCnLtb+kXxhREDrbJBijtDNQ8KzHrR0pz7D8iUEv58dLD7/gllAbv/kb O0vv3iGbTUKy1wJUBfIZmYNycVnGEIhlS43fy773CtipOyilpSXmEsniMKQhodKfaEyT b8arQAGQo0P+NJOPbqqiQLnmt/wKLW2zDn0gEIagYrDWr8ZTSTtogr/1WDTATKOBTKQp oq7ekwrmJR18f2f1L3OMuJUm+8ZAnmJU83u8tJ8n8l+m9hrYZvgtBFzb7HSkqgJYslXH VOgw== X-Gm-Message-State: AOAM530IeDXWEHmq5xgYnJV4Lb+gyLc2nhwaEStMtIX2h8LHMPZLDXCN awTjL5cuQHP5fWIQVEhEiqA= X-Google-Smtp-Source: ABdhPJy+TTw5kSJAVmTDCtfoY/V6TNXbhDNXJCKYcMS4Igf+gP2OVujqGP3xKfe1FfXf9puErTRbpw== X-Received: by 2002:a17:90a:94cc:: with SMTP id j12mr2878774pjw.106.1601965939302; Mon, 05 Oct 2020 23:32:19 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:18 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 1/8] net: dccp: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:54 +0530 Message-Id: <20201006063201.294959-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- net/dccp/timer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/dccp/timer.c b/net/dccp/timer.c index a934d2932..a57d66b29 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c @@ -219,9 +219,10 @@ static void dccp_delack_timer(struct timer_list *t) * * See the comments above %ccid_dequeueing_decision for supported modes. */ -static void dccp_write_xmitlet(unsigned long data) +static void dccp_write_xmitlet(struct tasklet_struct *t) { - struct sock *sk = (struct sock *)data; + struct dccp_sock *dp = from_tasklet(dp, t, dccps_xmitlet); + struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; bh_lock_sock(sk); if (sock_owned_by_user(sk)) @@ -235,16 +236,15 @@ static void dccp_write_xmitlet(unsigned long data) static void dccp_write_xmit_timer(struct timer_list *t) { struct dccp_sock *dp = from_timer(dp, t, dccps_xmit_timer); - struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; - dccp_write_xmitlet((unsigned long)sk); + dccp_write_xmitlet(&dp->dccps_xmitlet); } void dccp_init_xmit_timers(struct sock *sk) { struct dccp_sock *dp = dccp_sk(sk); - tasklet_init(&dp->dccps_xmitlet, dccp_write_xmitlet, (unsigned long)sk); + tasklet_setup(&dp->dccps_xmitlet, dccp_write_xmitlet); timer_setup(&dp->dccps_xmit_timer, dccp_write_xmit_timer, 0); inet_csk_init_xmit_timers(sk, &dccp_write_timer, &dccp_delack_timer, &dccp_keepalive_timer); From patchwork Tue Oct 6 06:31:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF9C9C41604 for ; Tue, 6 Oct 2020 06:32:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A75E206DD for ; Tue, 6 Oct 2020 06:32:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sE+M/sMx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727048AbgJFGc1 (ORCPT ); Tue, 6 Oct 2020 02:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGc1 (ORCPT ); Tue, 6 Oct 2020 02:32:27 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3D8AC0613A7 for ; Mon, 5 Oct 2020 23:32:25 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id nl2so1016538pjb.1 for ; Mon, 05 Oct 2020 23:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/UzESi8UuNZEiVz0nFfm9fN5yC8iGGjdO1zss4vprzg=; b=sE+M/sMx9W5S1HvtkEuUowYoMviJYiYaKVRu4yjmhfoGGHhdgrHMhSa7hNjp4/N38Q pp+ot5e0LupLDCK65pzgptSIjHQmapFvj/B1z172HDOhJY3n94YYs4u9ViO85pMu1Nfw vfAZwaPLIeW9k/Di2WJlV/dbN3VygSiVvBfgncasdppHJHfTRXzFfjHa5IdtHGRcew4g umcaSGiNjbFfVaGr/wuz4NdVOZWKieRzyazM03ork02LiGyQQhF9iD4Mqf/FmKOM6rqm weKDeo7zF5Ihdtf5K6vqNQtPV5GNqfKLUgjYHnsnB1j4esEwIisE8hSonf1DMZxxjRMc Dfqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/UzESi8UuNZEiVz0nFfm9fN5yC8iGGjdO1zss4vprzg=; b=Bu06OrBFNOhJBquRCVtowzDbTLJmGiNodm4WBnkuLtsLGjO5fCqSXtIUqbUtjerBKy or8haTD7X5QOffthw6L9HTX8YoMOnmBYZSb/s5KiC5kqBE8ywnXS6C41NrgGeM48ZD7k 30LiHfZX5oJ+E8FGClCH4kO0Gax0JsM2Qgn8XpvtavfdGbfUCGV8ZvGI2aAoTUz5Bp5c 9FL3URv+u6yBpJRtHVVfdrHSvJOrtMQAviZ/vsEBQxa3ARCjuuG2KYRIuxhBanFGDDdI 2h3xFWzbOZlT5ZKXYM5B7iv0Fw89UEBKvYrae0Ah4hHTOtdETaB2lgP0kUW28LubE/kw qclQ== X-Gm-Message-State: AOAM532C1tpAkN5myXBZfqCjZ1vPwuA39DxDB1wYAztkGI47ZCEqG6n4 47WdZfic3tzDpZhz/JUdNcY= X-Google-Smtp-Source: ABdhPJyg32+pfp0wbnD6iQpYiP+LXvIo7oqiDYFNH/dSEmGwk7ZMKNUDYwRoLHe3hBtZLL3DUKQ69g== X-Received: by 2002:a17:90a:974a:: with SMTP id i10mr2902536pjw.137.1601965945491; Mon, 05 Oct 2020 23:32:25 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:24 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:55 +0530 Message-Id: <20201006063201.294959-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- 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); } } From patchwork Tue Oct 6 06:31:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268056 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACC5FC41604 for ; Tue, 6 Oct 2020 06:32:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45BD4206DD for ; Tue, 6 Oct 2020 06:32:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qxN+OkZg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbgJFGce (ORCPT ); Tue, 6 Oct 2020 02:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGce (ORCPT ); Tue, 6 Oct 2020 02:32:34 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDEBDC0613A7 for ; Mon, 5 Oct 2020 23:32:32 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 22so3483718pgv.6 for ; Mon, 05 Oct 2020 23:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nUE1dHWwWN/G8BUHBLP/4TlfVhwwvwuxc+Gr5Le1lT4=; b=qxN+OkZgZadJ9UHivkkgTTcDs8h77iKzyyZFqxP5vYliIR6rlRcdDScWzuIdNsyBi6 ZUUShouExvWeSI5fmv7r4GkMabt6noloXAGWxdw6BUlqE9vMY7Ldm7jVERIu0W1yakO5 L9IJnN9g3jIvhSuKi4JRFLFtsb/w4RpQtIjSClEnhf09WHU8if0GLghZqjiGbc9/T9lo bPJb3jdGiNEDJSDBmedvVvYM3cHVCWOn7Nw3D/YaihtZ+/4EPPVgifAjygY/qFwW2scS ikvV7tBWGSnMx9cUGSSLaxVYEL9YYz80WAy6BtBIQ99EQFffzdC3qUWzp/lKC7R+s74A 5lbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nUE1dHWwWN/G8BUHBLP/4TlfVhwwvwuxc+Gr5Le1lT4=; b=Z9CohTFDVz7TLSV+iQgb3ylkuGV27epqTveqFlDICXBt9VsqneES2LYGwYsuZ+BehI jq0Of9MnWrLerelJjOCfLZ1dY9E6pOQu4xarbMXLfVZu4Wv4qrBXZG2A5sGfu6GAE9w7 sHldAmErqJgS1bWaIJSeopQbowMW+uCU3/MFm8zJEp+IvLC5bCiYCCIwAjvsAXPqYP5f e4MsYxc+NnL9PKf2wMFZ0h8JHzima67+0nNLQumHc01GXcoa9kB4G6hlPjyyYokDo4KS UymENOs5P8ILapfjrfM8LYvlmTT27/0HX8QHt5cGeX7yYCGtO3A4LTcobFXNLGvB/nfk 1Hlg== X-Gm-Message-State: AOAM532/KXNqEU1ATmtQ3JgF58hgnNsX9or+jyL/r8TT4CaYOdoR2T9/ Vv3xqFpND19VEqFwXVEhSZY= X-Google-Smtp-Source: ABdhPJw0wpqAfV/AM0UVlnGBwRwzPRPPpZm7f/J//S/9SgBuu0cj37QTLzU3mXskz4jMFTs6ik5YEw== X-Received: by 2002:a62:3706:0:b029:142:2501:39e5 with SMTP id e6-20020a6237060000b0290142250139e5mr3231654pfa.52.1601965952293; Mon, 05 Oct 2020 23:32:32 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:31 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 3/8] net: mac80211: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:56 +0530 Message-Id: <20201006063201.294959-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/main.c | 14 +++++--------- net/mac80211/tx.c | 5 +++-- net/mac80211/util.c | 5 +++-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c3e357857..6d083a146 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1795,7 +1795,7 @@ static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata) /* tx handling */ void ieee80211_clear_tx_pending(struct ieee80211_local *local); -void ieee80211_tx_pending(unsigned long data); +void ieee80211_tx_pending(struct tasklet_struct *t); netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev); netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, @@ -2143,7 +2143,7 @@ void ieee80211_txq_remove_vlan(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata); void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats, struct txq_info *txqi); -void ieee80211_wake_txqs(unsigned long data); +void ieee80211_wake_txqs(struct tasklet_struct *t); void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, u16 transaction, u16 auth_alg, u16 status, const u8 *extra, size_t extra_len, const u8 *bssid, diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 523380aed..48ab05186 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -220,9 +220,9 @@ u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata) BSS_CHANGED_ERP_SLOT; } -static void ieee80211_tasklet_handler(unsigned long data) +static void ieee80211_tasklet_handler(struct tasklet_struct *t) { - struct ieee80211_local *local = (struct ieee80211_local *) data; + struct ieee80211_local *local = from_tasklet(local, t, tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->skb_queue)) || @@ -733,16 +733,12 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, skb_queue_head_init(&local->pending[i]); atomic_set(&local->agg_queue_stop[i], 0); } - tasklet_init(&local->tx_pending_tasklet, ieee80211_tx_pending, - (unsigned long)local); + tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending); if (ops->wake_tx_queue) - tasklet_init(&local->wake_txqs_tasklet, ieee80211_wake_txqs, - (unsigned long)local); + tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs); - tasklet_init(&local->tasklet, - ieee80211_tasklet_handler, - (unsigned long) local); + tasklet_setup(&local->tasklet, ieee80211_tasklet_handler); skb_queue_head_init(&local->skb_queue); skb_queue_head_init(&local->skb_queue_unreliable); diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8ba10a48d..a50c0edb1 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4406,9 +4406,10 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, /* * Transmit all pending packets. Called from tasklet. */ -void ieee80211_tx_pending(unsigned long data) +void ieee80211_tx_pending(struct tasklet_struct *t) { - struct ieee80211_local *local = (struct ieee80211_local *)data; + struct ieee80211_local *local = from_tasklet(local, t, + tx_pending_tasklet); unsigned long flags; int i; bool txok; diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 493420604..a25e47750 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -386,9 +386,10 @@ _ieee80211_wake_txqs(struct ieee80211_local *local, unsigned long *flags) rcu_read_unlock(); } -void ieee80211_wake_txqs(unsigned long data) +void ieee80211_wake_txqs(struct tasklet_struct *t) { - struct ieee80211_local *local = (struct ieee80211_local *)data; + struct ieee80211_local *local = from_tasklet(local, t, + wake_txqs_tasklet); unsigned long flags; spin_lock_irqsave(&local->queue_stop_reason_lock, flags); From patchwork Tue Oct 6 06:31:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D92A9C41604 for ; Tue, 6 Oct 2020 06:32:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 939CC206DD for ; Tue, 6 Oct 2020 06:32:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aMAV0F67" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbgJFGcj (ORCPT ); Tue, 6 Oct 2020 02:32:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGcj (ORCPT ); Tue, 6 Oct 2020 02:32:39 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83D3FC0613A7 for ; Mon, 5 Oct 2020 23:32:39 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id i3so1124384pjz.4 for ; Mon, 05 Oct 2020 23:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dSBvkQ431tgtAVSNo2oauDu6/vBwSLhYF4EkUxJ0he4=; b=aMAV0F67n3Olnqm1INlSqKjivWnxEZrUufowPMTupPGs1lRPaipUz/o8DDnkl/3sbX JditUKb9egn8DrdAoUv7rKSH6pYrc9cK2Lo89FXuEdnDihdch2QfF5Rsgj2Y+YJlVeDl YgaBN7v4/TPgcA3Qfh1d1QWBudog+ZqpmyVX4IQaF0KFrCDF/JqUGK9pPOxLVNd0D87m bQ2pyaJjdidJK4Z604871T6KEFi92v8is9NPhwKj14ljBnuBMQ9JBPs36JikCGme9cSn 1yjsR/24iJpu5U2UFGZp12Nu9ekTX5mlPWv+ZDgh4hE8Rm0rlZahnmSLRKSozASGQemm g+EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dSBvkQ431tgtAVSNo2oauDu6/vBwSLhYF4EkUxJ0he4=; b=muH9y2G1664sMJj1m5jx66wrsyjkQ6AhyEqOn1vtiloVV9qTzVYTJdMNWghLOzQLND QBmz5Fm9IWrob8G61/e2U/jzJJh14jv2JrWXRUNAjw4BEyrcu6y1vDx2xp6AkjvtXkKj 3ZR18VJ1go1AAq8SYbz/eK3LHo7/H38STK+5HxMMuLaSNJlhcU+r6ZeKfGToU8rbiD85 24D8+K6JVqJmAp6kvD03cetXGS2trznj2IqYVDb7vLazZ//GZkVryd8Fq1sTuYWQv4/5 odQNMJnVTgNHeAUrL0ugABVRx65S8LiXGKf8P3rYwkU+skBI/rHkFOZH7zeI5VPWDkxW iYpw== X-Gm-Message-State: AOAM530g7nbUf+GT0CutJf9jx/9dyasHBde/ghjxN+T1fqb/RvorDC+h RJr6HeilNZHBfx6mh2onE2A= X-Google-Smtp-Source: ABdhPJylSLs6FtK8IAY33LEnW83x9uCYBJhBPBHa4qkbi6qPBvBmFQB+ML7sDR9CBfpbErb/dvOaLw== X-Received: by 2002:a17:90a:6985:: with SMTP id s5mr191837pjj.17.1601965959167; Mon, 05 Oct 2020 23:32:39 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:38 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 4/8] net: mac802154: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:57 +0530 Message-Id: <20201006063201.294959-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais Acked-by: Stefan Schmidt --- net/mac802154/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/mac802154/main.c b/net/mac802154/main.c index 06ea0f8bf..520cedc59 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c @@ -20,9 +20,9 @@ #include "ieee802154_i.h" #include "cfg.h" -static void ieee802154_tasklet_handler(unsigned long data) +static void ieee802154_tasklet_handler(struct tasklet_struct *t) { - struct ieee802154_local *local = (struct ieee802154_local *)data; + struct ieee802154_local *local = from_tasklet(local, t, tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->skb_queue))) { @@ -91,9 +91,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops) INIT_LIST_HEAD(&local->interfaces); mutex_init(&local->iflist_mtx); - tasklet_init(&local->tasklet, - ieee802154_tasklet_handler, - (unsigned long)local); + tasklet_setup(&local->tasklet, ieee802154_tasklet_handler); skb_queue_head_init(&local->skb_queue); From patchwork Tue Oct 6 06:31:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268055 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22BE4C41604 for ; Tue, 6 Oct 2020 06:32:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6593207EA for ; Tue, 6 Oct 2020 06:32:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OYQ19+I4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbgJFGcr (ORCPT ); Tue, 6 Oct 2020 02:32:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGcq (ORCPT ); Tue, 6 Oct 2020 02:32:46 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3A34C0613A7 for ; Mon, 5 Oct 2020 23:32:46 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id y14so5185658pfp.13 for ; Mon, 05 Oct 2020 23:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9Y7zJU2kCbZKAArjljkENfIcG6YEkpi6fwiJlDpruSA=; b=OYQ19+I41LDUKYbof6ciYk1EPOHTnjAxQliKytHF/07da6TdFHaVSKtKoc+UE84EPR pU8Y18q2F36spChWBgSdVz7+2rLBSjRCxLM+lIfKgHAZ4wq92nOPIRC8lLz3V42G5fnR hoicWXex3QfISogdqAHgNcPQiKsJGVxqMAE6qHBhHQ+1VPHGwp9GmW5Qe3zz53iZEHWK Q21dsbdQW005auttkBI+cQ92B3HagSxM71jNGL13PGG57Bwnxye9iFKmrUz+WnXxB74R RExMNFwIexszb4DoDWcL4ycuLtEfhOcYcrpodgaiKftrLdNTVX7srFli3RNUFATxOoxW szlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9Y7zJU2kCbZKAArjljkENfIcG6YEkpi6fwiJlDpruSA=; b=gfi1j6TAdVQDY3x3nYhdGaSLofG4niFj6aGsd6mAny6HybDGB/ZfUtGs0lRN5+QjEJ 1KZIc+0UbLv+XgYP3AX7608bEcCt0tTDYtO6Jx5yQla+pgBo1QRwPyS00vNYWtcIzcBu FyAHDitZey9YimFovCOfCypdS2e22JF8chxBzHFukjCozVvIczmcOR4MesdVoRCOikGN WRAP/jEGa1Jwl0NesEQwxwWYc0rF6rIS3MJRLSY8VPLmKqtv5+Bw53FBIpEI+V9l4Ui7 WSMX4+I8J9beou6apUyjsWAyFmR5wXWeXlcKtIWgD+aduT58wDc1gv1y+4DFDnTVxAx1 a2jg== X-Gm-Message-State: AOAM530WMrz0hxqpEjMrMQO2YgY+JT+CgnY3b8RZwu1v/3iU85UJeSG/ 4eLaKUW9UAVQ2Y+zjMqPuYI= X-Google-Smtp-Source: ABdhPJymSgnW0qvFhcSrsSlDdgThns0sfOZW5DxgIJTwqwClbJwM8eetbJX9qnOMtsoeA+W9oOenQg== X-Received: by 2002:a63:d242:: with SMTP id t2mr2878576pgi.47.1601965966233; Mon, 05 Oct 2020 23:32:46 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:45 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 5/8] net: rds: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:58 +0530 Message-Id: <20201006063201.294959-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- net/rds/ib_cm.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 06603dd1c..396d6abf8 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -314,9 +314,9 @@ static void poll_scq(struct rds_ib_connection *ic, struct ib_cq *cq, } } -static void rds_ib_tasklet_fn_send(unsigned long data) +static void rds_ib_tasklet_fn_send(struct tasklet_struct *t) { - struct rds_ib_connection *ic = (struct rds_ib_connection *)data; + struct rds_ib_connection *ic = from_tasklet(ic, t, i_send_tasklet); struct rds_connection *conn = ic->conn; rds_ib_stats_inc(s_ib_tasklet_call); @@ -354,9 +354,9 @@ static void poll_rcq(struct rds_ib_connection *ic, struct ib_cq *cq, } } -static void rds_ib_tasklet_fn_recv(unsigned long data) +static void rds_ib_tasklet_fn_recv(struct tasklet_struct *t) { - struct rds_ib_connection *ic = (struct rds_ib_connection *)data; + struct rds_ib_connection *ic = from_tasklet(ic, t, i_recv_tasklet); struct rds_connection *conn = ic->conn; struct rds_ib_device *rds_ibdev = ic->rds_ibdev; struct rds_ib_ack_state state; @@ -1218,10 +1218,8 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) } INIT_LIST_HEAD(&ic->ib_node); - tasklet_init(&ic->i_send_tasklet, rds_ib_tasklet_fn_send, - (unsigned long)ic); - tasklet_init(&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv, - (unsigned long)ic); + tasklet_setup(&ic->i_send_tasklet, rds_ib_tasklet_fn_send); + tasklet_setup(&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv); mutex_init(&ic->i_recv_mutex); #ifndef KERNEL_HAS_ATOMIC64 spin_lock_init(&ic->i_ack_lock); From patchwork Tue Oct 6 06:31:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 988AEC41604 for ; Tue, 6 Oct 2020 06:32:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A2E3206DD for ; Tue, 6 Oct 2020 06:32:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pmJcPtsU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727125AbgJFGcx (ORCPT ); Tue, 6 Oct 2020 02:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGcx (ORCPT ); Tue, 6 Oct 2020 02:32:53 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4791AC0613A7 for ; Mon, 5 Oct 2020 23:32:53 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id g29so7436671pgl.2 for ; Mon, 05 Oct 2020 23:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h977mUiOPKts4NfGUd35JNFFBJWMeM5ufmmYLU83Tco=; b=pmJcPtsUAD7tafWpGLBMnUY+blMz9U/qoV9lD6c7FC4vcdbbTYkjlDyB9MZt/HojYl H0LtgXJGPQAd7UCWHbQGh89+Rti89k2pyhc+8IYnuSqdLUlMg7Cm0MCMfX2sJ9jZxG3e ho1yk5GXQQGl3VczV0lJWC17KG0shmZA73zPUsqBoNQO6mAOwJ92szQkrbzTh7yTA9A7 tpn8rz3/jnjBsZQ+dbxVOhs9GPQ/QFuB2nBMxn79MXH/Y4FzRRuflE2uccmB00RVtJ/d ZSTJ7w2XkJITyO3LeLxqWjjGajY/luqohmZ2AXbjb/e6mkhJ1tfGSgJYPaPXZ+gNgDc6 Wjrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h977mUiOPKts4NfGUd35JNFFBJWMeM5ufmmYLU83Tco=; b=GFAB56pphrliQHmPvWp4upRgibc0SW7OobgsYamG20kup7D3JasV1ZIicuCnTu9BCf ITzG+xfyO6KdJHTRuYSKhKrJwJ+0DXOwSjPb+pdWLA9+ewI+W8jqhZyprhH7IDk/Kxem cHMmTpZogU8Zg+7LW3gSJYNVDCZ0tOkbNH+kd0AljHhz1VoC3G9z5iXjdqq2cP0deJHd 8yhkF5h1aEy+VNoazZ5fVnw/YVLJ06Tc088UtNPBWJkUFUvT1elOd2EPxayQHKsquQNB wJr5sPIUTzjQS4Kg/cj7tG3FSqqFNJ4kEClhcMA8k0flWcetg6Rqd/YSlt2RBJdeiXaF ApOQ== X-Gm-Message-State: AOAM5318PLrcWmjKqIJnb5o5fulSUpdgILQ+kOY8Opgfmjm4VM6gzV6f x70VA0nPN8WQ9Dy5YeRMz3w= X-Google-Smtp-Source: ABdhPJxHDmhhv68PcuK12VN9RVfXtIyvwpv24/ulgfUPkeKKL6t9km6w1mrGiHBNuD9ttTI4kepoTw== X-Received: by 2002:a63:c74e:: with SMTP id v14mr2724527pgg.186.1601965972853; Mon, 05 Oct 2020 23:32:52 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:52 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 6/8] net: sched: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:01:59 +0530 Message-Id: <20201006063201.294959-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- net/sched/sch_atm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 1c281cc81..0a4452178 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -466,10 +466,11 @@ 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 = (struct Qdisc *)((char *) p - + QDISC_ALIGN(sizeof(struct Qdisc))); struct atm_flow_data *flow; struct sk_buff *skb; @@ -563,7 +564,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; } From patchwork Tue Oct 6 06:32:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 268054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97DEFC41604 for ; Tue, 6 Oct 2020 06:33:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58C6B20797 for ; Tue, 6 Oct 2020 06:33:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eskzh5dW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbgJFGdA (ORCPT ); Tue, 6 Oct 2020 02:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGdA (ORCPT ); Tue, 6 Oct 2020 02:33:00 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 295E4C0613A7 for ; Mon, 5 Oct 2020 23:33:00 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id bb1so721706plb.2 for ; Mon, 05 Oct 2020 23:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=by+tzajr9kAMTTEc6RsIBmmFCfwkhljdRZw/IZM0hSY=; b=eskzh5dWvjG6+E2R6ciSgoUDEB97DT55EbgwDyIVh3BhYreBcjyDdMDZTLJ+ir+yq3 8MFxqVIxUYfpp0zYdBFv3J7eNgTwiuaA3bX1N2A/OkKvL8Voaq23xTDbyaMHWtiCG6+a 3j4tX2+JtSCsR0U8cgJBKxCoCPsZ32VRw2hs7yHFI4OxwYr49xqAF/KhCElVr0KzMg7H iqQ5vDG6nn0TfDqiOObXSNSORp957rGn3SmZggcHXNyeHHWF4QqsINvQK7y6dQ+vptc0 THvtp9U+WWY0jYYnBb9hYqfUSjUUEZWz24QTYBgC3LvoZs9P86eVpcadj1XpZ32nTTgn kHSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=by+tzajr9kAMTTEc6RsIBmmFCfwkhljdRZw/IZM0hSY=; b=MAtHIOmKZ68y2wVkzIXPEY1mZEYH6w1qo0/jLMGGFv9jAkVCQga6r026R5jprCp26L PUdG/SOk+4OpjvopVGWPiG5kXK504wcacx85+kKvMykI3GSV+XYfqtXXrqtgkGeu1ln2 dJdvnp0jorNpIXJZtpxZRDHSR7mMz/LnQLYHZ+60EoEIOENOJT3AxWvBpSY0WtO7F0vF YuXUpV7NGjD6Re04tfmrTvlv9nsLy1GXi9rwDcLNH9vFCHgSwzMSXh6dZEeCkIc2paUk I67WuxvY420ZprShbnuaAIqJJpnguFjTwJHdrrLSBqyx4WI/9nHyf+aSAfzyQxDEOWO3 chEA== X-Gm-Message-State: AOAM531yYSrsXY5XtXFm7xeLtAh31eQoBgViE42cyiaAeiPDwvwmO+vB pVKn7aLgGPTGVK2dPKvhjrU= X-Google-Smtp-Source: ABdhPJxAfAF1kDCQ85LfpMOVmjV5GHgnq8jQTxupIhr6nmdNVrdLhuPHLWIqcgqJ9i5ilZPV+8H4KQ== X-Received: by 2002:a17:90b:118a:: with SMTP id gk10mr2753559pjb.218.1601965979739; Mon, 05 Oct 2020 23:32:59 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:32:59 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 7/8] net: smc: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:02:00 +0530 Message-Id: <20201006063201.294959-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- net/smc/smc_cdc.c | 6 +++--- net/smc/smc_wr.c | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c index b1ce6ccbf..f23f55805 100644 --- a/net/smc/smc_cdc.c +++ b/net/smc/smc_cdc.c @@ -389,9 +389,9 @@ static void smc_cdc_msg_recv(struct smc_sock *smc, struct smc_cdc_msg *cdc) * Context: * - tasklet context */ -static void smcd_cdc_rx_tsklet(unsigned long data) +static void smcd_cdc_rx_tsklet(struct tasklet_struct *t) { - struct smc_connection *conn = (struct smc_connection *)data; + struct smc_connection *conn = from_tasklet(conn, t, rx_tsklet); struct smcd_cdc_msg *data_cdc; struct smcd_cdc_msg cdc; struct smc_sock *smc; @@ -411,7 +411,7 @@ static void smcd_cdc_rx_tsklet(unsigned long data) */ void smcd_cdc_rx_init(struct smc_connection *conn) { - tasklet_init(&conn->rx_tsklet, smcd_cdc_rx_tsklet, (unsigned long)conn); + tasklet_setup(&conn->rx_tsklet, smcd_cdc_rx_tsklet); } /***************************** init, exit, misc ******************************/ diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index 1e23cdd41..cbc73a7e4 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -131,9 +131,9 @@ static inline void smc_wr_tx_process_cqe(struct ib_wc *wc) wake_up(&link->wr_tx_wait); } -static void smc_wr_tx_tasklet_fn(unsigned long data) +static void smc_wr_tx_tasklet_fn(struct tasklet_struct *t) { - struct smc_ib_device *dev = (struct smc_ib_device *)data; + struct smc_ib_device *dev = from_tasklet(dev, t, send_tasklet); struct ib_wc wc[SMC_WR_MAX_POLL_CQE]; int i = 0, rc; int polled = 0; @@ -435,9 +435,9 @@ static inline void smc_wr_rx_process_cqes(struct ib_wc wc[], int num) } } -static void smc_wr_rx_tasklet_fn(unsigned long data) +static void smc_wr_rx_tasklet_fn(struct tasklet_struct *t) { - struct smc_ib_device *dev = (struct smc_ib_device *)data; + struct smc_ib_device *dev = from_tasklet(dev, t, recv_tasklet); struct ib_wc wc[SMC_WR_MAX_POLL_CQE]; int polled = 0; int rc; @@ -698,10 +698,8 @@ void smc_wr_remove_dev(struct smc_ib_device *smcibdev) void smc_wr_add_dev(struct smc_ib_device *smcibdev) { - tasklet_init(&smcibdev->recv_tasklet, smc_wr_rx_tasklet_fn, - (unsigned long)smcibdev); - tasklet_init(&smcibdev->send_tasklet, smc_wr_tx_tasklet_fn, - (unsigned long)smcibdev); + tasklet_setup(&smcibdev->recv_tasklet, smc_wr_rx_tasklet_fn); + tasklet_setup(&smcibdev->send_tasklet, smc_wr_tx_tasklet_fn); } int smc_wr_create_link(struct smc_link *lnk) From patchwork Tue Oct 6 06:32:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 288946 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9738C41604 for ; Tue, 6 Oct 2020 06:33:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E07F207EA for ; Tue, 6 Oct 2020 06:33:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dPDR/JVQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727145AbgJFGdG (ORCPT ); Tue, 6 Oct 2020 02:33:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbgJFGdG (ORCPT ); Tue, 6 Oct 2020 02:33:06 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20042C0613A7 for ; Mon, 5 Oct 2020 23:33:06 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id 34so7405060pgo.13 for ; Mon, 05 Oct 2020 23:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eJt7odAAaoqJqWkvl4bKx65VokapE4qYrDJxFhJYjJA=; b=dPDR/JVQFZzCu+zBqWIXwHnMGUjjvBiTtV4F2YMhkbPGwapUbqqW4CHwIZXF4Od5qZ shjMNpsWSb8ZdbBCpE4WNX+srWsQvegWIH8CZh8YHq1/TcdHyigEwn7SZoqCNi/0sYQ6 kDNpJni/LBV3sFTbKj5RizoM69Pom+P0xO8XesRIQsSp7Idu6vSBtD2Fi6IhF14+cbmA zpMz5ibXQfyhPh1zFsyZ/1XvWETDcXLTOJAwCjYZtQIxwEbrISAD/VOjRdvZa/Osybjn LTV0n/7dvZaSLiE8Y04ViTbRZjjFJGgVfdG8CptgokB4aTyVGOr7QimbzmIUhAHsiTOK /zEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eJt7odAAaoqJqWkvl4bKx65VokapE4qYrDJxFhJYjJA=; b=P5Ues7E/0jot8xJyVMtr3M3hWviaqdbTDNEEcNVxNtHj+qThER3HyGt0EU5/NcZuao TxoNJbDJCB6Q9yDHOeyJQMsDztibFIfE2eEpv/8rra4UkyjJ3MjFa72mZO+06KSFrtab 4ZwoaCIpARo/6nY/mTsHGbCyl6RBY0mrMxSIIdUjngZOsb/BRzyE47D3eRh5kAB7MfEK TeYVSyGitgLT/PyWdn5o5CZrU4kjGJNHh4SSueUIUevSA0zSOowktxOQIbugU5Gzx5dz v6ekQhUKrRt8CLt4UnS8eB/PhpGesBs/PWbRqQGzDVp951S+IX3kwMlC3jnAn0irLBUP FSjw== X-Gm-Message-State: AOAM531EFLAva96qTQ1+/MRgyaSrR2QTdP+cVmzcwdjuVpwW6P4x9ZAj 9DTDMDlFnmwkQzAkyz6anp8= X-Google-Smtp-Source: ABdhPJwrn0Sk5bzuKiFaMzIWSSxKVjMXvMVanGsOBYlenrrJe1quGZxuHRtej9G7B68BRFvIpkbRzg== X-Received: by 2002:aa7:96fb:0:b029:152:879f:4782 with SMTP id i27-20020aa796fb0000b0290152879f4782mr2986303pfq.45.1601965985724; Mon, 05 Oct 2020 23:33:05 -0700 (PDT) Received: from localhost.localdomain ([49.207.203.202]) by smtp.gmail.com with ESMTPSA id 124sm2047361pfd.132.2020.10.05.23.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 23:33:05 -0700 (PDT) From: Allen Pais 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 , Romain Perier , Allen Pais Subject: [RESEND net-next 8/8] net: xfrm: convert tasklets to use new tasklet_setup() API Date: Tue, 6 Oct 2020 12:02:01 +0530 Message-Id: <20201006063201.294959-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201006063201.294959-1-allen.lkml@gmail.com> References: <20201006063201.294959-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Allen Pais --- net/xfrm/xfrm_input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 37456d022..be6351e3f 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -760,9 +760,9 @@ int xfrm_input_resume(struct sk_buff *skb, int nexthdr) } EXPORT_SYMBOL(xfrm_input_resume); -static void xfrm_trans_reinject(unsigned long data) +static void xfrm_trans_reinject(struct tasklet_struct *t) { - struct xfrm_trans_tasklet *trans = (void *)data; + struct xfrm_trans_tasklet *trans = from_tasklet(trans, t, tasklet); struct sk_buff_head queue; struct sk_buff *skb; @@ -818,7 +818,6 @@ void __init xfrm_input_init(void) trans = &per_cpu(xfrm_trans_tasklet, i); __skb_queue_head_init(&trans->queue); - tasklet_init(&trans->tasklet, xfrm_trans_reinject, - (unsigned long)trans); + tasklet_setup(&trans->tasklet, xfrm_trans_reinject); } }