Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp910100pxf; Wed, 7 Apr 2021 14:49:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz12fYxNfo9A7cxPfR5w7E4T72Zsu+AdZVrbRDCqna2/1CZc//jpvPDMV6bLw6dDHZgojra X-Received: by 2002:a17:902:a607:b029:e4:c03e:3a9f with SMTP id u7-20020a170902a607b02900e4c03e3a9fmr5046647plq.14.1617832189838; Wed, 07 Apr 2021 14:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617832189; cv=none; d=google.com; s=arc-20160816; b=rL4PMIlZkvtUaKvJvn7DVhunSDa++3cS45QP56khG7vVTju0jZV8ufiAO6exp2P7sR rLpNap3Ic+/FcHJnkEPcE1jJJ0tkWL1IUS97ABJnCGPjdt1rUbYSBiTUGggAQciywg19 R98Bqz03ZmnvtWA8eAXlLOL1wea6ECy1wuHrlXs+r3D3lcEQrW659M3+q7vt1kkBmBcb JzeznjfJ697wZlEvoA+kbq/c/u7oB8TsoOlI9G4ahKw+y0fqGfpZBl71X4FWHikrH16F 8ALut64asnGGVnWBY9ZOVTw1hPeqmJWdXjo06wqshe7SpUWnmK9vljSJxXn2VWknJVhd xGrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=d3zi6/RS6dWBpIFMy9AxstPQ8CdqgwzbNJMa1B1WRdA=; b=JJnuqQUAtV+lHH7g7x4DsVBRYRTBIBlaTc2h9gfwzNzZFcLWJQ2sGXc9ujTw2j2a6M eWxJ2ANKGPGyaA4D6SX/tfNOxTSHTlVbMLDfpDr6giWq7OQsAxIogfxF8SkpNei9pwML JSTP0sh8kmXIusaYEI2z8DEb35NIOlY51ItOfDAXSUFUSoK1fxGzJIeFi3EMITeEXxYf 0Z7rU/f2yFjAnIiY/JlprJg2nxIN/C4C/wl3D+Sp1U/VyaS1x1Jm2VxeI+ovcExGF+X/ XzTq7T4asLP+A4N7HwJlxGtgSsbJlY9aFWScLAhUIkHOi4s84Nio3/JxvTVw9DRnuV00 k6YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i7DNkz6X; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o184si5241080pgo.513.2021.04.07.14.49.37; Wed, 07 Apr 2021 14:49:49 -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=@kernel.org header.s=k20201202 header.b=i7DNkz6X; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355103AbhDGSHg (ORCPT + 99 others); Wed, 7 Apr 2021 14:07:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:59494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355081AbhDGSHd (ORCPT ); Wed, 7 Apr 2021 14:07:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 55D6461153; Wed, 7 Apr 2021 18:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617818843; bh=KQDUew2GlvDTG5qXa9bLXVU8UwDr5O44GktbMLs9Ihs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i7DNkz6X0fIgBa1gqe0G8XVjij7Ew4m0fQzUlfvYRIdYSPFsqtmgkAdB1eO5s32Lg mMh8TRJpULgu+n7pTh7ATjEkyBOkbaBEaBpi+B2IBUqGCbMXRSJMe80IGGp0xmLgV+ 3YdLsn6QfAzTLp3RqTu7dL66G7RZsgsDc0XeXvtOzQC0aYxNQl6orY6GuwgJwN9KhE LOBb8x+cHWXkeV7j6OE9/6B+OHtiDjNtVOTazNr07otq8ielDfAhnJ0DpWO9aZHgY5 YF4d6NyjDSY6MXxQIO6YsQ1/VDqD5xWfIKD1vcMlRe5aox5LmA8Wfk8ii82B20+H4K BALh+4SCJW/3w== Date: Wed, 7 Apr 2021 11:07:22 -0700 From: Jakub Kicinski To: Alexander Duyck Cc: Oleksandr Natalenko , 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: <20210407110722.1eb4ebf2@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.