From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C817CE784BC for ; Mon, 2 Oct 2023 15:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6TAd18YRc/gIfb4ERvJbbekABJd4UFV2R0EWlZpTgX8=; b=bxiyxRpvpdWxdI NBBt70BevRIxFe89SinQ9SxadApRNTXlTl8B/3sMm7kj5zUUuxtjTn1EBS+07RgJhNBC7di4q0qkk WMTl+UWNtgAMOIAOoTvtZLLFIvrbC0D/ENcRDxDqT9pmE33Qf2OHPKn9PHQLmOgzuefzON9qcIN5/ Jv+oukQjMEq94VTklnCDUKfBILM6vDhXRjepIHZ5hmIdHCXWmHjMJB/+wR4oHOQvmXQOTFjRq4+Bk Zei5g7tC8RcBHAPoRNwFxolMWjI0pxIqqPpCYlrEBntb70m8GP1EVfcZGw/UwO5vOfQ2hbT39T3oM u7gRyz0yQBaPAJUBuyZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnKZJ-00CwnH-2p; Mon, 02 Oct 2023 15:10:45 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnKZE-00CwjS-0a; Mon, 02 Oct 2023 15:10:41 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-405417465aaso158484815e9.1; Mon, 02 Oct 2023 08:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696259439; x=1696864239; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0xSoAm+ROAl+uYnsbqkuF+kzUuWhCjT5vlITwi8Kq2Y=; b=lXE7mTg3k5n/uLwS6W6C7Ubcl2Oh+PXtPr032W0oRbRsgT67sRzG8FIxcoKRf1YGW+ HwyNwwTv/HdjrlophyyOpILq5loO5A0TasWkdMz3gJD0Y8co7NRRAkGxETUhWpGHK1cs +EI/892tSIK1GJRRkeQbUJIz47e4mltaOcSMGkAkTWFYTfF21q8aat8G/f1hGGsdlVHG 9pa6LQEK35W9nNL5Yyb2SA3ZHCXoOOuxnfNaNY2fCTMTQYrCauer6io3Cz+HMskRg5NI KWgE3Oo46opgo2vCzC9S5allIzynlzW2mrjsLCKdNS1stOahJ9Gu5dkYm04K5IBPx4fZ +w/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696259439; x=1696864239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0xSoAm+ROAl+uYnsbqkuF+kzUuWhCjT5vlITwi8Kq2Y=; b=U964YGiErwEVpA2i4xbrgfMMtkF5/tJD6QU+Mb4Ciu9EkIWI8EZlnKC/yiWqoFAmDL PwDlJ5mAfTbytaj7HMg+JgROZKR3fMva/21glPItqULfPNS2XqtYyV3Amyy/kC3YkLqK 5SwZjy0zoV3aINriVwDdxlZg0eBf49E+3v3Mim/GAcN1dyq/ZKnWWaw4VzmHHBcUgP/z LR4Nx28S4WPu0ElvYFWbFDqmT2VGMszzIhPiifGUFrTu5mWf/dchdNaP7kyPaB+WIk8V m9bYw2sW35OgbYC84OrLCk8qn/IBU6bPpSIeI6gs4cxE9UXYvQmA15Hg8Mad1Hhcd9lo xfHA== X-Gm-Message-State: AOJu0Yy5NsVJTy+vJ5KvvZhbumHH6DRyZKdCwKQptNWDZRx4cc95qKra dsgH7YanDZr9P5haEjdWTKo= X-Google-Smtp-Source: AGHT+IEEZGlFjpx8lLo9tvllSBQ9uSdgJbt7Jo8+TnnbkK3MrDUsxRAVP26IXHgFIeF3CU+ec1ay4w== X-Received: by 2002:a05:600c:5007:b0:405:315f:e676 with SMTP id n7-20020a05600c500700b00405315fe676mr10563085wmr.3.1696259438602; Mon, 02 Oct 2023 08:10:38 -0700 (PDT) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id t15-20020a1c770f000000b00406408dc788sm7421565wmi.44.2023.10.02.08.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 08:10:37 -0700 (PDT) From: Christian Marangi To: Jason Gunthorpe , Leon Romanovsky , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chris Snook , Raju Rangoju , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Douglas Miller , Nick Child , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Haren Myneni , Rick Lindsley , Dany Madden , Thomas Falcon , Tariq Toukan , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Krzysztof Halasa , Kalle Valo , Jeff Johnson , Gregory Greenman , Chandrashekar Devegowda , Intel Corporation , Chiranjeevi Rapolu , Liu Haijun , M Chetan Kumar , Ricardo Martinez , Loic Poulain , Sergey Ryazanov , Johannes Berg , Christian Marangi , Yuanjun Gong , Wei Fang , Alex Elder , Simon Horman , Rob Herring , Bailey Forrest , "Gustavo A. R. Silva" , Junfeng Guo , Ziwei Xiao , Thomas Gleixner , Rushil Gupta , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Yuri Karpov , Zhengchao Shao , Andrew Lunn , Zheng Zengkai , "Rafael J. Wysocki" , Lee Jones , Dawei Li , Hans de Goede , Benjamin Berg , Anjaneyulu , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [net-next PATCH 2/4] netdev: make napi_schedule return bool on NAPI successful schedule Date: Mon, 2 Oct 2023 17:10:21 +0200 Message-Id: <20231002151023.4054-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231002151023.4054-1-ansuelsmth@gmail.com> References: <20231002151023.4054-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231002_081040_226733_4009DC91 X-CRM114-Status: GOOD ( 13.26 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+ath10k=archiver.kernel.org@lists.infradead.org Change napi_schedule to return a bool on NAPI successful schedule. This might be useful for some driver to do additional step after a NAPI ahs been scheduled. Signed-off-by: Christian Marangi --- include/linux/netdevice.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7e520c14eb8c..2bead8e2a14d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -490,11 +490,18 @@ bool napi_schedule_prep(struct napi_struct *n); * * Schedule NAPI poll routine to be called if it is not already * running. + * Return true if we schedule a NAPI or false if not. + * Refer to napi_schedule_prep() for additional reason on why + * a NAPI might not be scheduled. */ -static inline void napi_schedule(struct napi_struct *n) +static inline bool napi_schedule(struct napi_struct *n) { - if (napi_schedule_prep(n)) + if (napi_schedule_prep(n)) { __napi_schedule(n); + return true; + } + + return false; } /** -- 2.40.1 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k