Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2349439pxb; Mon, 19 Apr 2021 03:46:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzk4ts15C2FcOUAYo9/QGCoMVZJ+XZLemmLd7/Ke5qVB/RJap1FRApBbB1x93FD7M7fID1 X-Received: by 2002:a17:906:fa18:: with SMTP id lo24mr21163050ejb.125.1618829161963; Mon, 19 Apr 2021 03:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618829161; cv=none; d=google.com; s=arc-20160816; b=aVW3GMNQ+P8olnlzIMxr8HkLQfYpFyUztw/BkbOp6n3XzbfV+XMyto0+ex9aU1eIcx Jmh02EeOiajbOKqOAnFsJ1Q4gHjnJv9c/jMILcbjI2gA93DxcgEbiqB5jmCW/nOqsU9K NeoiNVTMxEyGEKYDlym3vYempWxYiSAT4BwgyhDCOzLfwbhGkZDbXErpeAvHj2yYxLUm 2CIh/LKd0sKmZhqc3hL1JVZFI1+BJRqaJiYd9HqOxP7Wg3Oi5wW5tGMPxny2iaxqzY6w OZ9ejDZYa8/8b4yJ7pW8TuXJ7DO/FwqIIiPIcfZx5aoHHNudfsYJ6vhS2t3wLt0zXRem kuSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=qNr9fiM42U9EPzZJI5DyLDy3fjgSrCMtrOaxjD6bUh0=; b=TgR4sr7nW5c3KwSl2AHsd9QMT/o/L6pjJxfwUOSacHq1mcVvAhunPIUcVA5yKVVOgd h+6JbdhSu8m28DqRaV90vrVWrQqx3N+3scXJG+X7OiTlQ/g680kuTUcH6+DUvvjOAAEd +vmPd+59zWQ8dhTEe2I8578LS5oRTaDSm8B35MeWxJyEfLuAZEbxPvOr0/9RborjtHiy BtucawSYIKi0CcRnaqs32MFPR0X0gIW0OTXrSPl24yjWzTu8a17aJoxc8wy5jnV380lZ TtvsAJBgJU6ZaePSsdMNU4tZzIux7awC8R5C71mXxldD+lsOl3QY+x5Xo2CJW1uNFZM8 Y+dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp11si10943321ejb.737.2021.04.19.03.45.37; Mon, 19 Apr 2021 03:46:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232539AbhDSKVa (ORCPT + 99 others); Mon, 19 Apr 2021 06:21:30 -0400 Received: from inva020.nxp.com ([92.121.34.13]:35950 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238459AbhDSKVB (ORCPT ); Mon, 19 Apr 2021 06:21:01 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2B2A01A16AC; Mon, 19 Apr 2021 12:19:24 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DAFC21A1308; Mon, 19 Apr 2021 12:19:14 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0D9BB40291; Mon, 19 Apr 2021 12:19:02 +0200 (CEST) From: Xiaoliang Yang To: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: xiaoliang.yang_1@nxp.com, Arvid.Brodin@xdin.com, m-karicheri2@ti.com, vinicius.gomes@intel.com, michael.chan@broadcom.com, vishal@chelsio.com, saeedm@mellanox.com, jiri@mellanox.com, idosch@mellanox.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, ivan.khoronzhuk@linaro.org, andre.guedes@linux.intel.com, yuehaibing@huawei.com, allan.nielsen@microchip.com, joergen.andreasen@microchip.com, colin.king@canonical.com, po.liu@nxp.com, mingkai.hu@nxp.com, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, leoyang.li@nxp.com Subject: [net-next] net: dsa: felix: disable always guard band bit for TAS config Date: Mon, 19 Apr 2021 18:25:30 +0800 Message-Id: <20210419102530.20361-1-xiaoliang.yang_1@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ALWAYS_GUARD_BAND_SCH_Q bit in TAS config register is descripted as this: 0: Guard band is implemented for nonschedule queues to schedule queues transition. 1: Guard band is implemented for any queue to schedule queue transition. The driver set guard band be implemented for any queue to schedule queue transition before, which will make each GCL time slot reserve a guard band time that can pass the max SDU frame. Because guard band time could not be set in tc-taprio now, it will use about 12000ns to pass 1500B max SDU. This limits each GCL time interval to be more than 12000ns. This patch change the guard band to be only implemented for nonschedule queues to schedule queues transition, so that there is no need to reserve guard band on each GCL. Users can manually add guard band time for each schedule queues in their configuration if they want. Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix_vsc9959.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 789fe08cae50..2473bebe48e6 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1227,8 +1227,12 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port, if (taprio->num_entries > VSC9959_TAS_GCL_ENTRY_MAX) return -ERANGE; - ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port) | - QSYS_TAS_PARAM_CFG_CTRL_ALWAYS_GUARD_BAND_SCH_Q, + /* Set port num and disable ALWAYS_GUARD_BAND_SCH_Q, which means set + * guard band to be implemented for nonschedule queues to schedule + * queues transition. + */ + ocelot_rmw(ocelot, + QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port), QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM_M | QSYS_TAS_PARAM_CFG_CTRL_ALWAYS_GUARD_BAND_SCH_Q, QSYS_TAS_PARAM_CFG_CTRL); -- 2.17.1