Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4975rwn; Wed, 14 Sep 2022 15:01:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR4nPs0upm9VasAM4OIG/v6KDm3gNP9fRVwRpDcwdE7lYoM5ooO0PyqAlaESlUBOKVb73qeU X-Received: by 2002:a63:3409:0:b0:438:c9c9:5582 with SMTP id b9-20020a633409000000b00438c9c95582mr18004826pga.69.1663192879593; Wed, 14 Sep 2022 15:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663192879; cv=none; d=google.com; s=arc-20160816; b=kU3e/iiq5oP7bHiRcpHriyatQDazFMvyOU6pQFDP+R1VGgrzlDSSeifGDEAiWfuSTx Qk2UWv5ukAcYR8lycUhasxYkGWJcYyIJZqmKah0nlxRPkHLIUs0fcPpQealpA/aQlXHd ICDOXLaB6c5z370qIurjc36bQGiuMkuFGvoNJOBV6gKkRbUCqi7Y+icx4S8tydrHMTs8 e0Z+9zVuatRare7ZqWXX248lGWl0qAj6DmeEJHrw72DGmTHgSJkrYCy2GZ7clddepmAV i8CkP4j5864BMjM7eB1ZY1HXfBxNJOe4mxlEFhjnzPEymkkOkdXxY4RjZEJDvVtU/Kf+ OgMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=TlbTSjjHCC94RxfkZXSRNJ7mNr9pvuZ8O+sOLqt80Uk=; b=gVetuLCMf5ZfT3gvJY65l+YMZS8AER+6v4NFd5aAgXeTLn0aQJ2Q+G8MMOgPJKZVMp kovKz6nUupmap8yz3ztxYB0fMM6ZaYgBPU5wp2fDZO1B/Hgp35mcPgaXwQE+iYKPQKMz rTBE7Yh0wc/HxNPCdvhgVtS5RLDkj8mEdTCoaaTqBWdBPAA1MUT0kvDemLWZRDk+1ohd nTkPYxhA/D65038Tqxo7n2fgECbVme6L8/tPSmrF7mKweW57wLk6h9JZLdpoKtRwhczg nC0QmILvU7V8SfBf3a4ASxQz+Id9CogwRWaG7PCmNe7hEeEW3j2v3L8HqQKzxyt0vtJT UhMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FXoTuvP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a63dc4a000000b0043853f7995csi4519253pgj.161.2022.09.14.15.00.52; Wed, 14 Sep 2022 15:01:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FXoTuvP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbiINVrO (ORCPT + 99 others); Wed, 14 Sep 2022 17:47:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbiINVrK (ORCPT ); Wed, 14 Sep 2022 17:47:10 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13B6E81695; Wed, 14 Sep 2022 14:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663192029; x=1694728029; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=cbnXqtf2TMDhDBxTiSWRd+F7VowQpmqU+RCKBnbHXtk=; b=FXoTuvP1cr9qwBNJx8u5qjAXvrV+lZjFWEWNJoRWOCO/nyHuez+cB9NH xXQHLk4SckczThTWuSpLUgk5013fgoqr+u2N0KBfRuFIl2CT+KfrWi9vh Nl++MEPA48x7QyC1kf3V1N10M545v94k7zNTn4KBvhUfRw4Ge7c0nlaNF mvkaPr00IvXi0hed+9331kaFpGcoULh7LL+zJJCXHNWLHOiClyb5vK8wH goxHX0noXA1YYI9rg2EHtm4RZAs++dcGTykUGKTFKcPdVnfXz5MXwRjSo mau+NU9bxO7Uj+RGpkF++xqXs3QjcAO281MA/GC2MGrP7WncmC8APhESD A==; X-IronPort-AV: E=McAfee;i="6500,9779,10470"; a="384842037" X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="384842037" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 14:47:08 -0700 X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="568172315" Received: from vcostago-desk1.jf.intel.com (HELO vcostago-desk1) ([10.54.70.10]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 14:47:08 -0700 From: Vinicius Costa Gomes To: Vladimir Oltean , netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xiaoliang Yang , Rui Sousa , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Michael Walle , Maxim Kochetkov , Colin Foster , Richie Pearn , Kurt Kanzenbach , Vladimir Oltean , Jesse Brandeburg , Tony Nguyen , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Gerhard Engleder , Grygorii Strashko , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 00/13] Add tc-taprio support for queueMaxSDU In-Reply-To: <20220914153303.1792444-1-vladimir.oltean@nxp.com> References: <20220914153303.1792444-1-vladimir.oltean@nxp.com> Date: Wed, 14 Sep 2022 14:47:08 -0700 Message-ID: <87edwdiq77.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vladimir Oltean writes: > Michael and Xiaoliang will probably be aware that the tc-taprio offload > mode supported by the Felix DSA driver has limitations surrounding its > guard bands. > > The initial discussion was at: > https://lore.kernel.org/netdev/c7618025da6723418c56a54fe4683bd7@walle.cc/ > > with the latest status being that we now have a vsc9959_tas_guard_bands_update() > method which makes a best-guess attempt at how much useful space to > reserve for packet scheduling in a taprio interval, and how much to > reserve for guard bands. > > IEEE 802.1Q actually does offer a tunable variable (queueMaxSDU) which > can determine the max MTU supported per traffic class. In turn we can > determine the size we need for the guard bands, depending on the > queueMaxSDU. This way we can make the guard band of small taprio > intervals smaller than one full MTU worth of transmission time, if we > know that said traffic class will transport only smaller packets. > > Allow input of queueMaxSDU through netlink into tc-taprio, offload it to > the hardware I have access to (LS1028A), and deny non-default values to > everyone else. > > First 3 patches are some cleanups I made while figuring out what exactly > gets called for taprio software mode, and what gets called for offload > mode. > > Vladimir Oltean (13): > net/sched: taprio: remove redundant FULL_OFFLOAD_IS_ENABLED check in > taprio_enqueue > net/sched: taprio: stop going through private ops for dequeue and peek > net/sched: taprio: add extack messages in taprio_init Indeed. I think the first three patches can be in a separate series. > net/sched: taprio: allow user input of per-tc max SDU > net: dsa: felix: offload per-tc max SDU from tc-taprio > net: enetc: cache accesses to &priv->si->hw > net: enetc: offload per-tc max SDU from tc-taprio > net: dsa: hellcreek: deny tc-taprio changes to per-tc max SDU > net: dsa: sja1105: deny tc-taprio changes to per-tc max SDU > tsnep: deny tc-taprio changes to per-tc max SDU > igc: deny tc-taprio changes to per-tc max SDU > net: stmmac: deny tc-taprio changes to per-tc max SDU > net: am65-cpsw: deny tc-taprio changes to per-tc max SDU > > drivers/net/dsa/hirschmann/hellcreek.c | 5 + > drivers/net/dsa/ocelot/felix_vsc9959.c | 20 +- > drivers/net/dsa/sja1105/sja1105_tas.c | 6 +- > drivers/net/ethernet/engleder/tsnep_tc.c | 6 +- > drivers/net/ethernet/freescale/enetc/enetc.c | 28 ++- > drivers/net/ethernet/freescale/enetc/enetc.h | 12 +- > .../net/ethernet/freescale/enetc/enetc_pf.c | 25 ++- > .../net/ethernet/freescale/enetc/enetc_qos.c | 70 +++---- > drivers/net/ethernet/intel/igc/igc_main.c | 6 +- > .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 6 +- > drivers/net/ethernet/ti/am65-cpsw-qos.c | 6 +- > include/net/pkt_sched.h | 1 + > include/uapi/linux/pkt_sched.h | 11 + > net/sched/sch_taprio.c | 194 +++++++++++++----- > 14 files changed, 283 insertions(+), 113 deletions(-) > > -- > 2.34.1 > Cheers, -- Vinicius