Message ID | 20200929203459.759549699@linutronix.de |
---|---|
State | Awaiting Upstream |
Headers | show
Return-Path: <intel-wired-lan-bounces@osuosl.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=yiY42gne; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=3/6QNokw; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C1BgP5lW5z9sSn for <incoming@patchwork.ozlabs.org>; Wed, 30 Sep 2020 07:03:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8F6B587117; Tue, 29 Sep 2020 21:03:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2rS0IuQOLH-x; Tue, 29 Sep 2020 21:03:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9B9F3870B5; Tue, 29 Sep 2020 21:03:09 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D6A761BF36E for <intel-wired-lan@lists.osuosl.org>; Tue, 29 Sep 2020 20:35:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CABF68682B for <intel-wired-lan@lists.osuosl.org>; Tue, 29 Sep 2020 20:35:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vpU9AascCnGy for <intel-wired-lan@lists.osuosl.org>; Tue, 29 Sep 2020 20:35:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by whitealder.osuosl.org (Postfix) with ESMTPS id E936586806 for <intel-wired-lan@lists.osuosl.org>; Tue, 29 Sep 2020 20:35:43 +0000 (UTC) Message-Id: <20200929203459.759549699@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601411742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=9gno+yzKOdLMuJ9Xz4faTO6ILG5b04BLHvO+JheY75g=; b=yiY42gneBjiDDqh0Y79DvBn3YqjkNpXchXD4e5CBIFn2QkSAqgIMEPREJCO8X9Kq3D176D jFnHDZKvazk50QBJBdOtZSUcTqLU9VBRYM+WRqpysnukd6P6CkcgWCXDciWZ9Fu2SK0n2r 4Pcp0StXIFuSxY2o0/TgPe7hShkmc6K3lo6O03bsnZiTIIOco6NIHJIptMdz84OB67sc99 nLxCK/dvG4VTSg9AmFz2HwFCpVu/l5STefw3m1/13gKhUEDnfk12sH5lrgfP7r8oVQf5RH jQYhL5BVFTVjpLC6jnX5mj7/YIRaOAnJZAHVe6CAfHIiVAcZ+F6Ejyd1lc9AoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601411742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=9gno+yzKOdLMuJ9Xz4faTO6ILG5b04BLHvO+JheY75g=; b=3/6QNokwXiifx/c6QT6thjfpjkax60IAdQdnv3k6ZHYGzaNff0p7Z8rVmKlXH8pDtcCSsC 4g3HKTgLr4tZQcBA== Date: Tue, 29 Sep 2020 22:25:12 +0200 From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> References: <20200929202509.673358734@linutronix.de> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 29 Sep 2020 21:03:08 +0000 Subject: [Intel-wired-lan] [patch V2 03/36] net: Add netif_rx_any_context() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development <intel-wired-lan.osuosl.org> List-Unsubscribe: <https://lists.osuosl.org/mailman/options/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe> List-Archive: <http://lists.osuosl.org/pipermail/intel-wired-lan/> List-Post: <mailto:intel-wired-lan@osuosl.org> List-Help: <mailto:intel-wired-lan-request@osuosl.org?subject=help> List-Subscribe: <https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe> Cc: Andrew Lunn <andrew@lunn.ch>, Emmanuel Grumbach <emmanuel.grumbach@intel.com>, linux-doc@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Chris Snook <chris.snook@gmail.com>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Christian Benvenuti <benve@cisco.com>, Arend van Spriel <arend.vanspriel@broadcom.com>, Govindarajulu Varadarajan <_govind@gmx.com>, Vishal Kulkarni <vishal@chelsio.com>, Luca Coelho <luciano.coelho@intel.com>, Edward Cree <ecree@solarflare.com>, libertas-dev@lists.infradead.org, brcm80211-dev-list@cypress.com, brcm80211-dev-list.pdl@broadcom.com, Ping-Ke Shih <pkshih@realtek.com>, Johannes Berg <johannes.berg@intel.com>, Jonathan Corbet <corbet@lwn.net>, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Intel Linux Wireless <linuxwifi@intel.com>, Russell King <linux@armlinux.org.uk>, Matthew Wilcox <willy@infradead.org>, intel-wired-lan@lists.osuosl.org, Jakub Kicinski <kuba@kernel.org>, Martin Habets <mhabets@solarflare.com>, Ulrich Kunitz <kune@deine-taler.de>, Jay Cliburn <jcliburn@gmail.com>, Paul McKenney <paulmck@kernel.org>, Stanislaw Gruszka <stf_xl@wp.pl>, Jouni Malinen <j@w1.fi>, Hante Meuleman <hante.meuleman@broadcom.com>, Pascal Terjan <pterjan@google.com>, Amitkumar Karwar <amitkarwar@gmail.com>, Wright Feng <wright.feng@cypress.com>, Daniel Drake <dsd@gentoo.org>, Pensando Drivers <drivers@pensando.io>, Kalle Valo <kvalo@codeaurora.org>, Franky Lin <franky.lin@broadcom.com>, Solarflare linux maintainers <linux-net-drivers@solarflare.com>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Chi-Hsien Lin <chi-hsien.lin@cypress.com>, Xinming Hu <huxinming820@gmail.com>, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Ganapathi Bhat <ganapathi.bhat@nxp.com>, Stanislav Yakovlev <stas.yakovlev@gmail.com>, Jon Mason <jdmason@kudzu.us>, Shannon Nelson <snelson@pensando.io>, Dave Miller <davem@davemloft.net>, Luc Van Oostenryck <luc.vanoostenryck@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" <intel-wired-lan-bounces@osuosl.org> |
Series |
[V2,01/36] net: enic: Cure the enic api locking trainwreck
|
expand
|
--- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3785,6 +3785,7 @@ void generic_xdp_tx(struct sk_buff *skb, int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb); int netif_rx(struct sk_buff *skb); int netif_rx_ni(struct sk_buff *skb); +int netif_rx_any_context(struct sk_buff *skb); int netif_receive_skb(struct sk_buff *skb); int netif_receive_skb_core(struct sk_buff *skb); void netif_receive_skb_list(struct list_head *head); --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4841,6 +4841,21 @@ int netif_rx_ni(struct sk_buff *skb) } EXPORT_SYMBOL(netif_rx_ni); +int netif_rx_any_context(struct sk_buff *skb) +{ + /* + * If invoked from contexts which do not invoke bottom half + * processing either at return from interrupt or when softrqs are + * reenabled, use netif_rx_ni() which invokes bottomhalf processing + * directly. + */ + if (in_interrupt()) + return netif_rx(skb); + else + return netif_rx_ni(skb); +} +EXPORT_SYMBOL(netif_rx_any_context); + static __latent_entropy void net_tx_action(struct softirq_action *h) { struct softnet_data *sd = this_cpu_ptr(&softnet_data);