Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1481557rdb; Mon, 2 Oct 2023 10:46:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElVdPf+QTMavn6hOY5AzR3WTYgRpMpdXj8d14lUfPBUkis3DRHpd5FI/utMmupYmK1IRKp X-Received: by 2002:a17:903:185:b0:1c5:f663:1722 with SMTP id z5-20020a170903018500b001c5f6631722mr11772239plg.6.1696268760763; Mon, 02 Oct 2023 10:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696268760; cv=none; d=google.com; s=arc-20160816; b=EwAX4gW7sPSQZNi/KCa+rp0JLV/MnL3mPF+QeetFqn/MDjQvV+llKgEE2SO+FjaVk7 RWCOsQpThZCjOJ7v9C7sPjzEc9nmtL/t1e121jfaR1Y7vKYVrgaCLxNvVdl0Gtke1RNz EoX221ilvmXKsv4PdAKoQpuFkOu25/uJ4iIJuhA0+a6fS4uKXtxBVRms69xVEpEMvUw5 RldPQnyYM9l82TT5CMSjGR6aqr5Krto+mv+BdQVfIFkw3jLNF5yR+/TOScpuZK8kNIL5 CVaXfLn+r19Ne3F7ySjpjwgU/BSZ+KvU6RlrRWK6GDqSx6QmS5Y/j75GmPaww1oc3tWj J2cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=T9yCwFrS5AoooxlKBeLdSc8An+tppK1rapyiK3ru7OU=; fh=SV92d+2yPsb0va2MOaAQH0lp7orkn1yHiqxV/F/8IH0=; b=I/GIKTytCJ+2kj+roya7UoQPK0tI99X08wpZWXIpK8smge4WaJqdNXD28+53rj32Se UTwV1Nurc2Ao5runVWHCaW2QNWYNeoaOqXu8bU8BHvw1Bytl3x98yTopcc5COgmaXd/I zml+CPcfpYbzsropfkLSGRIX8NeoLZoxsey6jr+V+e7YSr8doCZzZ73s4OcjeQHWDrIm cgqCI71GravxpiKXdUW8bK2UG3YwiuUacDcLdSclxdfIXgdcvioz/AP3KHt/uEuE2cl1 pemv+sbjIwERAwIcshnhP8Ypz2ZQCsqN/Nae02Rh//V7k1x3uCGklAlfjextTEyf5hBt trtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=HZ3pP6j7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b14-20020a170902d50e00b001c72c792794si13593251plg.47.2023.10.02.10.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:46:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=HZ3pP6j7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A75A1804DDAD; Mon, 2 Oct 2023 09:10:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238430AbjJBQKt (ORCPT + 53 others); Mon, 2 Oct 2023 12:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238435AbjJBQKs (ORCPT ); Mon, 2 Oct 2023 12:10:48 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8CC391 for ; Mon, 2 Oct 2023 09:10:45 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 392DaJ5q018280; 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 3tebw9c2k6-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-ORIG-GUID: hRpdMXFG_4hBbI6LL3wrdVHE5wqVhjxN X-Proofpoint-GUID: hRpdMXFG_4hBbI6LL3wrdVHE5wqVhjxN 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 suspectscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 spamscore=0 adultscore=0 clxscore=1011 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310020123 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 09:10:54 -0700 (PDT) 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; > } > > /**