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 822C9C432C0 for ; Wed, 27 Nov 2019 21:40:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 564202075C for ; Wed, 27 Nov 2019 21:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574890832; bh=55QJa0/qN3W+hhW2WiN2ehyXwX7TS3HfPxyJsp8ucvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SEVFvO1eAHcmsZKXADZBt/ZtMtwyLLApW9QbRYRUgdYkFYiYjMpHxI3J3kCEan3ri uscvG0MRjQ+piYH1I1DfQLDrsvLzCpLZbXHFnYOgSF9pJrkqK4yibkOBlsyLRIkBNg k2z4h0bnxfPtVoP+VYiYXtrx/yHZhx0OzgCE74vE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729373AbfK0Um6 (ORCPT ); Wed, 27 Nov 2019 15:42:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:49940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728934AbfK0Um6 (ORCPT ); Wed, 27 Nov 2019 15:42:58 -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 CB40F21780; Wed, 27 Nov 2019 20:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887377; bh=55QJa0/qN3W+hhW2WiN2ehyXwX7TS3HfPxyJsp8ucvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MrHCb6b03DXqkuUemZeG0BfbJjA+ysI+ftV/2fuQzywxRJXyk8gYQVEIQL9vbsgCJ hMRzg3GWCyQq7eUMjVKhnBqEE/Se+9RYTFmpAtL0pZlT4gHN0FMwbFj8yIDmVr2JrT 8cwheNHSmPZhO7RnaArrGVxL/ESdwfMNNNPzsbo4= 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.9 087/151] net: do not abort bulk send on BQL status Date: Wed, 27 Nov 2019 21:31:10 +0100 Message-Id: <20191127203036.805304992@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@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 547b4daae5cad..c6fb7e61cb405 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2997,7 +2997,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