From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3A8F6FBB for ; Tue, 10 Jan 2023 18:32:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29BD4C433EF; Tue, 10 Jan 2023 18:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673375573; bh=GChT0lg2yi/pfLvbe6XEtkJ12kZUtvXQHz/uf6Oq7xg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=07NeYaD3X1GkjsauNuY2dBXlgZdZZNoUPM7OF2rssRKKO/3wC+sbLgquD0CK3sFik 1+gQ5koyCbVJrM24PzudivNR8LfTLm53oSzPzauyxlt9/g7/TPRL8ul0CCQXo96Gp2 i3qKxJ15+Becvi7u9gb3q7BrIouLZ5VeByvJ0lbg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Shay Agroskin , David Arinzon , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 232/290] net: ena: Account for the number of processed bytes in XDP Date: Tue, 10 Jan 2023 19:05:24 +0100 Message-Id: <20230110180040.025947753@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110180031.620810905@linuxfoundation.org> References: <20230110180031.620810905@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: David Arinzon [ Upstream commit c7f5e34d906320fdc996afa616676161c029cc02 ] The size of packets that were forwarded or dropped by XDP wasn't added to the total processed bytes statistic. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index da16f428e7fa..31afbd17e690 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -1729,6 +1729,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, } if (xdp_verdict != XDP_PASS) { xdp_flags |= xdp_verdict; + total_len += ena_rx_ctx.ena_bufs[0].len; res_budget--; continue; } -- 2.35.1