Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1271290rwb; Fri, 23 Sep 2022 10:13:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75tpoXBEhMlwX+qZacg10p8RNyTjIcpwQDpaikvx4uGTjrvkZbl9Qw8PewMSYlbsu7XTYV X-Received: by 2002:a05:6402:1d4e:b0:451:d378:eed2 with SMTP id dz14-20020a0564021d4e00b00451d378eed2mr9829694edb.23.1663953226964; Fri, 23 Sep 2022 10:13:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663953226; cv=pass; d=google.com; s=arc-20160816; b=MaME8usemM06ATE59ocJIKfY9z0PFPBzTqaRpmWcEteYal3WXxOPX9SDqI64PSSSVM wWSgQ4uIeBiRn7gIolGXTt3HIV91shBis+bHNexwqO6qpC9PfwpVaCCnovVVa6yX3AfK O3+3Ie5Zv6+YYAU33yDaAkERC92FA6yMa12gg6CRlV+bsIo5ZK/j9OFgTFKbbb+bW5l9 i/Qk5chRTNh6rnDuma15hbJp+YqukUikn7QjPxDzP5cet3i9m7gc/7ZXgkqmvfazgj+B 20Ye9DSWJjhP0eF9IRDz5IeftxB9yefFoUM++vDDMK66leV+lTLGHgRcH91hP18xPUl8 0zzw== 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=RUjX/LuUdguQ+awPauiylJgRCMwFHy6EX+2eWNmipac=; b=UtdxY/NKwpLJBle4OgTp1AtOTblUiBmlynOg4GnFS4u1wcvkPhUu0YnyaGszUddyq5 L4sFJ/lts6NJjdR5Pr0TDXiLNIu0nZyj2KviAeLgTEECVG4diBU/MkNyumY2o8bRV4fV SjC2ZSB76gktnkZTLK2P5d+B6YcPdkEUtLkKPN7bYZEJ64cu1DHSx9hii52rV5/tb2j4 g05xOcpgPcnOpiqs1If1o/uHht4BnCdqXAFSsBjX/7De5qlMjUsI/I5L1aIqZ8UNxW0p /xbR71D3cDGinULB6l+t0/kYGcE5jUg8oSg0vcFX7OyhHmX7r2jgWEn1G/WkGervyvNi 3dWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=hLfbnoxZ; 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 du19-20020a17090772d300b0073d82226569si7911977ejc.414.2022.09.23.10.13.21; Fri, 23 Sep 2022 10:13:46 -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=hLfbnoxZ; 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 S229550AbiIWQeU (ORCPT + 99 others); Fri, 23 Sep 2022 12:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231533AbiIWQdf (ORCPT ); Fri, 23 Sep 2022 12:33:35 -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 AFD6013F2A3; Fri, 23 Sep 2022 09:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aIC+anRx86GJXY1TzD+7g8IofpyJcxpuWPwACEl4dqkR/IYf27iBgSvTjwKkt2UY5bLaqAXxeN/i1ZSG69JDPLnvRO+5pxY8bIZTnxPXTCGV5wvFjvn+QJHP/D1UXNiKn/63XPlqnNHXKj7TVQrxSSaiwVUrdC/ecTXgajl5/BioU4HVWFJJwrQnug0GMLrdvkLIvOFDcR9O9OVpZfOJY8E71qv4D5/e6BIUPuOEJs7jkPtWQElmOh1eGZLfVdkzV6bZygOqq3SylfYJTXvTpaA5+PpVoexMFdp/F7kqjJuSiKLi1bnzsdoIWZyGZUIr54+fmAOp6VNZDCb62uzjBQ== 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=RUjX/LuUdguQ+awPauiylJgRCMwFHy6EX+2eWNmipac=; b=PN7FP2g+6XH1CdyN9a48VWtv0RpAz4FNtttZCbceCFjCQwo3uJwC1e/34k0UDEXJ8t8z3q/rpGy2Kou76Ycv7HRmn0ntJJET6+86YdEbZOXZNyNavxFtDOMJuLmitKrnlGMk9/E9WaOHwc+CqvhtwEctEuGa/9cY/9gpr8bAL3H6/0p6PsdJhvrC1XYe08G+idqESPysx82Ea2SbdX1Xx4/XVhFY4JiqPee5QQt10p+9erKN2r+B5VI0cK2fq1qbJL32GdXsXMq8cyKQzlg1p7JffglE3858Y13xQmw8ZzNQMCx/M3pbrDGOoFj1k7G4tihNL7hXk9onYWgeR+Fk0g== 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=RUjX/LuUdguQ+awPauiylJgRCMwFHy6EX+2eWNmipac=; b=hLfbnoxZop4B19zXUb8kpl1lxpJu/rbYBAsN5XuimCBk9/kzSrf1A9egFTwF2kovXrJtZRlSPT16JUs+0l4GBeRTE/M6TXuRHcRnSp0H1qmdxdJflqbw0iALUWvFC6RxNV01UQ3q0ckZ+TQW0rpsmilMWqgK7d7QNwDOXy1qhSc= 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:31 +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:31 +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 03/12] igc: deny tc-taprio changes to per-tc max SDU Date: Fri, 23 Sep 2022 19:33:01 +0300 Message-Id: <20220923163310.3192733-4-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: c7e6b287-e209-4f5a-f0ab-08da9d815a07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YbEuYPVjZT2/zun0SqGqg/StOpP8ojpzteLRL4O3ffJDUJ3bybHSRfaMT7mzmPaaL1WUFr3wk+yqqOB7JU9b6sQhNd8pnXJbuJxfDnYFB3tjl4/TsJGpUVaopkF0HRHsCwLuqQw8oqAecqgRyiM460Ymcn5IRYYzHQ3wb3vTbWeeza7WE4ATu5pOPPaLaRX3NlLok9SsPW26rKCNfnW12lqLhiZAScwRBpgyodJtJHd8xfbLSDqdKuEj8JvGkUgkA/XTEsfMMDzRoAjELU1VEywb3AoWWKn6SxvmHay6tCpEK1vuZ7Ae427/TOq1DQZSgK62go5ETk2ar8RtIWQ4fDfswGaJr5lHmPlMG9CG4vp9fEdoJTdngLvUYZCPEY7sdv52IKyWyxti4olS8jE/wC3jsm9rK/WOBGajNQTjVDoHi+wrQKNZIE0NsmSG03iDCN6eSLXQToCkr8UBoAjRg2D/kFg7nzvHsC5724oLIV2H16IMYfbimN5+1HuEPXiw2V2rJP0BM025JZaaFpVlKGUWQWvi5iUnGQNFuj6r4cfm18bL/eFJLYFpUEvF4BEBTp1IWhG7xn06uMTBBATl/14oFmtjq3OYbTXqy4IdjMRGSdGwGZPrKToEPs30vbSJEZjXFUCEPS/cw6BOh1XTSCl2Mlp3wyUoPN9kE44VDQpkazzHhzvF3PM0Aacnm6/9q6vztBNAA2Sx/Axn2ZCW0szwnEHuGA9YYM91C7h/cphXaj6Ny86r2ASy22HhQe+/fOlSphvi+TbAaJ+c45siMw== 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?a7kLhEP8n4ApgQnUTUCkoRSUsma9liiE2JJ959kD6rvekXI31V+v905QpcaZ?= =?us-ascii?Q?9xS0Qy+PT4X/wNxuDcpGN7Nq0CxLw3eDDKMaKZwO3nLlh3vtlGdtjCXAt/qH?= =?us-ascii?Q?gJMi+/S5Xh/vCgLAct/wz6zKFpWYDpHifjOe8BSXg8XCYuZbWwAteEGcCJ+m?= =?us-ascii?Q?QRWkW0SnhmVYz1amXg2tFZRj44g6uBn1tfr6Q2orjoQMkx4klGT8wH177Aad?= =?us-ascii?Q?5UTkDXR33xHj28af4E2X3rLvFER9zCwTQTEC122XR9+w9sOvn7aQ/m7c7LRN?= =?us-ascii?Q?qotMko7MlWj+I5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AOPITA?= =?us-ascii?Q?c01Z4ZE9Ucu2NFDxturERB6JEarb/tVYhZfbqjyOd61IYpaeDSZKo8fGVMA0?= =?us-ascii?Q?IlYdO22ozGDhskjtVq14tgTLIveWutOOBcSjs3YS3LbthzwIuSK1NEwe9PR9?= =?us-ascii?Q?vIzXX2aSby3kxUq8qdobNs76AkJXdQHsTHbKprw1tm6WxHRfhDhQqsgB+253?= =?us-ascii?Q?hxGY2kNEYfuzlm9JrACo+BdrW+Z5NZ98hM/CVfFArQfz+dp+cA4V3f1K0Gr6?= =?us-ascii?Q?kU0R662O63L5CyU4f4MCcV9GN/spPTsbk3zHObCpUq+p8ksKMmaLsCO+eSf+?= =?us-ascii?Q?BFJ91uU1hA+H36mjAmMJjvEqCmytjIw2Tx5yw5F2RfgRNPlL3OED/hcAgSTN?= =?us-ascii?Q?6FE/qv/FqznK3J8B4t2Lp6mmqMQghvHsxNA1Z9QiWQu4QfiGVr33HJxAIk0/?= =?us-ascii?Q?Ug=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7e6b287-e209-4f5a-f0ab-08da9d815a07 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:31.5189 (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: 0Z2jsUWFg4ulAByrPRNd0zYBHiCISEoxwLUkVQZEzoZBI3WbovDmkXN/8uzkcPLIvaWD4z3uD3UIPmktz43Mcw== 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/intel/igc/igc_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index bf6c461e1a2a..47fae443066c 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -5965,11 +5965,15 @@ static int igc_tsn_enable_qbv_scheduling(struct igc_adapter *adapter, struct tc_taprio_qopt_offload *qopt) { struct igc_hw *hw = &adapter->hw; - int err; + int tc, err; if (hw->mac.type != igc_i225) return -EOPNOTSUPP; + for (tc = 0; tc < TC_MAX_QUEUE; tc++) + if (qopt->max_sdu[tc]) + return -EOPNOTSUPP; + err = igc_save_qbv_schedule(adapter, qopt); if (err) return err; -- 2.34.1