Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1179530rdf; Wed, 22 Nov 2023 07:35:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2p8VtI3mVl0DpeXyVxqBkLw+aTkSy4iwRYkHeY1qAkdupFe7UlHksbrhWzXfVrsRZB+2/ X-Received: by 2002:a17:903:2447:b0:1ce:66bd:dbaa with SMTP id l7-20020a170903244700b001ce66bddbaamr2895826pls.56.1700667356716; Wed, 22 Nov 2023 07:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700667356; cv=none; d=google.com; s=arc-20160816; b=jLZb1A3ue7NyMkbLinwth4wLTC9Jb29Y6qEfT+JAb42gcatLiHPPvqoxGS5L3oTupY JYjAcKrypNpHw1HiM0SNqFcXkkok027xGcL/1zz+IRUeK2OJ5ozVzcbuQbLrabvAIPuR lq3EHAc0Vv9B0zQyfl9om4Q9ERTNOXPiGLFclS1YkeOArvw5oj1oIFE8SQslxNwTyWsF d2EW/N7FuT06X90ODoTZ/oeOlfrP9zJbMCS8/UYoM2PByJpIJUGliCI9aweRAHONoF+w cOaf3DXUbfO1HI1ZZ+EVipNrkCdjRh5JlvS2qr2qEuv2DZQPIsO8mUlewNUf4Z9KkVrn s02g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AyiwE5QVA+b27hOnHrhEJv2HgJUQ5sEqOH8WBLRhYO8=; fh=Cd/xchzcMG3j6r6n1fM1/8BoPsqRJ9m1DH4DLPcnr9A=; b=uolrdki1fkMDaiUgG5aVFvQWf//HW0cfPC0JhW0HwyS32F+pkW039+IDLnNwQ8nyFb uXDcK+dogHAQ0225mr1v2o+aSUKzfM/H/aip1aGm69j2Te/GUeeWT+Mv2DeqkK+KxJtE o61HeembaG/ECim2NSZaEjM7oURncRYuWwNJSHg9UPpL1+g5tdC7A6X7MLzEQj+PmI30 oF1iQFBHz4oJIVInG7FpU2UrUQh8wcGCIEy3jvgZ2xEVsuygmxwdXZZvAa2OddmqM/L8 4FykbFR0jc3PFV+/BeG03U6oR989OpugDRUlEwFAcknvIhBuPvp9JKoy5qg1rkJ9Mqsa AfTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OjB9lsNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m7-20020a170902db0700b001cf5c9985efsi7438090plx.186.2023.11.22.07.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:35:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OjB9lsNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6EB92807E93D; Wed, 22 Nov 2023 07:35:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344408AbjKVPdR (ORCPT + 99 others); Wed, 22 Nov 2023 10:33:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344410AbjKVPdM (ORCPT ); Wed, 22 Nov 2023 10:33:12 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B075C1713; Wed, 22 Nov 2023 07:32:48 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4240C43397; Wed, 22 Nov 2023 15:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700667167; bh=dHrf/UhGnXm6rG+qQ+Q2hUVJvaV28d2jFcMrQVb1Y98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OjB9lsNNSqDd3SajEmkKaP18A/4O+P2r8HY7A4aUivPnxQCsBPUyS51woeqs+JE1M elqFVBJFyqP3PPwpuiVV6kpHLfAa+B9r15hyJeaWoF7i4yYR6azizNGnB/jHh4uXc1 Hf+5Mtucs403n/pQ9dBGcnmiIdTD7bVgznflp+VhBPiViZ5g690ej68Ew6FBeju0Zd ZieXMRxo/LEDV5tM/CWE7ypmRUZ/9LTwpos5vskNErs2RwvOHZRDVi/bNoEOfhTDv6 qAqQBkC2WbHrSlH1mAnB5BPGmQPHsqznuY0D3CRRFPBlrRBlEfnO6GOodr4xvfvaoZ Bkz63sBvZi8AQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Pakhunov , Vincent Wong , Pavan Chebbi , Jakub Kicinski , Sasha Levin , mchan@broadcom.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 10/17] tg3: Increment tx_dropped in tg3_tso_bug() Date: Wed, 22 Nov 2023 10:31:39 -0500 Message-ID: <20231122153212.852040-10-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231122153212.852040-1-sashal@kernel.org> References: <20231122153212.852040-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.2 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 07:35:10 -0800 (PST) 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 5c18ad10efc3e..b7acd994a393b 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); -- 2.42.0