Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp736783ybc; Sat, 16 Nov 2019 07:49:23 -0800 (PST) X-Google-Smtp-Source: APXvYqy7Tb4RmbVdtZ0qLN0yGbXhCFmKDm2jRBOvd4LRiMcyi/C3a2Girg8tzYs601d5czVB+a3w X-Received: by 2002:a17:906:4c8c:: with SMTP id q12mr10930360eju.256.1573919363231; Sat, 16 Nov 2019 07:49:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919363; cv=none; d=google.com; s=arc-20160816; b=ZXw9MtqqGiwJp11REuw3qAwNrCJH7TxoVNsqDxuJOMuykmZtu2rej9wQhb5O/KCkcH sjCRXwmsgEWHOaCY69RP9xBHcV9XIWg/FSNVa3VkPHnie+Ak1wipRb/8ualo5t/6jVjK BjgyG1Vr8S9zAUFzRbttA609biULZ0Ovm5vQl/LH7YbUTKhORoSzOXNa3TNIuzi00/Ki EPJJbqq9hj2Lnvl1nvbo7ctRoFXGkR3+mYPwnKff9GaLPVIWIAJaeHwXYEya9qQg32K4 nl/Gr+tQnu1gdpyOqFWCtMV+YHbmb2JhrlhlW4RTLOTODzMxVPpBnla+VkcbDFICAFWc WC6Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HPoCcn94GX2jAslqwqqUS6TlPlVDKB5yIMbKjmbHm0E=; b=XV2VQ/tLYiwAmT9sYTj9i4cThKvnc4H1FAeuIYM0ElTlnLfPYMwAdRvevG2LHgCrOg oJs29Wx05rSxst/hITQPgpdAxOlvL32whCsp/IrOLlJ2fEViyFxqrso3EcVaFjH0Ut7+ r4iDapLDFgAxIP/fW0d7ANbJLGLHN/4OdZFSJvWoQmcfSgDDn5r6BNGjafLAqz6cFWyB RBmYD1fsRsuhuqV0z3ggSeOWttBqpBEkaNnGH0Gz7rypPkVCmYk0RyXVBPa/DQ/QiHyg z+hS/gkToYYCs/rGt9NRAteKT3Jr8yNtHVmjtOgVyQVdAdpmu5zuG0B+Ht151kgy+I+G VELw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MJBR1NwU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si8084027ejm.397.2019.11.16.07.48.58; Sat, 16 Nov 2019 07:49:23 -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=MJBR1NwU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729508AbfKPPqs (ORCPT + 99 others); Sat, 16 Nov 2019 10:46:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:52560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729326AbfKPPqQ (ORCPT ); Sat, 16 Nov 2019 10:46:16 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A583207FA; Sat, 16 Nov 2019 15:46:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919175; bh=xmdbH0phXbwmcfIEkdotRoCH7S548831AuKSrZqd5Mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJBR1NwUsY7S3L8GuzlCGTHYRmssS46zD1OuSzEpBFkvCtLCUxJPBGoC05Lq7bB+f VL46Qfk2BDKuvlYZP5mWgemwzjVOboPKDDKQj3b8vbfnTI0LVSQGaqg07wR3FmtweI 3l4WTQjBUgLJdToE+apb+mv93ecmKZWKZQBIarEM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Eric Dumazet , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 183/237] net: do not abort bulk send on BQL status Date: Sat, 16 Nov 2019 10:40:18 -0500 Message-Id: <20191116154113.7417-183-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 4a2ee1ce6c024..0a900e353cfff 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