Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3696561ybv; Mon, 10 Feb 2020 04:54:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzH1ZIv2yQIJxFXgIniBKpyCL/ZfeL61ixrPMzyCNArX/tcWkP2RE/kc0jpwsQ2v4E/xMg2 X-Received: by 2002:aca:ea43:: with SMTP id i64mr751620oih.30.1581339242921; Mon, 10 Feb 2020 04:54:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339242; cv=none; d=google.com; s=arc-20160816; b=iD2BFYyPV+8yYAWR8cakNAw3/ECBcvafr+umiaA4UZHLKfWYrhjP/1IRgQNohdckdo huQdNb0YNze9jh2YirtZw6I++FyIdW5SxlKeh1NurCTnK43YFb3ZXB97PQ0xpRJE9Z9A mog5r6VVtPlgCh0zvvo9iYVWMIxup9cnzQ7p83beP8L/6yz6sN91udawSaY3ajFS1290 uKwQg637IBV6POHXB7/oHZMYi6lC76yphMMqDtsJc3b/TE5/O3QFxSBl6Yzv+qAbnxsX nfrc2xWmNbP6BOTEuw1IS+/lO8U1LShd3+BMU7bM47xdbCvBzojfBnrq/KoQk2esLQvI 7M6A== 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=4RQpWeBCRMJvtKCbhwk90O1yOfQaSHHnr636FMo4hCA=; b=fNZunPqjuypQIOps1CvgY9Dr9z2kcQfi1KCmrlwmy8C/DMke7QVx03PMs9Nytt2O8J GxC5kMUsoBvNbtec5Ceu2fiLJvRlbDc4FdQqN+hAHIj5KqpBoC6Nvp+KyUAjlW+rVEY1 GFnnmbB/JLttdyuipuaiIesA/dnkTbJEInfIizcsP3x1c+qPc3SF4O2bEF14yuvra1Xv 980Ar5/+0OB2fJXKKSMDX5pw/PnjhfW9zx8ICcbmBQuDat+ZpY5UcbnbiBHqZc8ORusO 5ADi6tsq4gHks38Dm6F7KQ7kj29XYHgOKAPhUOnL1j8NZBkrMqVENQXupRF711gLRn93 GGHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0jzdUvlz; 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 s20si157482otp.4.2020.02.10.04.53.50; Mon, 10 Feb 2020 04:54:02 -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=0jzdUvlz; 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 S1728596AbgBJMwl (ORCPT + 99 others); Mon, 10 Feb 2020 07:52:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:46368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729958AbgBJMmT (ORCPT ); Mon, 10 Feb 2020 07:42:19 -0500 Received: from localhost (unknown [209.37.97.194]) (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 3C48E2085B; Mon, 10 Feb 2020 12:42:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338539; bh=9a4kOFsJltgCdSoy24riEqC1fTZGjp5zyK8t7m2kL/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0jzdUvlzhzTE/x6gut31asc/VFyKxpuz6sppgJyeS4hkgSdfk97n9xIaulpAUdfcR XqXWYgRpxxLAIH2HpV9wvaqrBcSxy59BvbUUnLMxpZZzRKDgaMy/U2YKUz1sfpE7cs K5YkseRFN3Rm0cdx9LaLspGPoK66WDbnx0ArslUw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinicius Costa Gomes , "David S. Miller" Subject: [PATCH 5.5 339/367] taprio: Fix dropping packets when using taprio + ETF offloading Date: Mon, 10 Feb 2020 04:34:12 -0800 Message-Id: <20200210122453.975739078@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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: Vinicius Costa Gomes [ Upstream commit bfabd41da34180d05382312533a3adc2e012dee0 ] When using taprio offloading together with ETF offloading, configured like this, for example: $ tc qdisc replace dev $IFACE parent root handle 100 taprio \ num_tc 4 \ map 2 2 1 0 3 2 2 2 2 2 2 2 2 2 2 2 \ queues 1@0 1@1 1@2 1@3 \ base-time $BASE_TIME \ sched-entry S 01 1000000 \ sched-entry S 0e 1000000 \ flags 0x2 $ tc qdisc replace dev $IFACE parent 100:1 etf \ offload delta 300000 clockid CLOCK_TAI During enqueue, it works out that the verification added for the "txtime" assisted mode is run when using taprio + ETF offloading, the only thing missing is initializing the 'next_txtime' of all the cycle entries. (if we don't set 'next_txtime' all packets from SO_TXTIME sockets are dropped) Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sched/sch_taprio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -1522,9 +1522,9 @@ static int taprio_change(struct Qdisc *s goto unlock; } - if (TXTIME_ASSIST_IS_ENABLED(q->flags)) { - setup_txtime(q, new_admin, start); + setup_txtime(q, new_admin, start); + if (TXTIME_ASSIST_IS_ENABLED(q->flags)) { if (!oper) { rcu_assign_pointer(q->oper_sched, new_admin); err = 0;