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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 253E5C43215 for ; Wed, 27 Nov 2019 21:24:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1540215F2 for ; Wed, 27 Nov 2019 21:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574889865; bh=XCMPhZzUIyaYLTWfmA4EALBPYmZN3wjg1g3cx3t6HTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gfxg5yKCgPwhb95F4lOWgEcLZ3OfSFGYpjWJBpa7giR1SoKLq3kL0wP40QldPAws8 33TpaF1U515mdH2WFTOe6UMV+FCh5Xd+aS1g1rJVv2nUL3oWWDLie6LlKGdkk05tJZ UuudD7zvGOvK1zTvACOzqw70TFJZui1kG5oHApPU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727379AbfK0VYU (ORCPT ); Wed, 27 Nov 2019 16:24:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:56646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732033AbfK0VD0 (ORCPT ); Wed, 27 Nov 2019 16:03:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F39A2086A; Wed, 27 Nov 2019 21:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888605; bh=XCMPhZzUIyaYLTWfmA4EALBPYmZN3wjg1g3cx3t6HTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IozsAO8OyqMsdHN731aDgBanKG7Z654bMJxd1wV2kTRmpiHfkqWvPQXR9iO07rasS 2qfSqPuqt0/HtLRS+ukuFEYc3S9rXMeG9lQN2H/JCBfBD1GMJ6G1WVViMi6Pss+Nc1 NdvsX4loDTXGXRf3SGxOoqr4F+4MaTSn7fu5HvZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 200/306] net: do not abort bulk send on BQL status Date: Wed, 27 Nov 2019 21:30:50 +0100 Message-Id: <20191127203129.788862966@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eric Dumazet [ Upstream commit fe60faa5063822f2d555f4f326c7dd72a60929bf ] Before calling dev_hard_start_xmit(), upper layers tried to cook optimal skb list based on BQL budget. Problem is that GSO packets can end up comsuming more than the BQL budget. Breaking the loop is not useful, since requeued packets are ahead of any packets still in the qdisc. It is also more expensive, since next TX completion will push these packets later, while skbs are not in cpu caches. It is also a behavior difference with TSO packets, that can break the BQL limit by a large amount. Note that drivers should use __netdev_tx_sent_queue() in order to have optimal xmit_more support, and avoid useless atomic operations as shown in the following patch. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index e96c88b1465d7..91179febdeee1 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3277,7 +3277,7 @@ struct sk_buff *dev_hard_start_xmit(struct sk_buff *first, struct net_device *de } skb = next; - if (netif_xmit_stopped(txq) && skb) { + if (netif_tx_queue_stopped(txq) && skb) { rc = NETDEV_TX_BUSY; break; } -- 2.20.1