From mboxrd@z Thu Jan 1 00:00:00 1970 From: Song Liu Subject: [PATCH net-next] net: remove bypassed check in sch_direct_xmit() Date: Mon, 28 May 2018 14:36:32 -0700 Message-ID: <20180528213632.1412353-1-songliubraving@fb.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Song Liu , , John Fastabend , Alexei Starovoitov , "David S . Miller" To: Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:46832 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932199AbeE1Vgy (ORCPT ); Mon, 28 May 2018 17:36:54 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4SLYc44000526 for ; Mon, 28 May 2018 14:36:54 -0700 Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2j8p4ngb15-4 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 28 May 2018 14:36:54 -0700 Sender: netdev-owner@vger.kernel.org List-ID: Check sch_direct_xmit() at the end of sch_direct_xmit() will be bypassed. This is because "ret" from sch_direct_xmit() will be either NETDEV_TX_OK or NETDEV_TX_BUSY, and only ret == NETDEV_TX_OK == 0 will reach the condition: if (ret && netif_xmit_frozen_or_stopped(txq)) return false; This patch cleans up the code by removing the whole condition. For more discussion about this, please refer to https://marc.info/?t=152727195700008 Signed-off-by: Song Liu Cc: John Fastabend Cc: Alexei Starovoitov Cc: David S. Miller --- net/sched/sch_generic.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 760ab1b..69078c8 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -346,9 +346,6 @@ bool sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, return false; } - if (ret && netif_xmit_frozen_or_stopped(txq)) - return false; - return true; } -- 2.9.5