Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1227861rwb; Fri, 23 Sep 2022 09:42:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+OnviR3Zk/dKDvM2QkcdzTL0A/olCvCPyka0imjpPl5W5TWAMnQhBVjvGKsx6dzIcmNDq X-Received: by 2002:aa7:c44b:0:b0:44e:e6aa:1558 with SMTP id n11-20020aa7c44b000000b0044ee6aa1558mr9777800edr.263.1663951377509; Fri, 23 Sep 2022 09:42:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663951377; cv=pass; d=google.com; s=arc-20160816; b=KZjZAD0OcU0w+oNvDmf5p8b+5351jqYsd35ENyixfkvGaDKPBQcrjLZOrYhUCuRZ0a zAbfbbQZqBuOVTBre6ab2ajAvYOqXgcki5VGboD8TB4qRa6BIz7z4jN+3YpYYoCiDWwM 79os8iuqidNPY5RU6Y0OPNBodoq5ju5P9i0NKPWUVVy2u9Jx8u9B6VQv/4KkAwTmeQcy drwJzb32O2IZTpjV050NCpeEV81A/zoKwRn38IoLu2yFIkdNxp6ts7ozN+xxFZdfEpVa /ZJtytCmfgSTh6Hc6DjHidQC6pKTQ8Dy6wI1YD01vk5lFaaOWkO1gD8XCGXVKfdJTvC7 bvDA== 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=PwgRF5vQ31hB0Ud0Xog6REIZGvB26mJcMWzOfBDPXrQ=; b=Ut5rFr7wfDroEhMPuAueS2lj0z4N563qKrN0BjaOj/MWBeeGXga1Cil8AgC0clssir 2jrXmJRWRb5ZeLeDakbrztbrYj+Tl4ua+H0td3snV7GGp1THEsYyiGU4DAjMNHapTySz mslpNPhalD5cjnLo18ZegYOs4G2zy2oMW2xXvHIzDvL6ub1JZ4kHj6vQ6lXALx3y7vqQ uTQ7Pdn9CPewHJ0hmIs5ZAGxLdfpjNO0XWxgFTyJZpWJNh939v2rCOup6JcU0UgUvf+I P3xwhyim1dyyht63D8+UHkzzKIf2PVw4raXmPqhfXfE7/UC9L/2DJp8RrpgdN90c+3LA +1Kw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=STB7vyHE; 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 ds6-20020a170907724600b00741827c6304si8816824ejc.772.2022.09.23.09.42.30; Fri, 23 Sep 2022 09:42:57 -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=STB7vyHE; 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 S233008AbiIWQeZ (ORCPT + 99 others); Fri, 23 Sep 2022 12:34:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232867AbiIWQdj (ORCPT ); Fri, 23 Sep 2022 12:33:39 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60047.outbound.protection.outlook.com [40.107.6.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3889413F297; Fri, 23 Sep 2022 09:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kcyYJau8TwwOP5ohWx0OM2yeTJJlAYCNW+BY5LyD9w2bDe3oNqlcencPv/LXES9TX2MUHsVoZWpzaPVJlt8wzw4C/i1WD0+FxSYaB6nnbvAuuODrFpZ3lSLcSw5axNAqhXZGBx73quzqg4cIyNXrr8qVJGMFizxgm+GulEJniRGAx7qGggjxTqgWe+oYGejqQZ3y1jzhr6ywHKyrOLxWq4fwb//lkrbpwcOIbg3ywrOGuFLuzu5JgYJvSPKeAjEp0Jwpq7ZbUOQWnC79fZa9raZNVcQPimgq9HnpD4XrhCJZHGc1JPtNcD/M09jB8uGbegFqFRdaVFumlNPmJKUxUw== 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=PwgRF5vQ31hB0Ud0Xog6REIZGvB26mJcMWzOfBDPXrQ=; b=btLH9y/kl99fqA3CjxWoUSI/IYrkHcnE7Mb8jIdqniOqVDQx7G1GD613Gy++loaL+GUynhvwt0tpX8l7KbO1yLExMG/7m/bCl8MO4GJC39Cs6u0OcchgCLiKz0JZStdbahXl3QVqhTdjBIZpVcQc5JIFCorNOXmxUVemINwxfbyhXovMQr9g1vTurC1gL1k9h+1WZbvLKPea6Qdjn2T8ZYrgqwH8ChK+NeMO5OHZrJUYB7w64Ov/Fhf8suS2jNnh0LJAbT93ptOSY/Tx92EMYyQfBPRcVt5fTiHBe8ymotD9vkj63SnzciMjjk5mZ5Q0KXc4yF0GezTwRIh8WBRNfw== 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=PwgRF5vQ31hB0Ud0Xog6REIZGvB26mJcMWzOfBDPXrQ=; b=STB7vyHE96SUjiTXGHzsNiNRK40qUX2wRY0lwD2C17AIf+Rc09HyEfXOThvSKw1ddQqhBDmDGgAjH5yUZa0HZRsaUp029RWR3HSle4+ZYVhFgjrcWfT9mpZNIORqDKUgr4W2x1NgD498lxLATVAcxUZ7LF3GNbntSz6EqZXknvk= 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 VI1PR04MB7023.eurprd04.prod.outlook.com (2603:10a6:800:12f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.17; Fri, 23 Sep 2022 16:33:34 +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.5632.021; Fri, 23 Sep 2022 16:33:34 +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, Horatiu Vultur , 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 , linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next 04/12] net: stmmac: deny tc-taprio changes to per-tc max SDU Date: Fri, 23 Sep 2022 19:33:02 +0300 Message-Id: <20220923163310.3192733-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220923163310.3192733-1-vladimir.oltean@nxp.com> References: <20220923163310.3192733-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR10CA0029.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::39) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|VI1PR04MB7023:EE_ X-MS-Office365-Filtering-Correlation-Id: 88c577e0-05de-4fbb-c24d-08da9d815ba6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bOVOQPy2NVRdD7m+PwKJiXA3t9RrBgAZwV8HmRjTIQU0wa6MtoFbT4UUwZF4BooFtmmUZZedjJllGyn0rhQEnBjGAMXqezVjYyJnxFmhIoEXWYAvihevqHsdye8bEbsjSrhPb3+rZZkLsYlO7vld7nAWwIVz3viieBfir41MAGUTjgUCaoHi3/abB4oWBBBTtOEVskgywfgWh6Vs51sxq2pHJn8tWd//KZnyZSPSJBa/oKEUrr5HDVpaSMSmBrXJ97CFpkRhaoIVvCBQiEFXOL3J/9VRFm08SPvV5JvNZrx3TqYIcqHBPmPFrG0kLgKWdI9Gz/2eUC8G7h1Mh/Attkxxj6YfN16Tmu+UiDpRQ1VojHUMoRCYXGZh2cKIM8No6Mfg4rJUocbslw0yefDI73EmpotKyPKOG88rxElhL4IEH3e8gOA1jYEWcLep1Xl8PZQGe8jpdIU79lFzYGKfu9NBF1pqlF5ZLByZS598s/sd/LoCpYMlmR6Jx8xTbXX/AoNNNuPzSkssENE9Ov4d6VTeblkMxQu0ogNmHJoW5phVFF01fFsRzDBzOlqidm7GdZwnWC9eeTZwlR50tgChMgW12Wa1JyPS+YWVclaA3nJ3+JLHlnI/+P09DDvlmX4JoJqjoGMqceoIsqMlPJXceqrJD0xFWM0oeT1MQ9peYdFSqYlHiTo1DfNYeUVNdF64sqQWXDuifBAB5Ws9ZtXpJ4nbSZ9N8xN1rnStA3ARu326FxZ7efNn3A49RTgZ7Ul6KvZZ2syRGt99Et28DxJDwQ== 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)(366004)(346002)(39860400002)(136003)(376002)(396003)(451199015)(478600001)(6486002)(54906003)(4326008)(66556008)(66946007)(6512007)(6506007)(8936002)(66476007)(41300700001)(6666004)(26005)(7416002)(44832011)(8676002)(316002)(5660300002)(36756003)(6916009)(186003)(2906002)(2616005)(86362001)(52116002)(83380400001)(38350700002)(38100700002)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zRbpt6asnOwz6iftdEW/NbAnX94ZwOb82y4lBGxCqUpXYX+QoAf6KFrnfTnV?= =?us-ascii?Q?Id8+O+UiSUvB1SdUBDDVr0EAf3MsqF00iZ1Cd5du9dWwFzkWdPHB94glaBnH?= =?us-ascii?Q?IjIyL4+KUBvDriaibRzxPHZGPKhzdrCRPaf1Njv024BvMLfJV3GYDaHIh/5w?= =?us-ascii?Q?XTwKQBjRAxXXWdi9msLSJN8ZAN489Js1yJxKaBkC0aP1jCW+YoQpykknf4Vf?= =?us-ascii?Q?lwtN30WgHkxLpqjjpdlSx2A95vfpXf4fi2AKKLwSyDE3s3OMN38ESIec9U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TXa+NuDQzWg0Zgl8TMkiXLvC+kWJ49oM7C8Y6m3?= =?us-ascii?Q?TYbxmudR9X5nFapkfTWltFEAbIRb6xRHd7eQb+WzHAz02BS3ZXQ7LHkT8ArG?= =?us-ascii?Q?TEYpmBK/HHrkO9E6gwPBpNY9RFalY6eROKUyoY1RxTKlZ+EpO38fyvaKss1V?= =?us-ascii?Q?GpY3No9KnICkOLXLZ3WuKpKDXprobaq83nZ+st1CrlzZmP+vkLe5nfp6fizE?= =?us-ascii?Q?gEvCY1E8UROzmt/i16f0kD+2xqogDd/5sxD5vf9K1C7o5kKbZeJChDFwv1Xh?= =?us-ascii?Q?5kWoqL5iVTU5xaAemwyRskfNuWOK2W2Wlyf05IpZhW87YHwcmCXsH71aqY1V?= =?us-ascii?Q?Y4I7XpZSNc3bZVwU/IIo2yZk1LJtH5InXCFrS/tiRfMA7cYawcFOL+YXKaTI?= =?us-ascii?Q?0XnS6yl9m4oMYwF5c3bnat/pHtjc3Tu9DitE+ZAmwxJe4wc+W77W4NIAy9wn?= =?us-ascii?Q?wA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88c577e0-05de-4fbb-c24d-08da9d815ba6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 16:33:34.2999 (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: 33HhG0Hzjn+zW5rCLG4BBTgRaMjeGh2aG24GA/uCITygPPOkpI9qEO8Z/gn+vVpcg3i8UktxRPirxmS7kALrVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7023 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 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 --- v1->v2: none drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 773e415cc2de..8e9c7d54fb4c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -922,13 +922,17 @@ static int tc_setup_taprio(struct stmmac_priv *priv, struct plat_stmmacenet_data *plat = priv->plat; struct timespec64 time, current_time, qopt_time; ktime_t current_time_ns; + int i, tc, ret = 0; bool fpe = false; - int i, ret = 0; u64 ctr; if (!priv->dma_cap.estsel) return -EOPNOTSUPP; + for (tc = 0; tc < TC_MAX_QUEUE; tc++) + if (qopt->max_sdu[tc]) + return -EOPNOTSUPP; + switch (wid) { case 0x1: wid = 16; -- 2.34.1