From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F80AC678D6 for ; Tue, 10 Jan 2023 18:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239216AbjAJSUu (ORCPT ); Tue, 10 Jan 2023 13:20:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239291AbjAJSUJ (ORCPT ); Tue, 10 Jan 2023 13:20:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00DFCAF for ; Tue, 10 Jan 2023 10:18:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A7079B8189A for ; Tue, 10 Jan 2023 18:17:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9824C433F0; Tue, 10 Jan 2023 18:17:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673374678; bh=+MmWXyScwihFAttHuGDWqF/Q9yULNVEkh5ChxsCHQXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UuSIFIr8BkrKgU9TmNrqmUJtTNVOiIMYSjXTT9ZijtMwtpiP5945JNDfaGTrATdl+ 85CLTOJuetYP+NAg/uhwLJTIydHX2A3w82ngZ/J2zf81i/299APUn7xI7Os6OuzCDF efZqDFqYuHgQTTuY31Shpf9pcsCyfxLziA0ykJhw= 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 6.1 069/159] net: ena: Account for the number of processed bytes in XDP Date: Tue, 10 Jan 2023 19:03:37 +0100 Message-Id: <20230110180020.497068448@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110180018.288460217@linuxfoundation.org> References: <20230110180018.288460217@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 e313bb45319c..69f2364b8468 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -1719,6 +1719,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