Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752781AbdLHRfq (ORCPT ); Fri, 8 Dec 2017 12:35:46 -0500 Received: from mail-ot0-f169.google.com ([74.125.82.169]:34287 "EHLO mail-ot0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbdLHRfn (ORCPT ); Fri, 8 Dec 2017 12:35:43 -0500 X-Google-Smtp-Source: AGs4zMYVtcM2803hUfRVT9/QWRX7H2L9txwZFL/+A3Ut3fm3TUA1bkTatDNkePI60kjvaLNpHc7KEVpWoxR4Bfq9kiw= MIME-Version: 1.0 In-Reply-To: <1d2d29c336343cc590c8ba31156511381c39fc84.1512511928.git.calvinowens@fb.com> References: <1d2d29c336343cc590c8ba31156511381c39fc84.1512511928.git.calvinowens@fb.com> From: Michael Chan Date: Fri, 8 Dec 2017 09:35:42 -0800 Message-ID: Subject: Re: [PATCH] bnxt_en: Fix sources of spurious netpoll warnings To: Calvin Owens Cc: Netdev , open list , kernel-team@fb.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1949 Lines: 40 On Fri, Dec 8, 2017 at 9:05 AM, Calvin Owens wrote: > After applying 2270bc5da3497945 ("bnxt_en: Fix netpoll handling") and > 903649e718f80da2 ("bnxt_en: Improve -ENOMEM logic in NAPI poll loop."), > we still see the following WARN fire: > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 1875170 at net/core/netpoll.c:165 netpoll_poll_dev+0x15a/0x160 > bnxt_poll+0x0/0xd0 exceeded budget in poll > > Call Trace: > [] dump_stack+0x4d/0x70 > [] __warn+0xd3/0xf0 > [] warn_slowpath_fmt+0x4f/0x60 > [] netpoll_poll_dev+0x15a/0x160 > [] netpoll_send_skb_on_dev+0x168/0x250 > [] netpoll_send_udp+0x2dc/0x440 > [] write_ext_msg+0x20e/0x250 > [] call_console_drivers.constprop.23+0xa5/0x110 > [] console_unlock+0x339/0x5b0 > [] vprintk_emit+0x2c8/0x450 > [] vprintk_default+0x1f/0x30 > [] printk+0x48/0x50 > [] edac_raw_mc_handle_error+0x563/0x5c0 [edac_core] > [] edac_mc_handle_error+0x42b/0x6e0 [edac_core] > [] sbridge_mce_output_error+0x410/0x10d0 [sb_edac] > [] sbridge_check_error+0xac/0x130 [sb_edac] > [] edac_mc_workq_function+0x3c/0x90 [edac_core] > [] process_one_work+0x19b/0x480 > [] worker_thread+0x6a/0x520 > [] kthread+0xe4/0x100 > [] ret_from_fork+0x22/0x40 > > This happens because we increment rx_pkts on -ENOMEM and -EIO, resulting > in rx_pkts > 0. Fix this by only bumping rx_pkts if we were actually > given a non-zero budget. > > Signed-off-by: Calvin Owens Thanks. Acked-by: Michael Chan