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 579BF2222B2; Mon, 9 Feb 2026 14:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770648130; cv=none; b=HZ2id/Idi+saQrl/b2wv2FNXghqdX1Ov8xAXxGLssJ03LvBQgz3jRShaw6tygegn42opMYNihCDblHmiBy9Luwfcy6eQYDhomnJh5LCfvxC5/aFXGA9f39qEWTg3EpoQ8byCKcdFC3lwBb6+9cvMibjZo0//8/fc6VVVPQCiNj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770648130; c=relaxed/simple; bh=JYbrvE7r7z9RnRrSgQTrCx/mVEYBHarGxo5xJIa7ZAM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LQaEyR5YbMVAzQor5RRztAU/5rmCbYuy0VoKVeStKkXKgjE83jLWjMr5YyRk8cI/QUwLd8+nGUD0fzSQ+iuvagsEzrrxEPsYKDnZDgyS6gcB7cAxjhDYCj4JeI5JHxeS7eiaC6WcpurnbcarId7ZegSZk4stmI5GieEDbC3foLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iX9rWaF3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="iX9rWaF3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAB02C116C6; Mon, 9 Feb 2026 14:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770648130; bh=JYbrvE7r7z9RnRrSgQTrCx/mVEYBHarGxo5xJIa7ZAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iX9rWaF3bGimz1QNjxQM+PkRQnFIwWnyiS4oAUDWCnUAOiJF9f0Y9kmbISPC8YyQG dgCKRd3hboPu90gzSt/XAXrFVzRLN/5I34mWrwV0nGt3MQvQzLnoATFFrszMM1sY/H CPi9r15HaFRbreMhIWpeN9mGD8WsztsuoTSUNX/o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Max Yuan , Jordan Rhee , Joshua Washington , Matt Olson , Harshitha Ramamurthy , Jacob Keller , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 16/69] gve: Correct ethtool rx_dropped calculation Date: Mon, 9 Feb 2026 15:23:44 +0100 Message-ID: <20260209142302.510101842@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260209142301.913348974@linuxfoundation.org> References: <20260209142301.913348974@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Max Yuan [ Upstream commit c7db85d579a1dccb624235534508c75fbf2dfe46 ] The gve driver's "rx_dropped" statistic, exposed via `ethtool -S`, incorrectly includes `rx_buf_alloc_fail` counts. These failures represent an inability to allocate receive buffers, not true packet drops where a received packet is discarded. This misrepresentation can lead to inaccurate diagnostics. This patch rectifies the ethtool "rx_dropped" calculation. It removes `rx_buf_alloc_fail` from the total and adds `xdp_tx_errors` and `xdp_redirect_errors`, which represent legitimate packet drops within the XDP path. Cc: stable@vger.kernel.org Fixes: 433e274b8f7b ("gve: Add stats for gve.") Signed-off-by: Max Yuan Reviewed-by: Jordan Rhee Reviewed-by: Joshua Washington Reviewed-by: Matt Olson Signed-off-by: Harshitha Ramamurthy Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20260202193925.3106272-3-hramamurthy@google.com Signed-off-by: Jakub Kicinski [ Context + variable naming ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/google/gve/gve_ethtool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/net/ethernet/google/gve/gve_ethtool.c +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c @@ -216,8 +216,7 @@ gve_get_ethtool_stats(struct net_device data[i++] = rx_bytes; data[i++] = tx_bytes; /* total rx dropped packets */ - data[i++] = rx_skb_alloc_fail + rx_buf_alloc_fail + - rx_desc_err_dropped_pkt; + data[i++] = rx_skb_alloc_fail + rx_desc_err_dropped_pkt; data[i++] = tx_dropped; data[i++] = priv->tx_timeo_cnt; data[i++] = rx_skb_alloc_fail; @@ -293,7 +292,6 @@ gve_get_ethtool_stats(struct net_device data[i++] = rx->rx_frag_copy_cnt; /* rx dropped packets */ data[i++] = tmp_rx_skb_alloc_fail + - tmp_rx_buf_alloc_fail + tmp_rx_desc_err_dropped_pkt; data[i++] = rx->rx_copybreak_pkt; data[i++] = rx->rx_copied_pkt;