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 3A425524B8; Mon, 11 Dec 2023 18:38:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bYJ3waM7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B38AFC433C7; Mon, 11 Dec 2023 18:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702319887; bh=bbafMDrehDOo46AyuM8aXjOg9eEh6SozEBRbHFKfrWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYJ3waM7Oe55qgdS6Oxiq+2UwVD73CPHCc+IfPufps1tunnjeXfxApfmGvLxYKrTf yGTssqxrcEYCGqgpgas/C73sOvU4D90sO7vAovsElo2vz6vz7KIC9BVrupWLw+YM3c GTTJ6dXL6AdX2oehw+9mnGK1r4W5NLSJqJn95QeQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Pakhunov , Vincent Wong , Pavan Chebbi , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 05/97] tg3: Increment tx_dropped in tg3_tso_bug() Date: Mon, 11 Dec 2023 19:21:08 +0100 Message-ID: <20231211182020.048289838@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231211182019.802717483@linuxfoundation.org> References: <20231211182019.802717483@linuxfoundation.org> User-Agent: quilt/0.67 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 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Pakhunov [ Upstream commit 17dd5efe5f36a96bd78012594fabe21efb01186b ] tg3_tso_bug() drops a packet if it cannot be segmented for any reason. The number of discarded frames should be incremented accordingly. Signed-off-by: Alex Pakhunov Signed-off-by: Vincent Wong Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20231113182350.37472-2-alexey.pakhunov@spacex.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/tg3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index a2c6c204fe9d4..b010f28b0abf4 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -7890,8 +7890,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi, segs = skb_gso_segment(skb, tp->dev->features & ~(NETIF_F_TSO | NETIF_F_TSO6)); - if (IS_ERR(segs) || !segs) + if (IS_ERR(segs) || !segs) { + tnapi->tx_dropped++; goto tg3_tso_bug_end; + } skb_list_walk_safe(segs, seg, next) { skb_mark_not_on_list(seg); -- 2.42.0