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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FF85E748F0 for ; Mon, 2 Oct 2023 16:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238383AbjJBQJx (ORCPT ); Mon, 2 Oct 2023 12:09:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238087AbjJBQJv (ORCPT ); Mon, 2 Oct 2023 12:09:51 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2192F91; Mon, 2 Oct 2023 09:09:47 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 392FLAQB027199; Mon, 2 Oct 2023 16:08:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=T9yCwFrS5AoooxlKBeLdSc8An+tppK1rapyiK3ru7OU=; b=HZ3pP6j7Ib+6fTbkOdd8Ly/OEv9HPqy0690lI4jtvxiW25clJXZp+846T/Uz3iu9qHoP N1VAVfU0wfzInuSNVCGo4UUw6GxXIsQpRW1Br5T77nJ4pVicOz/4wOSgjyg0y9yhYjj7 c903k8sL3Sh5f9EAk1K34OoQ+tmVgUBBdsnVxoKAfLR0ArjoixzYgTSKSSbSBW8bE3dM kY8YXHvOVs5/sndPD7RsA5I+UMEdiJ0eXwxatpRgGGQjBOurxAC/Ay4jieUrOwwksSsl AeI+uNSauNz++7j96MzLdUc4YYmdQxK4ufjMq9HLzeKWvV4mceIbYHnjCinKHJ7eUDYa jQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tecygbyct-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Oct 2023 16:08:20 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 392G8IMZ026834 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 2 Oct 2023 16:08:18 GMT Received: from [10.111.179.185] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Mon, 2 Oct 2023 09:08:16 -0700 Message-ID: <9a65ff82-e6b0-4253-be86-a0962e673bc4@quicinc.com> Date: Mon, 2 Oct 2023 09:08:14 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [net-next PATCH 2/4] netdev: make napi_schedule return bool on NAPI successful schedule Content-Language: en-US To: Christian Marangi , 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 , Gregory Greenman , Chandrashekar Devegowda , Intel Corporation , Chiranjeevi Rapolu , Liu Haijun , M Chetan Kumar , Ricardo Martinez , Loic Poulain , Sergey Ryazanov , Johannes Berg , 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_Kleine-K=C3=B6nig?= , Yuri Karpov , Zhengchao Shao , Andrew Lunn , Zheng Zengkai , "Rafael J. Wysocki" , Lee Jones , Dawei Li , Hans de Goede , Benjamin Berg , Anjaneyulu , , , , , , , , , References: <20231002151023.4054-1-ansuelsmth@gmail.com> <20231002151023.4054-2-ansuelsmth@gmail.com> From: Jeff Johnson In-Reply-To: <20231002151023.4054-2-ansuelsmth@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: OG9E9tRT0CgWmcphKGvEtpMdVBHFNb-n X-Proofpoint-ORIG-GUID: OG9E9tRT0CgWmcphKGvEtpMdVBHFNb-n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-02_10,2023-10-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 adultscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310020123 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/2/2023 8:10 AM, Christian Marangi wrote: > 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 nit:s/ahs/has/ > 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; > } > > /**