From patchwork Wed Feb 24 15:18:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12102043 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C33BBC433E6 for ; Wed, 24 Feb 2021 15:30:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 652AD64ECB for ; Wed, 24 Feb 2021 15:30:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233489AbhBXP1Y (ORCPT ); Wed, 24 Feb 2021 10:27:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238541AbhBXPTk (ORCPT ); Wed, 24 Feb 2021 10:19:40 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C507CC061788 for ; Wed, 24 Feb 2021 07:18:58 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id h125so3563653lfd.7 for ; Wed, 24 Feb 2021 07:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IcQAC8JHIQCwNRyMQ2oZvSV03+7k8VdXHLYW4etfu6I=; b=TDaITrQOpbe/EIowgBYNadH9MuOEfuFMCmhM+qL4gBFsD6FIdRyzLXXKLSZcif5U9a 6c7eMmlmHHQOviFRCd2S6hy+O+krmGcZNr5ty3Oyx12pJ0fqZqKsrG7m3NTHC53Q18sj /1tvGOZMTqaHK5iXt5GcEzgwdKztHiJmxppbGduEMjW0L7y5TESK8eomfWdqYIh9h+GZ qtCQYLzYi43kBM+0HokPGoBeU31eK6IkSPMMrMcPLgfXcQg90eDQ4q3nJA85okegdyNo 6tMb1/RDv5gWT54jLNc7Ae2fjRPBKrx6S+V7TWDVVTBE0jd2B71JAa35r3R9+agOV6dE mSSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IcQAC8JHIQCwNRyMQ2oZvSV03+7k8VdXHLYW4etfu6I=; b=SpnOGMsnRtvyGRCR1wHMW2BaIOpYm8hO7NqLashDIYhduCieAQzDKnrkvJ692aWhv6 2ru2o9kr/zuLkW9Zx4uTCLBbBuzDeaaQhBkWIN8if71OAlhRHLOPE2uPmTYXd+4GZW4E IgQa6V9aJyScqHLJWc5PYNPwYo8l4LMV4QZI10bzfYentpwPTHzEZlXQyclU4XyvNn7p hgl/KSMZPqPMzLsCgyB7Vd5kG6qIopsvG1ynl7i1pUZynglVCWv4WGmJldNzNULk9QKw ExMXnPr8pY91FW3Au8I0McW7vTTFQoaKj26z+vqVPm2Noh2fnx8iiBwUn/p8fJP0/CIy oVdA== X-Gm-Message-State: AOAM5314vzI4nOaISSF+MmIZSACmRzQf2UArX50nf72VCzVRD2ILB+67 7aAnBEhku6gAc/FeIS66TvA= X-Google-Smtp-Source: ABdhPJxCTi2m+hT4sKvQfG2+WG9CAj2ZPbnQTdyBq/cI+2LcDXJsWOcb7ET37mWzN1EpzFmelKH9Sw== X-Received: by 2002:a19:3f93:: with SMTP id m141mr19185820lfa.423.1614179937341; Wed, 24 Feb 2021 07:18:57 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id j137sm546006lfj.55.2021.02.24.07.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 07:18:56 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: "David S . Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net] net: broadcom: bcm4908_enet: fix NAPI poll returned value Date: Wed, 24 Feb 2021 16:18:42 +0100 Message-Id: <20210224151842.2419-2-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210224151842.2419-1-zajec5@gmail.com> References: <20210224151842.2419-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Rafał Miłecki Missing increment was resulting in poll function always returning 0 instead of amount of processed packets. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c index 7983c7a9fca9..0b70e9e0ddad 100644 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c @@ -583,6 +583,8 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight) enet->netdev->stats.rx_packets++; enet->netdev->stats.rx_bytes += len; + + handled++; } if (handled < weight) {