Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6015847ybc; Wed, 27 Nov 2019 13:26:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwVcMjL8j1MnXJoq/ZXaEzas5agIH1ZyjhW7zSi0p8OBt3QiFM69L2FNRnFQ2xF3aJLip0o X-Received: by 2002:a17:906:d210:: with SMTP id w16mr51529774ejz.86.1574890018595; Wed, 27 Nov 2019 13:26:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890018; cv=none; d=google.com; s=arc-20160816; b=NrJynIUPpf4lwxo/vcip8NyDXogfaMX0X4qXlBJwMr7FdQQWgK5buiK44TlgSU5B9f FuRdTtpFntQ+iZ7ETAkp6qciuQj79IQs8WytCH5QYU2jIV7QVvIgZzHJ6cY5cEcfFwnG mmVtERHynTWVjq1Ie1t1dyiKtq1AHebhCH77aEKBIn0XZ1PkuQCPgogX6YPStifAlFhV gDeTDYBtF6uy59GciYhzfGqvQOTRhd+Z4ilUVgn2aGv2wDuzbJhLq1BpHzrQx2gXizKR a0HwmrVYOw/Bah+rS+Jw2zV4qajImJVmFc6r87hpEzqNkdFvXd0eq/sUylzBAXgTM0GU WFvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JJx70KvG6QBWnoeZe2TmNPf7gRaTGJsFbkH5gJyb5qo=; b=WIszHqSEfEoDqqdYorqxJSUiunNgRt1WFlCFbFqi8wSZJ66ID6GTUP3FKCAye2moou ynqIAc3EGJSyOwrThgvyH0ScSU79rV5dL9qRN1jKJYkqK/J59sRJfOWntWWivyCYV6vI Sn8tiRzde7KKiLW0RjKaRDDjXOmatef5Moxmw2bstuG4JxoszCKfbHXrcbfKX0jYbv35 sG4NhlAfbm6ooErTtduTtSwLFvFsxlTCUa9LVV+rYWEk5okgVLltdf44Db6pkI4yyhO+ 998w7h8AlIG51jN3LqFjHgOT9HH8nLhasRnFZ+l+X3vL8FtpEFIkiD1eLlwWGXFMB794 subA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IozsAO8O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si291560edv.169.2019.11.27.13.26.35; Wed, 27 Nov 2019 13:26:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IozsAO8O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732608AbfK0VYV (ORCPT + 99 others); Wed, 27 Nov 2019 16:24:21 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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