Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3178215pxj; Mon, 7 Jun 2021 04:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziPwL7WyEUmGlNTPoCahNgb+M36PE2L0aJFDfZoN1FEktavKEU/It5LTnq0C2BB47FdVLt X-Received: by 2002:aa7:d550:: with SMTP id u16mr19337857edr.72.1623065296400; Mon, 07 Jun 2021 04:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623065296; cv=none; d=google.com; s=arc-20160816; b=VpIuuvA/4/gHJraJoMehYgPm8F+ncRV4Juz/bOM6NoDMb6k77MX7G4HZTXvKHxXxZd UokGkPrey45jKOaRvdlRh8wtlaWq7pGscvQTAn0o3fge8DqMnvOn/d9nAtO9yPpnZ+fh gzWhVyTq8ezCqSihN/9APBngTMN/eW0JtxzGNDFoHShM11NFuLnVBY8HoFJO1EcTQhGC LgufUalMpc8HI7aG/st9dYsHOVgzjsbZq52l39XfWQEUJrdnQZvgip8uUZRb3n1mD84v PMWtezWaMsFznElMp8IcODtCcA0thI1JNSDE/8r/BAIg+zaVMMmOFWwXmMUfCNK2m70s kY0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=ZB1kEjY2/j4tNhidAjSOjOaVBrtrrrTc3QaDeoaXG/4=; b=pvOOwZa0YRpWLtLiwIoRPAdBkrSWjrntbEB6Yz39knHJa/sBK0PoGQtjYRSvkAM2Fx g/pSShDWtBKp4B28Byl8ww4OzL4ciUr4AuhpzQWCJ0DAN+aNbjMyVAURQe3fB1OHkgHl 14a6qCWytd63QZXgyzubczmc0O47enu15FIDbPixNpJz5U9LYsNENw79I0k/ijBj67x+ XTTqZShZKAZgiadYU0JpdUPukeVkwtNwKvNl2BocTAxIae/Pd6Z9EczofgttDjDSWsoX Ml7r1yha/vaLXe4MT0ratProRCACz7+lxCJKAj580PF4h0luIwfDemRrXShOmPplQvU2 h58g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Pzrimpc4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si12522158ejo.496.2021.06.07.04.27.52; Mon, 07 Jun 2021 04:28:16 -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; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Pzrimpc4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbhFGL2Q (ORCPT + 99 others); Mon, 7 Jun 2021 07:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbhFGL2P (ORCPT ); Mon, 7 Jun 2021 07:28:15 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6830C061766; Mon, 7 Jun 2021 04:26:24 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 75CCB22173; Mon, 7 Jun 2021 13:26:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1623065183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZB1kEjY2/j4tNhidAjSOjOaVBrtrrrTc3QaDeoaXG/4=; b=Pzrimpc4RtMjAxFsZKlot+mljm3uKrLaVVbAQ22cyHnx3/UKU4F+eeuhlPBEwHSyx9XZWt Ett11TC8Y/q96u3lE7HHjQk/FIC0BstS64ASHb5sqZnqVqgAShjspluD6JKzDtENZAilzL q40uBZd3xfFA3yQuvJtARNjgYHyehNo= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 07 Jun 2021 13:26:22 +0200 From: Michael Walle To: Vladimir Oltean Cc: Xiaoliang Yang , Vladimir Oltean , UNGLinuxDriver@microchip.com, alexandre.belloni@bootlin.com, allan.nielsen@microchip.com, Claudiu Manoil , davem@davemloft.net, idosch@mellanox.com, joergen.andreasen@microchip.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Po Liu , vinicius.gomes@intel.com Subject: Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config In-Reply-To: <20210507121909.ojzlsiexficjjjun@skbuf> References: <20210504185040.ftkub3ropuacmyel@skbuf> <20210504191739.73oejybqb6z7dlxr@skbuf> <20210504213259.l5rbnyhxrrbkykyg@skbuf> <2898c3ae1319756e13b95da2b74ccacc@walle.cc> <20210507121909.ojzlsiexficjjjun@skbuf> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <07b1bc11eee83d724d4ddc4ee8378a12@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vladimir, Hi Xiaoliang, Am 2021-05-07 14:19, schrieb Vladimir Oltean: > Devices like Felix need the per-queue max SDU from the > user - if that isn's specified in the netlink message they'll have to > default to the interface's MTU. Btw. just to let you and Xiaoliang know: It appears that PORT_MAX_SDU isn't working as expected. It is used as a fallback if QMAXSDU_CFG_n isn't set for the guard band calculation. But it appears to be _not_ used for discarding any frames. E.g. if you set PORT_MAX_SDU to 500 the port will still happily send frames larger than 500 bytes. (Unless of course you hit the guard band of 500 bytes). OTOH QMAXSDU_CFG_n works as expected, it will discard oversized frames - and presumly will set the guard band accordingly, I haven't tested this explicitly. Thus, I wonder what sense PORT_MAX_SDU makes at all. If you set the guard band to a smaller value than the MTU, you'll also need to make sure, there will be no larger frames scheduled on that port. In any case, the workaround is to set QMAXSDU_CFG_n (for all n=0..7) to the desired max_sdu value instead of using PORT_MAX_SDU. It might also make sense to check with the IP supplier. In the case anyone wants to implement that for (upstream) linux ;) -michael