Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18000959ybl; Thu, 2 Jan 2020 16:34:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzLiQYU2Tq93jq22evKFuTI09Z+oqAndl9atHYx1X3/hch31E8hpU88T1tPhewlOoWmrA/n X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr92844487otc.123.1578011640336; Thu, 02 Jan 2020 16:34:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578011640; cv=none; d=google.com; s=arc-20160816; b=t7bcNw3LlM4q5Bzyg+b7hCcte0bxgIZ+I3ec5vnLzWFiymOQ9Nohnk/479ztsTmwki D9WdSfnV9amSO3HcZdhnXxMSw9szphEyQx0/HDCbcAuPPFG4X4Fa+ZMoJEtL3of5O3lr rL+4ItVXo8bAvir+FftQY8BxKu2pLdByY6yItsrvvcpYHd1UgNMJZm5B8u9n0Ukoe9u8 arj4vs/iMAoOOO+9Scf4nwU5g4QgzLocxW0NZcZXoXtaUttsg/jKJOdpd+wv6iTKIihY SR68B/1OWw/gqi0JAcIGekL0fTaKn7+QuX3SzMr/5oGo7gd7bPIH/iWaFu42azMhJJL6 oRpA== 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:from:subject:cc:to:message-id:date; bh=NclIbxQQmnRRprEPDFfA+i4Pc/7Vx0ZcYvaKW71lf/E=; b=QsBaKCYFN/O7VfrQChzqiIcsCFCOpiB+lzy9zRj/WG+P+8mLLhUBPkBTR1K5nnaKZI sm8sBoa12xBhKwdsHD1C3iB6EqcCei3KD3lzmmfz2MCRiTKSqLuZCBEqwL9RlqMcDs2q RTUKPbJ/2yLPCOZL442rFKVw9TfQN57I9NKGEuJHPbIXNl7J+AFvI55UnLsDWZGcpLzQ DENua6+b5yiqYUL/b09HlBeiidJARCXGyEtwGk5iv6jiOgsBln8dPXTCZC2/wTlsSPRx wTj3q5SeojJs+YiFFZEBRfiNZGk/hxfBA5UJMGUg9yB3ejmhLIhtwpuN+kQdnFoqQTSH 0S2g== ARC-Authentication-Results: i=1; mx.google.com; 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 t20si21743243oth.311.2020.01.02.16.33.48; Thu, 02 Jan 2020 16:34:00 -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; 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 S1726136AbgACAdE (ORCPT + 99 others); Thu, 2 Jan 2020 19:33:04 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:55872 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgACAdE (ORCPT ); Thu, 2 Jan 2020 19:33:04 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1c3::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 2AF0615729D00; Thu, 2 Jan 2020 16:33:03 -0800 (PST) Date: Thu, 02 Jan 2020 16:33:02 -0800 (PST) Message-Id: <20200102.163302.1487790740822950185.davem@davemloft.net> To: po.liu@nxp.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, vinicius.gomes@intel.com, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, alexandru.marginean@nxp.com, xiaoliang.yang_1@nxp.com, roy.zang@nxp.com, mingkai.hu@nxp.com, jerry.huang@nxp.com, leoyang.li@nxp.com, ivan.khoronzhuk@linaro.org Subject: Re: [v3,net-next] enetc: add support time specific departure base on the qos etf From: David Miller In-Reply-To: <20200102044300.29951-1-Po.Liu@nxp.com> References: <20191227025547.4452-1-Po.Liu@nxp.com> <20200102044300.29951-1-Po.Liu@nxp.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 02 Jan 2020 16:33:03 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Po Liu Date: Thu, 2 Jan 2020 04:59:24 +0000 > ENETC implement time specific departure capability, which enables > the user to specify when a frame can be transmitted. When this > capability is enabled, the device will delay the transmission of > the frame so that it can be transmitted at the precisely specified time. > The delay departure time up to 0.5 seconds in the future. If the > departure time in the transmit BD has not yet been reached, based > on the current time, the packet will not be transmitted. > > This driver was loaded by Qos driver ETF. User could load it by tc > commands. Here are the example commands: > > tc qdisc add dev eth0 root handle 1: mqprio \ > num_tc 8 map 0 1 2 3 4 5 6 7 hw 1 > tc qdisc replace dev eth0 parent 1:8 etf \ > clockid CLOCK_TAI delta 30000 offload > > These example try to set queue mapping first and then set queue 7 > with 30us ahead dequeue time. > > Then user send test frame should set SO_TXTIME feature for socket. > > There are also some limitations for this feature in hardware: > - Transmit checksum offloads and time specific departure operation > are mutually exclusive. > - Time Aware Shaper feature (Qbv) offload and time specific departure > operation are mutually exclusive. > > Signed-off-by: Po Liu > Reviewed-by: Vladimir Oltean > --- > Changes v2-v3: > - Avoid tx checking sum offload when setting TXTIME offload. This is > not support in hardware. This looks a lot better, applied, thank you.