Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp8130451rwn; Wed, 14 Sep 2022 09:20:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR7LF+NLprfU8sKEMT2DfYOUWUkMS7NM2z55epYlyEv2KHsz09Yl1cPgd+VNvvUn5WQyuWJg X-Received: by 2002:a63:91c7:0:b0:438:36c9:9022 with SMTP id l190-20020a6391c7000000b0043836c99022mr27248843pge.573.1663172442773; Wed, 14 Sep 2022 09:20:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663172442; cv=pass; d=google.com; s=arc-20160816; b=oHbLNj2Cr/M6iUZjSA2pdIxuWtDqJKA98ELZZcr3Yhr0XQ9nDkPFuanosbGPQg7b8c Ks3UcjL21skxx/xI3xe6+llS/6uqpSkQl60qlv5e0hio1FQU/qXzC54iecNUg4fJY5A/ i+66SuyQzago2n65hO7Ok6qmUklxP2Hw3sn0zckL6vW8uwBkS4qlolUO13xWFV7+Qc4Q 9ulNj+o4HnhBdGP/E8fkFV4iRtKIN2ov0ETOPvy3b79iTOGuoaa7vjUMB/IMJlw319qw LRntvEeSkz77CWgLKcJu6l9ZtEgbF2XcKxm2jdUKPxpG2Ju4qWGdHkCzveZyD0ECz1X8 FgSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0El6NQDyc+djYREiGiUdjvu1T8eoTGCj+wgmlZaSVfc=; b=eHZc0qH77BupMKH/kVUT1yWDsmVi6OzESb4B9dz384IZdCjKVQdvRFxW22tV7M2wyR km6o1oB0b7dsxu3BwBH6f6fun+sHp+SelVLkCvWBvq6slPiNBU/iJOIX+g+5WGHwJRJk OWSMLwd1zcpnMpfQ6vksJjQHO+su/7WgzLnC3HJYfzKnV+27x4DzPBPQ4MM7Ax5sfmai CqLgR3feI/IJp8cmIkYOEKhMeP0CPQcC88I3PjH/3xa4Ym81ZVRWT4IjK6Jojiaic+xN gVYBEqcHUMBnEJnwjk08/43PizQjHrdKVzY7o47pKQPiwul765BflY1f5M5RIYz3svJ8 gP8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=KqFCcKwd; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k70-20020a638449000000b0041a77ebb731si4883218pgd.294.2022.09.14.09.20.28; Wed, 14 Sep 2022 09:20:42 -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=@nxp.com header.s=selector2 header.b=KqFCcKwd; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbiINPew (ORCPT + 99 others); Wed, 14 Sep 2022 11:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbiINPdz (ORCPT ); Wed, 14 Sep 2022 11:33:55 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2088.outbound.protection.outlook.com [40.107.22.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30FB4CA28; Wed, 14 Sep 2022 08:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NLQQNX4ukfTLPYzjUYgDgNRL8NpFdMVjXk9WCAcYnQkglL/AaqwtmtXlh5tFFdOn8vt8+63DBx7SLqo26TNN7K6B9Rn9gxod4CcF+OzU9HCB/ti1zfODZxJocOA9J/9W/9WyXc5ASQO8mqZJxX78uqxoAG3KqYpPWGZZR5Jyszk3nySusryuI1k4VXNEQhcuqKTCaQtpMEjdAZQKuuSbachbX/ucfKO5lh5QFrVAXSCSXoqgr9HVCC1VV9lFGWazuDg3R66pX4nLC6yspCdEsmnjvXMalD/5bZRrpG0ZMzz23GQACoo0D5BvbUnizWP5S1UwkWCdmT0DPMfFRpdhtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0El6NQDyc+djYREiGiUdjvu1T8eoTGCj+wgmlZaSVfc=; b=U9ctBXXB7zOyjw2TGy632a4ZekqzpxuFjeh8pxqdGbJhT3slwi98OBTbgf8HM2yffI0oQ8J+jVTCPlr3ycokbzt22MDhbXMny21EkXXOhY3l9UA69jkiaqyElI1TIigX1CMqvJ3PzCYNiLVGTiGL3MnskAVATA9j/xa4LHAmzl1yGS5zQlRyB1fYRlyvDLD6ARQSaB9R7pzhQXNh8vHuVbjTUOpdpLm2Af6wR26Ewnn2uG09eNa4XvJTzRFCpO2q0eC6EpJPGnx6QQDJ5N0QUYKhUlOKHvqmGO1XLqGyuvvNeZB5qLz3D8AePcsf+lo7/rMVW6mWnrQg17ZOUT9lZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0El6NQDyc+djYREiGiUdjvu1T8eoTGCj+wgmlZaSVfc=; b=KqFCcKwd/N1tOjecCXgz+jekwii6Fr9Xciy5BWq7CFEHzNWJ2v2ri5/y+xgl84tUS43cLeCTHnhWYhOCr287LUIGbUMSqk2lfOcuJZKVAoYbSNP3wx+XzTctZgpd1TZi9puN63hgYtrtGF1/OMzDJ2imPrNQT1FhptNLYmxI6Nw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by DU2PR04MB8949.eurprd04.prod.outlook.com (2603:10a6:10:2e0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Wed, 14 Sep 2022 15:33:52 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1%7]) with mapi id 15.20.5612.022; Wed, 14 Sep 2022 15:33:52 +0000 From: Vladimir Oltean To: 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 , Gerhard Engleder , Grygorii Strashko , linux-kernel@vger.kernel.org Subject: [PATCH net-next 10/13] tsnep: deny tc-taprio changes to per-tc max SDU Date: Wed, 14 Sep 2022 18:33:00 +0300 Message-Id: <20220914153303.1792444-11-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220914153303.1792444-1-vladimir.oltean@nxp.com> References: <20220914153303.1792444-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P250CA0023.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:5e3::11) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|DU2PR04MB8949:EE_ X-MS-Office365-Filtering-Correlation-Id: 472e6d07-2df2-4dab-4a8e-08da966686e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mSQjj0QATdPl9bw/4PdB04F31FQBwNXnQ9uWjgZe6rdgefUhepxoK3pT6DNy3SI/7I9ibxYjNtn1AkeU5y46+KmiHR2+OVlOPhAnsy7TR/se0ZmdkU3cKz7Z8S23krWtd70FsCGTkOv7EIT8MBuPpRZfw3i057VpueOchATMmbQLHQ4MLxBj+qeRND6m+YUesLpuRPxlQiMU0YXtyfLrcfOjHpI7sP/5deye4CJ+ePmQUTZ9tkOT19DodCiMcmy1AxZw4VL5D7JJNpyIOI+ywRcp8McLefwXetNTVuGIQAanH/Mbt3H+0wJEPG69BDClmEA9RZhU73RlyZHvqNegu48Kb9YqCHrq+gorBqKfDjGblJhy4v4fjVIyffV6P8zz/hjo7Ox1gy1zUBIY0CztmwCys28kSga2RBNunnoyPGakX6GITW2ivQI/7pXxL0d/1SjCdJ5UTkPRbQ5nJKG+zm4rgWKDp6hUarmqZ79NOn2xlZ7k7lLVNJPLj6H6KKaQxv4yYb3QhdOnmJTZsADaW+mv3kjirMHB5HyNOkRv15qYpxpUcmCJUlxoGDiv1QtS6V83wG4mtUynCy/kpIUgI38JubAJm3FTHKnzbbSpHM7GXQpLVSHmrc4crdLP3HGW41ATl26yyFwVWS7ZRmF+B96ah8lK0t8WFEfLvlnL+phYZ4tT56QtEsVDYC3sfd6h5roTeESObA87QxP2lx+iAx1/BdQHvpt5MkGQiFT+opryHthvzknaV/ywMkJIbG0dpN7uldS4ov1VRQUCDBjSdA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(136003)(396003)(366004)(39860400002)(451199015)(6512007)(2616005)(52116002)(66476007)(44832011)(4744005)(4326008)(41300700001)(66946007)(316002)(26005)(8936002)(2906002)(36756003)(6916009)(54906003)(6666004)(86362001)(38350700002)(1076003)(38100700002)(5660300002)(6486002)(186003)(66556008)(7416002)(478600001)(83380400001)(6506007)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ctfkwiN0GdRpL1pOqxzNe+16PfMbE9ZarSRjitBOQ+TS4LTG/JEzuONGx+o/?= =?us-ascii?Q?V+ga31gb+5DMhbPKsY3cicYapeJEpy3Tc6djMCAGFYS87KzPgKYdnrb4NUSE?= =?us-ascii?Q?+PRWxhU4EXcNgaeY72kF9njpicskvHV+04mMEu7Jw8as+C0tqDRfXGC74NUl?= =?us-ascii?Q?9SHhmmL10b6ubzV4Kq/Yfsh1Pm/5y7Dg0Ojl9H7YqyadVCLnpwOP1dMjJiP0?= =?us-ascii?Q?TUOyqzdXGiSmDBxpjhuQROwuwvmb32FOIJxOyt2yfmnU0ni/WSNDQSBRDxk5?= =?us-ascii?Q?3b9ppESI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qNxUG?= =?us-ascii?Q?KkjLVMXNalGw+27bnHpEegozqpzN6ynQgSjys/KV4Orer2RY4yDkSmg1aSvc?= =?us-ascii?Q?S7qFawkCtazaJJs7rJNS6Sg5IIY+VJcLYHd0yiB9fY0lC3uL/7GrKEZKNMfj?= =?us-ascii?Q?1roQ+cInukvK1Q4jsgltuCfxrUPgAWnBujY9OFHNG7uRoeSTjmB8dVJmHMN7?= =?us-ascii?Q?5eL4Sv1ISuZI2s1zhLZUA94em4fvEB0CFhqDBJXkDlrXRKWIXHZj1twwTI4P?= =?us-ascii?Q?wTPgoRnWodiKq1RR15X+sturHYz2KJetGYY2Y+tOd4DaR1ojjs3A+f9Suohw?= =?us-ascii?Q?jK7FWoQqeMNhJnARHEx/uZbBHs9LjJ+g0J54zZO5EPWCGaZuiRKiQnNLVSRB?= =?us-ascii?Q?qUkhsVAEvxD7Kov9tN+6pWU9yK5p+LFHCxHMUIeDEW7RW54XbrvQ+Kw3JM5A?= =?us-ascii?Q?qA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 472e6d07-2df2-4dab-4a8e-08da966686e6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2022 15:33:52.3072 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ha4svWPcbYrseq1S9xKeiUHuJgrxZh1CDf3IasFxv7HcsleyxjTD8qJOo7HjM1MrN2/88gOkXHX2fFM+D56gqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8949 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,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 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; + if (!qopt->enable) { /* disable gate control if active */ mutex_lock(&adapter->gate_control_lock); -- 2.34.1