Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5149200pxj; Wed, 9 Jun 2021 10:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTTPgEqpvX3vmdSvWSH9kqcweczkW72wJ1eMyg1vhBT3o9p/IisSEWf8+Gc+klKGl2JlHT X-Received: by 2002:a05:6402:311c:: with SMTP id dc28mr452685edb.291.1623258818046; Wed, 09 Jun 2021 10:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258818; cv=none; d=google.com; s=arc-20160816; b=XEnUgwpBZ5W0+ttzoo447TQBTSoBBLYyqlX7FOIwn7borcrMYW4eVxreb93PuSSfMa 9hRiOsKiXVYFzPrYt1fhsc8SGty7Ow5RzhlkjG9VlUm8Z/Qkwq3S9F+6L06zZY0abDdN T4avZV2aiH29+lymKZrQsxHpvww+fPWP9+XlBsCThXuWU1TUwt6bhc0OlU2e60vcdbCo PZoY+DOEr14xDBsQ80XNKz4XceFF1w6vWC+/cOKW4AoQZsXWUrmtTHKRJ25BrjmtWEAn OKDw3jxLcyJeJGX+GGkv4KEbAq6PIF6J/u8gaDdNjRLrR6fFHZaRAK0NDwuMSfz3TJtk 7XTg== 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=vIOggMOH/sTibwxER0iVx8Wsd+NnlmsfQG1YNVwFlk0=; b=C4QI7o9ne3Z3rHjlgC0gQpmox2SUK0S50ZeE1lSUiAAlvhMKZzgPcxOvkIBXL37L+j y+I+3U1or7Rv1Bcuy9JpA7JTx2PU2JujPq+5eQxk5/80dWwHigfhmJ7D4NSbVJG1LsOM r/4h0pgzK6xzn+N7tGLC0dlQ0DgtSqGIwBUadIHuPGJduf4r2klnNVJtSqVqKyD3dtna V+LqktfxrnAaarst0ewMxY3KcVNNm0bRDQH7NAny1LR3cqvM2I0hGa4x03PFtaukaKhZ YP4PMLpWVUYL5EENps1smbDrbTmjiZ2LLHfn23uIEXYbNqgT9/xHlCN1fcDSrcPLUDbN zyVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=NJlJPCft; 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 t27si257571ejd.372.2021.06.09.10.13.14; Wed, 09 Jun 2021 10:13:38 -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=NJlJPCft; 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 S237000AbhFIInx (ORCPT + 99 others); Wed, 9 Jun 2021 04:43:53 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:49199 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232555AbhFIInw (ORCPT ); Wed, 9 Jun 2021 04:43:52 -0400 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 47D6922173; Wed, 9 Jun 2021 10:41:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1623228117; 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=vIOggMOH/sTibwxER0iVx8Wsd+NnlmsfQG1YNVwFlk0=; b=NJlJPCftDBjjCFjGBv5judzgch7SzBocWzptSmxUhu2LiKrjDq+VbRJ49EpFXhiAb6/HYF SVmmeiwbGtjIjso8WmGI+saz87lo7D9qkdw/GD1nSyvGzFx0VjtYtUfYJnYZjJdqEZi+tq zjgk/7XpdAWxOt7jmqJKUqyxUmr2xBw= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 09 Jun 2021 10:41:55 +0200 From: Michael Walle To: Xiaoliang Yang Cc: Vladimir Oltean , 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: [EXT] Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config In-Reply-To: References: <20210504185040.ftkub3ropuacmyel@skbuf> <20210504191739.73oejybqb6z7dlxr@skbuf> <20210504213259.l5rbnyhxrrbkykyg@skbuf> <2898c3ae1319756e13b95da2b74ccacc@walle.cc> <20210507121909.ojzlsiexficjjjun@skbuf> <07b1bc11eee83d724d4ddc4ee8378a12@walle.cc> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <32f1854fdc0fda86627371bb82f2c873@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-06-09 10:06, schrieb Xiaoliang Yang: > On 2021-06-07 19:26, Michael Walle wrote: >> >> 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 > > Yes, PORT_MAX_SDU is only used for guard band calculation. DEV_GMII: > MAC_MAXLEN_CFG > limited the frame length accepted by the MAC. But MAC_MAXLEN_CFG is for ingress handling while you want egress handling, for example think two ingress ports sending to one egress port. The limitation is on the egress side. Or two queues with different guard bands/maxsdu settings. > I am worried that > QMAXSDU is not a universal > setting, it may just be set on Felix, so there is no suitable place to > add this configuration. I can't follow you here. I'm talkling about felix and its quirks. Eg. the static guard band handling there, the reason why we need the maxsdu setting in the first place. Or do you think about how to communicate that setting from user space to the kernel? In this case, I'd say we'll need some kind of parameter for this kind of devices which doesn't have a dynamic guard band mechanism. Felix won't be the only one. -michael