From patchwork Mon Nov 13 18:13:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Pakhunov X-Patchwork-Id: 13454301 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 68D7422EF1 for ; Mon, 13 Nov 2023 18:13:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=spacex.com header.i=@spacex.com header.b="dVOXBXyS" Received: from mx5.spacex.com (mx5.spacex.com [192.31.242.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1883171A; Mon, 13 Nov 2023 10:13:55 -0800 (PST) Received: from pps.filterd (mx5.spacex.com [127.0.0.1]) by mx5.spacex.com (8.17.1.19/8.17.1.19) with ESMTP id 3ADG72l8024560; Mon, 13 Nov 2023 10:13:54 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spacex.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=dkim; bh=9PwXSZhs5eN9izx+6WlQZ4f+IkcEvevGOy44aiqLgPQ=; b=dVOXBXySciOjniWFSYJDHj+Ew1Skb/B2XNS2r08lSJoPE3K75n8nfsOqtfiThEasMG5p AR7AfB5vTbpmSo8G0DMuNkwgJSNtEpJBieoMXjP6sjj/EXuusH4wM9X5ibc5I2krDBx1 VEuVqxqfnOmmH2xTm3J/DBLWS2yQMpn4MpujcBix7tlFqxMP00WdEYoBqF1b4NMN7HZA SsgGVyWMdZR92q75sUbB2Cjr6Qz3MPwhidfXP2kkj1foePTs/vV73CEcjllwqyQNPeD3 LhNhTd+TjYh37LGPKFtzHSr6vD6A47k0jT5Rd9OBBdV9QoRPwDX+DXvvazxbvYSY5aMJ ag== Received: from smtp.spacex.corp ([10.34.3.234]) by mx5.spacex.com (PPS) with ESMTPS id 3ua7wsa6mb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 13 Nov 2023 10:13:54 -0800 Received: from apakhunov-z4.spacex.corp (10.1.32.161) by HT-DC-EX-D2-N2.spacex.corp (10.34.3.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 13 Nov 2023 10:13:53 -0800 From: To: CC: , , , , , Alex Pakhunov Subject: [PATCH v3 2/2] tg3: Increment tx_dropped in tg3_tso_bug() Date: Mon, 13 Nov 2023 10:13:26 -0800 Message-ID: <20231113181325.26203-2-alexey.pakhunov@spacex.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231113181325.26203-1-alexey.pakhunov@spacex.com> References: <20231113181325.26203-1-alexey.pakhunov@spacex.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: ht-dc-ex-d1-n2.spacex.corp (10.34.3.231) To HT-DC-EX-D2-N2.spacex.corp (10.34.3.234) X-Proofpoint-GUID: r9NCsfS3oaBlLUZY_r8Npy0CqAChSf5c X-Proofpoint-ORIG-GUID: r9NCsfS3oaBlLUZY_r8Npy0CqAChSf5c X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311130149 X-Patchwork-Delegate: kuba@kernel.org From: Alex Pakhunov 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 --- 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 dcaf97198ac2..8f22b4cdc31f 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -7874,8 +7874,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);