Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1157289pxy; Fri, 23 Apr 2021 01:20:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7igNLIY0KV79vdlqTi4qgMAecCJfrbKrpS8WldeS4xERVMOVtEV7BDULs4hibQxB7RxDU X-Received: by 2002:a17:902:6949:b029:e8:c22d:17ae with SMTP id k9-20020a1709026949b02900e8c22d17aemr2821645plt.57.1619166054094; Fri, 23 Apr 2021 01:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619166054; cv=none; d=google.com; s=arc-20160816; b=P+3iaQNPbHc/fShO2NNjTW4HNrxZ05sIGMlLHzwwiejXFjc/ROrKpsh1L7BFJc5Hqk JCilpmI8Cde4b+0nm81HsI/MMk+WkWWK7FyB50GZq1yUZAidVBSW/z3jAvWJh+NoIWVi 3qPkzB5MuJH166H8TF/t5c8svd7/vqmX4Yc/p75lAWhC/p33lZUR+zyvREwQcrvvTa1T R2NKdfq3T2HqHrcXkFPdRvyoHQdcKcAswgg8XN22o7ZcNAeroxpDUEW/MoPZ2iS9XAGl xhGk6X/xc6qrm0prGleXbZ4RcuIqnwGxoKN4iXz0AdPBSjR5hLw+8zkDKl1k2J8gU5ml OWeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Sq6FHbzlathvCZzoMydAX13uBBzPWKO/SRxFralH4D8=; b=CZITBIdXeEjsSNGhXPEQpTp9+kiCKetXGAxu8SNjPbbloWX7mC5tirJKsv+qg5MLUl Y6LPmj60BvZxLlU3oQYfzVp+jBINGInqgx2YpwrvH2EgU8JsrwN9yJTYeAfTVejwRUhv 6rU2B3XeYH43Q9AHDxu+OOe+fe/2bS2sPpWSFnhmK+k00L34pnzrayLNf6LUyDuf6/6p QkPORTwmPjLxeyn5hu0aFib+bS2erCUytx7c9sN9fOCO/ymlgQ/blJzC/KDk32WZPb0S Rdf+4T6Hw5jUTSpU8ZJS7IwOAal6+IpUtRsy0bLE+TrvPOV/YuH5puDkJyVOmNdeCSph s1BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=KaXcWN7N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si5925658pfq.70.2021.04.23.01.20.41; Fri, 23 Apr 2021 01:20:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=KaXcWN7N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241431AbhDWIUX (ORCPT + 99 others); Fri, 23 Apr 2021 04:20:23 -0400 Received: from vulcan.natalenko.name ([104.207.131.136]:47848 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhDWIUX (ORCPT ); Fri, 23 Apr 2021 04:20:23 -0400 Received: from localhost (kaktus.kanapka.ml [151.237.229.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 6BF2FA471E0; Fri, 23 Apr 2021 10:19:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1619165985; 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: in-reply-to:in-reply-to:references:references; bh=Sq6FHbzlathvCZzoMydAX13uBBzPWKO/SRxFralH4D8=; b=KaXcWN7NsMg/HQb9++N0iYdLJ6eHuzsRPeDfCoFVS/TmOevAzY/DLmjA+y6gsb/Miriec7 zUHhIG5zF/EVgwu7lMpjeu/qx8hPIXsjjRuXOMyUMjKmWY2HhYcUD7FFChAwHTtFnFLipm 2YAvxBEUDY1gGszhyGzK4MOo8LaDmEk= Date: Fri, 23 Apr 2021 10:19:44 +0200 From: Oleksandr Natalenko To: Alexander Duyck Cc: Jakub Kicinski , linux-kernel@vger.kernel.org, Jesse Brandeburg , Tony Nguyen , "David S. Miller" , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: Re: [igb] netconsole triggers warning in netpoll_poll_dev Message-ID: <20210423081944.kvvm4v7jcdyj74l3@spock.localdomain> References: <20210406123619.rhvtr73xwwlbu2ll@spock.localdomain> <20210406114734.0e00cb2f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210407060053.wyo75mqwcva6w6ci@spock.localdomain> <20210407083748.56b9c261@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210407110722.1eb4ebf2@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On Wed, Apr 07, 2021 at 04:06:29PM -0700, Alexander Duyck wrote: > On Wed, Apr 7, 2021 at 11:07 AM Jakub Kicinski wrote: > > > > On Wed, 7 Apr 2021 09:25:28 -0700 Alexander Duyck wrote: > > > On Wed, Apr 7, 2021 at 8:37 AM Jakub Kicinski wrote: > > > > > > > > On Wed, 7 Apr 2021 08:00:53 +0200 Oleksandr Natalenko wrote: > > > > > Thanks for the effort, but reportedly [1] it made no difference, > > > > > unfortunately. > > > > > > > > > > [1] https://bugzilla.kernel.org/show_bug.cgi?id=212573#c8 > > > > > > > > The only other option I see is that somehow the NAPI has no rings. > > > > > > > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > > > > index a45cd2b416c8..24568adc2fb1 100644 > > > > --- a/drivers/net/ethernet/intel/igb/igb_main.c > > > > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > > > > @@ -7980,7 +7980,7 @@ static int igb_poll(struct napi_struct *napi, int budget) > > > > struct igb_q_vector *q_vector = container_of(napi, > > > > struct igb_q_vector, > > > > napi); > > > > - bool clean_complete = true; > > > > + bool clean_complete = q_vector->tx.ring || q_vector->rx.ring; > > > > int work_done = 0; > > > > > > > > #ifdef CONFIG_IGB_DCA > > > > > > It might make sense to just cast the work_done as a unsigned int, and > > > then on the end of igb_poll use: > > > return min_t(unsigned int, work_done, budget - 1); > > > > Sure, that's simplest. I wasn't sure something is supposed to prevent > > this condition or if it's okay to cover it up. > > I'm pretty sure it is okay to cover it up. In this case the "budget - > 1" is supposed to be the upper limit on what can be reported. I think > it was assuming an unsigned value anyway. > > Another alternative would be to default clean_complete to !!budget. > Then if budget is 0 clean_complete would always return false. So, among all the variants, which one to try? Or there was a separate patch sent to address this? Thanks. -- Oleksandr Natalenko (post-factum)