Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp429375rdb; Thu, 5 Oct 2023 09:51:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFc+dHOMxOR3YZmOaLzEa3o8WU9cVYI7MigKAePPFf3fL5t0ysIJ91+Ix9tsztlllOvRHlj X-Received: by 2002:a17:902:db0d:b0:1c7:61a1:9688 with SMTP id m13-20020a170902db0d00b001c761a19688mr7358159plx.7.1696524702866; Thu, 05 Oct 2023 09:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696524702; cv=none; d=google.com; s=arc-20160816; b=VuQ7ByrmVJJrGxulRJNkMes6xpryC1/a/dz5intw+SjwhhKSL1SVgq6PsmRbQAUcls Fn+B1s5TFBPEHBS6AL/I7nDCHRJAEOmE5bphpnVVEd4/0QLUFfJJruiWgujuCMvJppqs F0lqpq6vWX6Bnawty/PhVWvte9eXFwgblQewUdtaiJt3iLXBpvUtCot0t2yMLcsVoLh3 8Sm7oExnv0ucO+1YZHSxgXkKiqArNItWGz60AX4EUO3EmR5OyaTrlV+4cIF+1S4L3IrD 6F6qexTB7uFZxECsjpMLl68Ib7k8yFk8fbC5YzCXoj9IvVTneYieUx+W5QLhYtoZEckG r0GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kKTDRIoUmCSN9wKAZkd+bxIJEDblkCbUKypHY3ps4Iw=; fh=5AL94UL0zhZdxH4/z8d0VJHPChail2kubwAN+3qUxpY=; b=e5cd2WWQ3ud0QB9/Xcgex+V7ofudASgqnHoSK/DeFo83ax9+0QmvuQKHJCtX0Wtcpj 98HdSMuGd2/Uo6/NlNUNI1PBABakBIQQfPppmzQBOjUDpPXE7vJLn5ZiQLn7aNXKB4Li fWL5a4koy5pThNswmu0MGCr5aI63A9kjO1JRcYRmZiByXqPerUjCWTfRA4oCgGtrSSru tZXveVlEDJHAWF5Pt+WilE07MTR9ePWSU5tihdtMOy2fwW+Htbd7t9/4+TI/NkOjG7HC Ab/wnxAtnXNWDDm9K5pbk5BdC0RwUfjswmZqWGaykL8MtU9AFo0vLEDzByk173i17gGn q2nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Q+9rGAz/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ik28-20020a170902ab1c00b001c74ae78c7bsi1858888plb.377.2023.10.05.09.51.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Q+9rGAz/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A8FC880C5C9D; Thu, 5 Oct 2023 09:50:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231602AbjJEQuK (ORCPT + 52 others); Thu, 5 Oct 2023 12:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230096AbjJEQsW (ORCPT ); Thu, 5 Oct 2023 12:48:22 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F472060 for ; Thu, 5 Oct 2023 09:41:16 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-405459d9a96so2195e9.0 for ; Thu, 05 Oct 2023 09:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696524075; x=1697128875; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kKTDRIoUmCSN9wKAZkd+bxIJEDblkCbUKypHY3ps4Iw=; b=Q+9rGAz/E7g9ybkcIAMcFbKwvoF1EZUZRfBom65Nza9mTZxv5FdEt5FcqQNQF4BW3Q 6rUFyD4mxY75T+3bGjsgQYrrEBDxwaWrhNrtrwWIweqXkPyzy2PqaqDxs0dREmRn5Tzr YNyLMfb8A8zAGs9Yg7BF5MmvP0QI6wJACnWAejFGjNFYBl8w3lkkjY4i+AA4Mxas3Dj+ ooHh7ByEuqTi7CdLSa3a0V/FuVsVaQ2uPyA+TdPD7ILsl3k2SZJMQpQT+KqTY+9EetUm dgTEPMriDfHV42y+ZQBfdJpC263VP4M/pnNHLYwAFzsRL5Q9H6j99SQVa2AUSVR6UW9A hGNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696524075; x=1697128875; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kKTDRIoUmCSN9wKAZkd+bxIJEDblkCbUKypHY3ps4Iw=; b=vQirkprjKvkjwnSIRZ8s4NrMggD1vrgPXCHZV35t//aD4L0THC1FVWvcU6vN/XScuD LBzSpnZY9xe0DDAIBflj2M5e8wntLhA5O5HjXtuqSN5xzaiAGSHZ98c8tU9gdnD7+ajK 1yThy5vrAXK2h2gkynr4jO+ZZMDNBH94hRTwUyRc3s9PsZhemBW0TNf9Ww69Z8NrcYbT 5/EfRmbc8SOrUtWP/R1f2h3k4M/5OlT/LY3+R3Ht1768s/5I4RApQ1/Xz8OFUgOb+GZb OiaHZusxWhWo40tZ2qZz9S7FSX9SWU0NGPk+/WqHALIGCun3csCT//M9R6Om7sOfEzLT uiiA== X-Gm-Message-State: AOJu0YzfbjvDkB5yMLHWTaEpgWyMKGYXJseSAmgSvJo4TyFO8fkcql+o pelETdc9CTEZX+8HUDqueP8I6sT3nbTUru2mDwLK1w== X-Received: by 2002:a05:600c:2301:b0:405:38d1:e146 with SMTP id 1-20020a05600c230100b0040538d1e146mr66369wmo.4.1696524074654; Thu, 05 Oct 2023 09:41:14 -0700 (PDT) MIME-Version: 1.0 References: <20231003145150.2498-1-ansuelsmth@gmail.com> <20231003145150.2498-3-ansuelsmth@gmail.com> <20231005093253.2e25533a@kernel.org> In-Reply-To: <20231005093253.2e25533a@kernel.org> From: Eric Dumazet Date: Thu, 5 Oct 2023 18:41:03 +0200 Message-ID: Subject: Re: [net-next PATCH v2 3/4] netdev: replace napi_reschedule with napi_schedule To: Jakub Kicinski Cc: Christian Marangi , Jason Gunthorpe , Leon Romanovsky , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Paolo Abeni , Chris Snook , Raju Rangoju , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Douglas Miller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Nick Child , 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 , Yuanjun Gong , Simon Horman , Rob Herring , Ziwei Xiao , Rushil Gupta , Coco Li , Thomas Gleixner , Junfeng Guo , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Wei Fang , Krzysztof Kozlowski , Yuri Karpov , Zhengchao Shao , Andrew Lunn , Zheng Zengkai , Lee Jones , Maximilian Luz , "Rafael J. Wysocki" , Dawei Li , Anjaneyulu , Benjamin Berg , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:50:42 -0700 (PDT) On Thu, Oct 5, 2023 at 6:32=E2=80=AFPM Jakub Kicinski wro= te: > > On Thu, 5 Oct 2023 18:11:56 +0200 Eric Dumazet wrote: > > OK, but I suspect some users of napi_reschedule() might not be race-fre= e... > > What's the race you're thinking of? This sort of thing... the race is in fl_starving() though... diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index 98dd78551d89..b5ff2e1a9975 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -4261,7 +4261,7 @@ static void sge_rx_timer_cb(struct timer_list *t) if (fl_starving(adap, fl)) { rxq =3D container_of(fl, struct sge_eth_rxq= , fl); - if (napi_reschedule(&rxq->rspq.napi)) + if (napi_schedule(&rxq->rspq.napi)) fl->starving++; else set_bit(id, s->starving_fl);