From patchwork Sun Mar 6 21:57:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770929 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01503C433EF for ; Sun, 6 Mar 2022 21:58:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234317AbiCFV7B (ORCPT ); Sun, 6 Mar 2022 16:59:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232146AbiCFV65 (ORCPT ); Sun, 6 Mar 2022 16:58:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A3011C10B; Sun, 6 Mar 2022 13:58:03 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D5mJtRIowvgYZCiSTq+NtxJb9H6gCqcNXdX+dpkXf+g=; b=cqZBGB7x5Qf0QYHo+lrfj9zTEh35gmXe4IkRFTr2FwoK2Z+iCLNL2qFOF9AIPb4DOq7Syo KEfmnSmGFyZImPECArA2blbT+kOUqQK59ZZ/j3uBIIt1znHhRB/JmA3Ped/7LMsS0nyeiJ fb4WL8jPeInCtkmc6zDyfTlob4YFJmf0s4YS1vD+68NjiTY3jGcxYzR5M188zxw5T/BU2l HSb/F2r+LkO89MBxyZrbdglxLJo35vKaNYITYIgsjP6nNw6nyhbdJblkLmrJblF0ZvZvbz i5Uj0vP/Mp3dRBnyua7snpkFXoGNGgFuRhaXB58sRpSK+TKOVBnMSIlz6Zyk0A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D5mJtRIowvgYZCiSTq+NtxJb9H6gCqcNXdX+dpkXf+g=; b=HBtNd4/Tyx6e/nI6Vj+ACCCp8y6y2dvib57iQ0IhcmSk4+J0KPZZxJ/NgdMfe9pxAEe9bQ Y7XCwMu1K4SkqxCw== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Alexander Gordeev , Alexandra Winter , Christian Borntraeger , Heiko Carstens , Sven Schnelle , Vasily Gorbik , Wenjia Zhang , linux-s390@vger.kernel.org Subject: [PATCH net-next 01/10] s390: net: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:44 +0100 Message-Id: <20220306215753.3156276-2-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Alexander Gordeev Cc: Alexandra Winter Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Wenjia Zhang Cc: linux-s390@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/s390/net/ctcm_main.c | 2 +- drivers/s390/net/netiucv.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 5ea7eeb07002b..e0fdd54bfeb70 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -166,7 +166,7 @@ void ctcm_unpack_skb(struct channel *ch, struct sk_buff *pskb) ch->logflags = 0; priv->stats.rx_packets++; priv->stats.rx_bytes += skblen; - netif_rx_ni(skb); + netif_rx(skb); if (len > 0) { skb_pull(pskb, header->length); if (skb_tailroom(pskb) < LL_HEADER_LENGTH) { diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 981e7b1c6b962..65aa0a96c21de 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c @@ -620,11 +620,7 @@ static void netiucv_unpack_skb(struct iucv_connection *conn, pskb->ip_summed = CHECKSUM_UNNECESSARY; privptr->stats.rx_packets++; privptr->stats.rx_bytes += skb->len; - /* - * Since receiving is always initiated from a tasklet (in iucv.c), - * we must use netif_rx_ni() instead of netif_rx() - */ - netif_rx_ni(skb); + netif_rx(skb); skb_pull(pskb, header->next); skb_put(pskb, NETIUCV_HDRLEN); } From patchwork Sun Mar 6 21:57:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770926 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90F1DC43219 for ; Sun, 6 Mar 2022 21:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234308AbiCFV66 (ORCPT ); Sun, 6 Mar 2022 16:58:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234299AbiCFV65 (ORCPT ); Sun, 6 Mar 2022 16:58:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A1CB1C109 for ; Sun, 6 Mar 2022 13:58:03 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8+8slx61Q8ToDW/o7PkKsmbPNBa/MZR5vMCzY38Lg1o=; b=vUJZxxDBgM2VdN+goCbz4yIobXy4EQgbm2MLvmROnqEbgh43Vb42YKYNixYiNnLCXCXt/9 el1Av0rlAuyIeAIVL6rV+91AG+L3vZ6IvgySMmYPt/H87Ig/lxLSQ0J8hhtAgC5LcdQUPP KpRwAeszXQU48C2Ld4aUmY5lvjavnvglphtD51CT7GQRZE92oSkC1EiEMohuLdpQoHxQi9 Fhg8DhVjYv4aNLL0sI7NjiYD97obUGprsdBFYlV0jyFfEHL/500OfXNY933ztlu602N8in KBTzziTLBAI3ZVUaw/8AV4r+xq+x8LUIZzJmgrqRECOS0A6nS9f7t+s4XDOzeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8+8slx61Q8ToDW/o7PkKsmbPNBa/MZR5vMCzY38Lg1o=; b=nDXUPYWsiHR6mBDu90JfZc4ZVCJtFHHkVaT+NfY43fAFi4X6phsuZMFSVL6rhrLzeNeTpH 6C8rWOUmy7LGGUAw== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Greg Kroah-Hartman , linux-staging@lists.linux.dev Subject: [PATCH net-next 02/10] staging: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:45 +0100 Message-Id: <20220306215753.3156276-3-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Sebastian Andrzej Siewior Acked-by: Greg Kroah-Hartman --- drivers/staging/gdm724x/gdm_lte.c | 2 +- drivers/staging/wlan-ng/p80211netdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index 493ed4821515b..2587309da766a 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -78,7 +78,7 @@ static int gdm_lte_rx(struct sk_buff *skb, struct nic *nic, int nic_type) { int ret; - ret = netif_rx_ni(skb); + ret = netif_rx(skb); if (ret == NET_RX_DROP) { nic->stats.rx_dropped++; } else { diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 255500448ad3e..e04fc666d218e 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -255,7 +255,7 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev, if (skb_p80211_to_ether(wlandev, wlandev->ethconv, skb) == 0) { wlandev->netdev->stats.rx_packets++; wlandev->netdev->stats.rx_bytes += skb->len; - netif_rx_ni(skb); + netif_rx(skb); return 0; } @@ -290,7 +290,7 @@ static void p80211netdev_rx_bh(struct tasklet_struct *t) dev->stats.rx_packets++; dev->stats.rx_bytes += skb->len; - netif_rx_ni(skb); + netif_rx(skb); continue; } else { if (!p80211_convert_to_ether(wlandev, skb)) From patchwork Sun Mar 6 21:57:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770925 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDE0BC433EF for ; Sun, 6 Mar 2022 21:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234304AbiCFV65 (ORCPT ); Sun, 6 Mar 2022 16:58:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234301AbiCFV65 (ORCPT ); Sun, 6 Mar 2022 16:58:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D0D1C102 for ; Sun, 6 Mar 2022 13:58:03 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K0A40sGXSRXBIm7epRwU25Rvbpc3NJ/QFvvpPO+JWnM=; b=MJT+IlSxOt0Q5cbBneFz70HzYhBF/q5/fcNy7odowpkGrlhx+MB79l1Xhf3+sDi8jQs3TO zRECftZke/Km7d3zN+hj+QP4TVP3UvL9LH0gXx3muWy3P4WaX5kP8BsozvdNo0rzHGHOYi CZyP4dPEWtpLjeAC3BUJ8kH1NSYNVN2t48nD0aFrg/BepF7ZwsngonTBpr3QzIiLhlnGko TOEntLzL0eK6rsD8xIinITSy/S42uDs5x8oG2afr+FVg6ovSzOul0c9spCDEwVf/SWnxG8 RPIIuQh4SxJ3TK43QxS0mZJ9qVo2uaB6lBhJ3m6JkSM5a+FtgmqJMfIeQlm10A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K0A40sGXSRXBIm7epRwU25Rvbpc3NJ/QFvvpPO+JWnM=; b=z+BcvCChAI3dfQcKFNSXwQKoXVGF4WKW2VBPrBM/VtGuu+Bg8lefct0LU08UYL38lF19Ub QDT80wzgskVXcQCQ== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior Subject: [PATCH net-next 03/10] tun: vxlan: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:46 +0100 Message-Id: <20220306215753.3156276-4-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/tun.c | 2 +- drivers/net/vxlan/vxlan_core.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index bab92e489fba9..2b9a22669a126 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1984,7 +1984,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, } else if (!IS_ENABLED(CONFIG_4KSTACKS)) { tun_rx_batched(tun, tfile, skb, more); } else { - netif_rx_ni(skb); + netif_rx(skb); } rcu_read_unlock(); diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 4ab09dd5a32a3..b3cbd37c4b939 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -1877,7 +1877,7 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni) reply->ip_summed = CHECKSUM_UNNECESSARY; reply->pkt_type = PACKET_HOST; - if (netif_rx_ni(reply) == NET_RX_DROP) { + if (netif_rx(reply) == NET_RX_DROP) { dev->stats.rx_dropped++; vxlan_vnifilter_count(vxlan, vni, NULL, VXLAN_VNI_STATS_RX_DROPS, 0); @@ -2036,7 +2036,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni) if (reply == NULL) goto out; - if (netif_rx_ni(reply) == NET_RX_DROP) { + if (netif_rx(reply) == NET_RX_DROP) { dev->stats.rx_dropped++; vxlan_vnifilter_count(vxlan, vni, NULL, VXLAN_VNI_STATS_RX_DROPS, 0); From patchwork Sun Mar 6 21:57:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770927 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F29C43217 for ; Sun, 6 Mar 2022 21:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234314AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234300AbiCFV65 (ORCPT ); Sun, 6 Mar 2022 16:58:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A5281C118 for ; Sun, 6 Mar 2022 13:58:03 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W9cdLUSBzKzIxbqvnVCPgL2/NiTojReRgkN+vme6rGk=; b=2q4dwW+ByIaFnJEu1CqO0348oukbvEYpTeM9vevhZvlTiXTYM+bpszdHx7VSTGxZtSLYd9 Z3+YZL9XzDBjXb3hVTpp3m8Q7ZZfCKW0TJyVVtkWYlVgMANYUnbT0Io7efJnrZsALTw/l0 sljouQH90t3OuqnwFZVqxFc8NLm4ILY6gUwgGvp9oF3GBRQ7f1Z/59lmGnT1mU9w44Ml8P xxz16z8svQTfVLKz922EEwqOq8DR6NMuU0ACvAxE4knD8osM5r7QGaNUlvWRysR6J0zUY/ MkSxI1ti2eTD1xmRkekdlc3VhdwLr4NxLh2gI8Xxtl4EFAP9LHX5bk2XQW0MTw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W9cdLUSBzKzIxbqvnVCPgL2/NiTojReRgkN+vme6rGk=; b=jHytMEK4aEWdCGBVLFns/d6p0Dvd4Tr4rOLJg/VlqjeKYmQTFfIzjyqU6bondxKq+ave9Z QublXVTjWscGLrCQ== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Jon Maloy , Ying Xue , tipc-discussion@lists.sourceforge.net Subject: [PATCH net-next 04/10] tipc: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:47 +0100 Message-Id: <20220306215753.3156276-5-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Jon Maloy Cc: Ying Xue Cc: tipc-discussion@lists.sourceforge.net Signed-off-by: Sebastian Andrzej Siewior --- net/tipc/bearer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 473a790f58943..9dfe2bdf14828 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -768,7 +768,7 @@ void tipc_clone_to_loopback(struct net *net, struct sk_buff_head *pkts) skb->pkt_type = PACKET_HOST; skb->ip_summed = CHECKSUM_UNNECESSARY; skb->protocol = eth_type_trans(skb, dev); - netif_rx_ni(skb); + netif_rx(skb); } } From patchwork Sun Mar 6 21:57:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770932 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF0E1C433EF for ; Sun, 6 Mar 2022 21:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234335AbiCFV7I (ORCPT ); Sun, 6 Mar 2022 16:59:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234311AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B2A1EAD5 for ; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HfjELwPcooFKFLjxQkftJyRT5nPeVL034Dgm8E9kFI0=; b=wTc1eDzoo86+fYdTrurDLL7JqCRg55ir9drOfBbYa4UwX4xn5WJVPfiDpTBis4hjtdlOaf mkD11APb0AYhaLkLqivvwer4UTTdeAAELGwTPAupbJOuGAG0GMI2gWoFaCGisVOvCUKTNa zSNGAW6MKQc98i6Kpv+xtffHsmAipW2Jnb7XzCEKFEUhCS0eYYUZdpmF/hfxZTonHo2cj3 SRypbAyuYJ1vfP9XCr48wfaSs7MrLdXAB39mVa0ltZ+pzbPUqh6jCJukaEDgUihezsWf73 4yMS8Z+1RUNxVqHZKoDncJbkDKvA9sGUIAGetr35Iz53WUmJuCM8EcK09PHaeg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HfjELwPcooFKFLjxQkftJyRT5nPeVL034Dgm8E9kFI0=; b=JGcAHoyDvUtFmx844ZkwTsngjB3p9s0CBLR5sBR+Ziw0UZL6a9gkQx+RvjE4Z91Uvuh4ui RuN9AJo9VNuwQwCg== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Antonio Quartulli , Marek Lindner , Simon Wunderlich , Sven Eckelmann , b.a.t.m.a.n@lists.open-mesh.org Subject: [PATCH net-next 05/10] batman-adv: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:48 +0100 Message-Id: <20220306215753.3156276-6-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Antonio Quartulli Cc: Marek Lindner Cc: Simon Wunderlich Cc: Sven Eckelmann Cc: b.a.t.m.a.n@lists.open-mesh.org Signed-off-by: Sebastian Andrzej Siewior Acked-by: Sven Eckelmann --- net/batman-adv/bridge_loop_avoidance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 337e20b6586d3..7f8a14d99cdb0 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c @@ -444,7 +444,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, const u8 *mac, batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES, skb->len + ETH_HLEN); - netif_rx_any_context(skb); + netif_rx(skb); out: batadv_hardif_put(primary_if); } From patchwork Sun Mar 6 21:57:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770930 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E31C5C433EF for ; Sun, 6 Mar 2022 21:58:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234327AbiCFV7G (ORCPT ); Sun, 6 Mar 2022 16:59:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234307AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2705B1C10B; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GUAFLtBHk3izDc+rmSdg92znyPU6liBmxT8d8PGetHs=; b=rYdczkJh2CASqGnjEpRaDZxqFGsinymVnuAfLziYMDLf1xW4Zm0Ze0XYuBvMOTJGirMVo9 e7mzhJLE2z6LUURwziGfYPGncgQPGzNz3uuFDl463FPDHWP2x1dzrbxN5oHBOJU81wEcyX h0wpHP9/eSk8Op5SCVCtqqItDhDfKGnMs3BRlciDR7tks+ctZ/p8TyvpJC/1XBO+8wEtyq pZ7C3nNy8Zeb1QoIScQ30VXKXJHmDA7uMjEw1hy7x8k8cnDCuzNq1SsludiDqHy+ab/qYQ bANBxPEdmI7xH/Qfb7HcDpV2Y3eBe83Hx5oWf1A726pdNzQSyjjR5I74OkN33Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GUAFLtBHk3izDc+rmSdg92znyPU6liBmxT8d8PGetHs=; b=UtGxE3dwa4y8CFV8SsT+yVUee/GX7lk1veoy0vYYDN0/uSEjawm8HDCwrpNHcBKlLFnnDj igae4+EeuvLrgpDA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Subject: [PATCH net-next 06/10] bluetooth: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:49 +0100 Message-Id: <20220306215753.3156276-7-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- net/bluetooth/6lowpan.c | 2 +- net/bluetooth/bnep/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 8e8c075411530..215af9b3b5895 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -240,7 +240,7 @@ static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev) if (!skb_cp) return NET_RX_DROP; - return netif_rx_ni(skb_cp); + return netif_rx(skb_cp); } static int iphc_decompress(struct sk_buff *skb, struct net_device *netdev, diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index 40baa6b7321ae..5a6a49885ab66 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -400,7 +400,7 @@ static int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb) dev->stats.rx_packets++; nskb->ip_summed = CHECKSUM_NONE; nskb->protocol = eth_type_trans(nskb, dev); - netif_rx_ni(nskb); + netif_rx(nskb); return 0; badframe: From patchwork Sun Mar 6 21:57:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770931 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0978C433FE for ; Sun, 6 Mar 2022 21:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234324AbiCFV7H (ORCPT ); Sun, 6 Mar 2022 16:59:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234313AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD311EAD9 for ; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lqJLFzMNwUI3glsCEQzZp1FtzCGUjUGLW4CKX1XCqNI=; b=RkLwUXbPJ0v9vXqgSyrjLDGj8Zi1OEqtc/K/ulwy4tWnSxC1xv8/DK5a3CDqmn24vY74d/ 9DbgdknvIY+vxL6qCNq6sQkgtVVUaJ9ZbHUF+l8flEylzkg48O1U8eprgQhMEQ0Hwa9sHk BZ8z2YonjP5+paNiafmHrZ7bffRcJSmMfiwUrrRv6x0mFvn2zMGVlemV5vrJ65LhHrpv/J JlsMmgRAAwiPvii71HXMIoVUBjguIOg9DSjMErZIWi50vEWd2GKkwENb3oHq4QxwR6SB4L 179sUqJQ7sLUv04idsudzOg32RP9Q0/GPcVVS1/47WRPpaQCdS0TVomJT8ZAJg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lqJLFzMNwUI3glsCEQzZp1FtzCGUjUGLW4CKX1XCqNI=; b=IS6+ufh2RIcEndcRg533gv94BbnaEgxb9vVYSfXKbJlwUYEop7DF85NRNVxrNKLAMVgMln s+jKYy9el330gUCw== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Remi Denis-Courmont Subject: [PATCH net-next 07/10] phonet: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:50 +0100 Message-Id: <20220306215753.3156276-8-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Remi Denis-Courmont Signed-off-by: Sebastian Andrzej Siewior Acked-by: RĂ©mi Denis-Courmont --- net/phonet/af_phonet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 65218b7ce9f94..2b582da1e88c0 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c @@ -146,7 +146,7 @@ EXPORT_SYMBOL(phonet_header_ops); * Prepends an ISI header and sends a datagram. */ static int pn_send(struct sk_buff *skb, struct net_device *dev, - u16 dst, u16 src, u8 res, u8 irq) + u16 dst, u16 src, u8 res) { struct phonethdr *ph; int err; @@ -182,7 +182,7 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, if (skb->pkt_type == PACKET_LOOPBACK) { skb_reset_mac_header(skb); skb_orphan(skb); - err = (irq ? netif_rx(skb) : netif_rx_ni(skb)) ? -ENOBUFS : 0; + err = netif_rx(skb) ? -ENOBUFS : 0; } else { err = dev_hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL, skb->len); @@ -214,7 +214,7 @@ static int pn_raw_send(const void *data, int len, struct net_device *dev, skb_reserve(skb, MAX_PHONET_HEADER); __skb_put(skb, len); skb_copy_to_linear_data(skb, data, len); - return pn_send(skb, dev, dst, src, res, 1); + return pn_send(skb, dev, dst, src, res); } /* @@ -269,7 +269,7 @@ int pn_skb_send(struct sock *sk, struct sk_buff *skb, if (!pn_addr(src)) src = pn_object(saddr, pn_obj(src)); - err = pn_send(skb, dev, dst, src, res, 0); + err = pn_send(skb, dev, dst, src, res); dev_put(dev); return err; From patchwork Sun Mar 6 21:57:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770934 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B0BAC433F5 for ; Sun, 6 Mar 2022 21:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234337AbiCFV7L (ORCPT ); Sun, 6 Mar 2022 16:59:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234315AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86DC41EAE2 for ; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Uz2IIPVuQKx3/pILSWn2S3QDmjUlhowGxJ2Zh1uUMFI=; b=2xiEY5r1xWUPLU1Ez7MHaa7p+BlM+YQrythV/rPkE+xzTr2NV7XaUzXDOs4EOGbMjHRIwc 0QBPE5yIiGanmcTpUXAIpZHacz3qRADeAa82Ei4wyoWISrm0hbidneJokp7dDdfOTQnJfD T7EhV34NLpwitsLGD7ThDN1sVhuxIlieclBmVKhg538e7bdBXoN3kQkginY8eEuIYS0S9k z4wcCYyop1z1T1VMoRV1RWOhwuHOkwEbPHUImNexwV09SPVOVedEK98BqVa5DBEr6Wgpo3 Uj0saDhhN2SyUIEm5z+SHlWUMWAb8l4XDgT/e+oPDdz0hdDVGon2XKlC7162Qg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Uz2IIPVuQKx3/pILSWn2S3QDmjUlhowGxJ2Zh1uUMFI=; b=yAUAfeynSwNpESFRooUndNnL9K2soJd3M0YjFPwt3h3ofzI9wPabZ2GIRSiKeeoGQZ3iIQ xjtqBHzvSC/aUMAQ== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Andrew Lunn , Heiner Kallweit , Russell King , Divya Koppera Subject: [PATCH net-next 08/10] net: phy: micrel: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:51 +0100 Message-Id: <20220306215753.3156276-9-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Cc: Divya Koppera Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/phy/micrel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 81a76322254c5..cbae1524a420f 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2045,7 +2045,7 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv, memset(shhwtstamps, 0, sizeof(*shhwtstamps)); shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds, rx_ts->nsec); - netif_rx_ni(skb); + netif_rx(skb); list_del(&rx_ts->list); kfree(rx_ts); @@ -2398,7 +2398,7 @@ static bool lan8814_match_skb(struct kszphy_ptp_priv *ptp_priv, shhwtstamps = skb_hwtstamps(skb); memset(shhwtstamps, 0, sizeof(*shhwtstamps)); shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds, rx_ts->nsec); - netif_rx_ni(skb); + netif_rx(skb); } return ret; From patchwork Sun Mar 6 21:57:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770935 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95DBAC433FE for ; Sun, 6 Mar 2022 21:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234320AbiCFV7M (ORCPT ); Sun, 6 Mar 2022 16:59:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234312AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E2981EADA for ; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uU3/xqrT6VpNeRDdI0G1J3j5XIM973IR+jmWqft55Jo=; b=E6yE8yCFRJ0p5f/1FNBSxASrusV53DDpD9XhfL3+TIS3CwRu/ftiw400u5RtgkVvnJIdrf R7KkxKIV4MsdAQHa5t6x5rzJXUVnt/TniWWLkC0sjSJ8FtLZmOxp9ryjmPlNeK5zP0WY1v RWxYOjXhEYHSTH3YubXYM6zMU1ilT2BUM0jUB9bffCbPN28zZhuIHjdVT5v9ULvDCrtOhV GZwQ2ODMsCXDUCsV4uoh747vqUWWZmcXsdCBZgfb2eHtrpUpOVXMULx5VFW6ONu/UlwR5m ikhD4N2fUmgFNWbzOkgXbjWWdw0rLxLpZf223wsugM4H6MKu/wj1TkSn7YsZ2A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uU3/xqrT6VpNeRDdI0G1J3j5XIM973IR+jmWqft55Jo=; b=hE10roVYp7dWnGFVAFXFVmmR4XzuZ8z9a3TVH7uH4p/5JKJ+dciuwTRarq9ywTAhkBoYfw bz24zWy4ZB8+g9AA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior Subject: [PATCH net-next 09/10] net: Remove netif_rx_any_context() and netif_rx_ni(). Date: Sun, 6 Mar 2022 22:57:52 +0100 Message-Id: <20220306215753.3156276-10-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Remove netif_rx_any_context and netif_rx_ni() because there are no more users in tree. Signed-off-by: Sebastian Andrzej Siewior --- include/linux/netdevice.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 19a27ac361efb..29a850a8d4604 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3718,16 +3718,6 @@ int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb); int netif_rx(struct sk_buff *skb); int __netif_rx(struct sk_buff *skb); -static inline int netif_rx_ni(struct sk_buff *skb) -{ - return netif_rx(skb); -} - -static inline int netif_rx_any_context(struct sk_buff *skb) -{ - return netif_rx(skb); -} - int netif_receive_skb(struct sk_buff *skb); int netif_receive_skb_core(struct sk_buff *skb); void netif_receive_skb_list_internal(struct list_head *head); From patchwork Sun Mar 6 21:57:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770933 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A2D0C4332F for ; Sun, 6 Mar 2022 21:58:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234336AbiCFV7I (ORCPT ); Sun, 6 Mar 2022 16:59:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232146AbiCFV7E (ORCPT ); Sun, 6 Mar 2022 16:59:04 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C4701EAEE for ; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9iqhR7wOpt14o8SWxa1auGl70g18S7XMunJngf1hH6w=; b=4G1Pj9C2ssAnDu0dt9ay0bzrkLLTHZEGoPAG9gpy+OBiZKJOe8f7NIqe/sG/zNfQ6CR+a3 QNviUe+qKnyuRiMjGXOCkVH2UpwCNw6OVjAwtn+r6CmYv2EC+HsOmVDsUpCtCXXcwqXK0x J+hf6/JOR2reUnc0p/8GIUxos37bFdsjrYKJyfROiEZEkibkM4RPbXD3/gy86TzXjTg5rV NtU4WOSS9LQNb44cL+rOoQdiQMiribA3jgFdhUSymwTVqjU3BkkpD4wBV3aCyYW3rIk1jO J/EcCVJCl/6dqGHeN9M9TZ6EHiB6fWqSkFhxk8brqnIX+tadr/QO3jbysuQJ3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9iqhR7wOpt14o8SWxa1auGl70g18S7XMunJngf1hH6w=; b=cXqE1GNSEwbpSBnIlRMOIZsz5wur+bghVFzjOFPrHfeycTBphzw1nyROiR5QZJhCOmt0f5 Ay+S3B3pTtkngWAQ== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Andrew Lunn , Heiner Kallweit , Russell King , Divya Koppera Subject: [PATCH net-next 10/10] net: phy: micrel: Move netif_rx() outside of IRQ-off section. Date: Sun, 6 Mar 2022 22:57:53 +0100 Message-Id: <20220306215753.3156276-11-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org lan8814_match_rx_ts() invokes netif_rx() with disables interrupts outside which will create a warning. Invoking netif_rx_ni() with disabled interrupts is wrong even without the recent rework because netif_rx_ni() would enable interrupts while processing the softirq. This in turn can lead to dead lock if an interrupts triggers and attempts to acquire kszphy_ptp_priv::rx_ts_lock. Move netif_rx() outside the IRQ-off section. Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Cc: Divya Koppera Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/phy/micrel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index cbae1524a420f..ce3992383766d 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2045,8 +2045,6 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv, memset(shhwtstamps, 0, sizeof(*shhwtstamps)); shhwtstamps->hwtstamp = ktime_set(rx_ts->seconds, rx_ts->nsec); - netif_rx(skb); - list_del(&rx_ts->list); kfree(rx_ts); @@ -2055,6 +2053,8 @@ static bool lan8814_match_rx_ts(struct kszphy_ptp_priv *ptp_priv, } spin_unlock_irqrestore(&ptp_priv->rx_ts_lock, flags); + if (ret) + netif_rx(skb); return ret; }