Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1267322rwn; Thu, 15 Sep 2022 13:00:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cL9ZfULYptTUY3e9Wj9Hatdt5At/EYtRzAJB1q68LJgB47z5GPQoiqRWRkpoOElYYasOx X-Received: by 2002:a17:90b:4b4c:b0:203:1eef:d810 with SMTP id mi12-20020a17090b4b4c00b002031eefd810mr9935393pjb.75.1663272045697; Thu, 15 Sep 2022 13:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663272045; cv=none; d=google.com; s=arc-20160816; b=XNYTeqhdCTjBW15tbqAhSmONsAeLS5F0yob9o8qgZIOjhR46aycHtVH5RsPsLJlCrD gfX8+dU/AlIn9vwj/amYDZNAvWD7RnccMrVRy0iQdcZuanaVYSnAFjdV1hpTwh5kOfxh Y2xFCmhLz2knPlssg1JnlsCcatVuVyGJitGR9RmOXbhvB+SCU/6jmE2ZrZ1avBkxV3AU eCKoNid2wSG0NCcq2UeTtDoHZB/sIQyWnEaXcok3l0U9hKWD0YLN6Jr+Jnt0urh5ayYT q85DaWfJtQwPZNaXwJE1D5CrTE1maRjFEHli1YvKP0BnEtlrP6t7Zv2yh61vcPqhyH6P ZS+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OYH7Z+byB/1aOr368+THmqOX44j6sd7O1jhzmR6xE94=; b=JEoBC+wU8lyx4PcOg1S0/P3AI9LgocK8FCHeyeOAkdEBD6pmq/jT4ImkY4Kbz4RbOA ICRnQC0UPlyPniTY1VImxY3cg+OEX21ilbKVDjxgPiJAHTb+182/vT65EbCGxDm8WPJ3 ZH8A0RuXKZ1fanbpqK95S/uT81GTkMs/l14SZRfy32axLx/zxRncS91XlsB8AuC4cWwv uX3Z3R7/nbSY1j1jnvGgz4O0kfVg7UZ0kvMVxs35GFqHYlAvRipNNeuTsax/8IpbcWSE 7JlrDeW9Vn3bIWMbSOWafKJh7ARfSyTP1IjGpCOuy/j8MpukzSqXX0h0NpQ6vklwNq5w BHyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@engleder-embedded.com header.s=dkim11 header.b=jH9G2W9F; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a63c103000000b004388ba34df8si18905141pgf.98.2022.09.15.13.00.33; Thu, 15 Sep 2022 13:00:45 -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=fail header.i=@engleder-embedded.com header.s=dkim11 header.b=jH9G2W9F; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbiIOTtX (ORCPT + 99 others); Thu, 15 Sep 2022 15:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbiIOTtV (ORCPT ); Thu, 15 Sep 2022 15:49:21 -0400 X-Greylist: delayed 2872 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 15 Sep 2022 12:49:18 PDT Received: from mx10lb.world4you.com (mx10lb.world4you.com [81.19.149.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F97C6F55E; Thu, 15 Sep 2022 12:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=engleder-embedded.com; s=dkim11; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OYH7Z+byB/1aOr368+THmqOX44j6sd7O1jhzmR6xE94=; b=jH9G2W9FYD1pnqOk0qyV5O8Pq7 2lHD+7ddODU8pBfY6LzI21nrnqkkuGkrJmVbDSk4B4XQrLcFvgDSCMJNYkcwaAnJAizGlJIdR4Fth NyLs+h1GfhyeqTkR6U0WlC4WzCWeMdyN/m4fG8syw/MDUpBqzg8AQNXG7weKyGA+A3fk=; Received: from [88.117.54.199] (helo=[10.0.0.160]) by mx10lb.world4you.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oYu6x-0005iu-Vx; Thu, 15 Sep 2022 21:01:20 +0200 Message-ID: Date: Thu, 15 Sep 2022 21:01:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH net-next 10/13] tsnep: deny tc-taprio changes to per-tc max SDU Content-Language: en-US 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 , Vinicius Costa Gomes , 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 , Grygorii Strashko , linux-kernel@vger.kernel.org References: <20220914153303.1792444-1-vladimir.oltean@nxp.com> <20220914153303.1792444-11-vladimir.oltean@nxp.com> From: Gerhard Engleder In-Reply-To: <20220914153303.1792444-11-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AV-Do-Run: Yes X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS 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 > Since the driver does not act upon the max_sdu argument, deny any other > values except the default all-zeroes, which means that all traffic > classes should use the same MTU as the port itself. > > Signed-off-by: Vladimir Oltean > --- > drivers/net/ethernet/engleder/tsnep_tc.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/engleder/tsnep_tc.c b/drivers/net/ethernet/engleder/tsnep_tc.c > index c4c6e1357317..82df837ffc54 100644 > --- a/drivers/net/ethernet/engleder/tsnep_tc.c > +++ b/drivers/net/ethernet/engleder/tsnep_tc.c > @@ -320,11 +320,15 @@ static int tsnep_taprio(struct tsnep_adapter *adapter, > { > struct tsnep_gcl *gcl; > struct tsnep_gcl *curr; > - int retval; > + int retval, tc; > > if (!adapter->gate_control) > return -EOPNOTSUPP; > > + for (tc = 0; tc < TC_MAX_QUEUE; tc++) > + if (qopt->max_sdu[tc]) > + return -EOPNOTSUPP; Does it make any difference if the MAC already guarantees that too long frames, which would violate the next taprio interval, will not be transmitted? MACs are able to do that, switches not. The user could be informed, that the MAC is considering the length of the frames by accepting any max_sdu value lower than the MTU of the netdev.