Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp214250rdh; Thu, 23 Nov 2023 01:42:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IE36zgfID1ePpZCcU78+M9KYxFfVQ+Kb3E6ylq69XLX4nZA0/zAPj9UKrTIdwt0rsvhiKSQ X-Received: by 2002:a17:902:ce81:b0:1cc:3c6c:ce23 with SMTP id f1-20020a170902ce8100b001cc3c6cce23mr4960263plg.42.1700732520069; Thu, 23 Nov 2023 01:42:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700732520; cv=pass; d=google.com; s=arc-20160816; b=cDM3i55uDYubmZVESFXcopukGOnMrDBF5fdxooaJCthH0OAPAx7Hi0rN314XWd4TJX araUFLAnrDkBzonYA/CafWEQQrzqdZTqz0QwL0kjpbOezSiXgWgsjKD+8t5MMGShhL4S yMY0fJOpIHZqAJPA1ID88e1sHUu3OA/T7r6bZPyON+p6byNb0C4hO4UDnsGNYAbs7Dct CpNrmQ1gRa1pLUOkc7BkpO0IiS6gsB9FCbILex0dQM0+BrkRQjdh5oLiLzFoJn2luLph Ystmsmf8TtbovONSlzJMn8f7MMV1zaTBLo5yiA+Af9C4VA4IKGysFcuOLv4d0S2qpuBA PiJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ff6i0m2QRlxgMX1rmCLzL/YFPWW9eE1z35hM3+DU5bA=; fh=kZFV+iIBxnXbxhb4pZfGkSdyj9Qj14x/D09EC2D88Vc=; b=K7GwIHPaP975HbsT5tD5YhGRAtHweGtNkHbRpE2JehdhgFXP8Sc1O+d1ZI7UVUYIJj FXJP36MXJYofL7AzhxlrGbPCKslfcXjHqxH4Htv5X+JSocdZw9tDraWec9/DiVDL7X08 Dd4Qsz5yBuxEQs5bVsU61/MHZpZqXQ59m1oljG967i/9S/N/5DE1B6BbpjI5ziVZs2if +RuzFPOwctt5Ylc60NquqTVg8gRA4rUyXwb3z54M/p7cGH+TSmYCKvhAWIQxZacPN+F9 5MfJem4m92Ls+k9x/wEpCtbxQi2C1zkO1zkuWKWhXxRrnCe2VTNfDpa+3MGXmq5eqLEN fkWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CSwvcJOD; 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::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q3-20020a17090311c300b001c574110eecsi833467plh.341.2023.11.23.01.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:42:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CSwvcJOD; 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::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3E50A8078669; Thu, 23 Nov 2023 01:41:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233087AbjKWJlX (ORCPT + 99 others); Thu, 23 Nov 2023 04:41:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbjKWJkq (ORCPT ); Thu, 23 Nov 2023 04:40:46 -0500 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2071.outbound.protection.outlook.com [40.107.14.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00703D44; Thu, 23 Nov 2023 01:40:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbV/IpybHVkQx7uP6iBum4ds6m6dZUO4jAQFNgmLCeH+8LxIO1e4dvL0gl5wzsmzOkUz5JaXshG9nlzw6ljiMdT8Wg9+CFnmUlmZkxs56VQxk3AUtrxIiJUkno/oGI/F6LmySeb9FSFVLy4FI/uuYTOibHmi/54i+ZAUcNpXHLO2zadsLqSHazln+oRTl7ZrTEZchjUuorkHrNkp7+8Shg7Td6BeWeGS+NC8ECll3YuEiWXM+dLJCa79GoOCYYSGfY7OWfwi2cwjoDNezAmQ5EF/DdL/Woq39qRRFkB9OY5uhdKdKk0NG5k65e6plBFKjnUhewAmC4BSvl0ODg5soQ== 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=Ff6i0m2QRlxgMX1rmCLzL/YFPWW9eE1z35hM3+DU5bA=; b=ducL8j0Sur9U5+SV93Jiw/wTeuRpqdt2gifr8kCx+axRKDn88SzaW60/1yyBATbZS2xNNNAr2U1VHK4wDupTsJ6scI37BNsGJ5c4GacbL+x/2bP1CSH5H1hFkmXnfbqonsL2uIA0lV7/I0NWABCxN8P0UjlSMtXy9MgQsgZyIBmsVWBMHwDCy4EeEwCkCm3pt/44Zu47MMoLXw1evWPUYuCSz9V61Z1vbSNacbW3FfYSGzNOIen1CeHQriEtxHivs/PzVSnd2drv3lniuuVZGsCutuP4Wadr7M5Vx49/MOnuVLP3viuKRkrz5WPelRZtda311e4vPMFVmZumPGd91w== 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=Ff6i0m2QRlxgMX1rmCLzL/YFPWW9eE1z35hM3+DU5bA=; b=CSwvcJODvda9dHhMge57W5lEIZS5zww6YWBMd8Y3q6zBmK5rQGXkeFJPT4bJN3Q2YhafVJHVzNPcKDBomAi9jBY+wzzHA8qNGweb4404peZCZKdQtL9zDSZAltIp9n4qhXkQTiCJ9+UdGowZYjb1EaqV17zS3bnlvZp+tZkuWQQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by PA4PR04MB9391.eurprd04.prod.outlook.com (2603:10a6:102:2aa::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.12; Thu, 23 Nov 2023 09:40:49 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7046.012; Thu, 23 Nov 2023 09:40:49 +0000 Date: Thu, 23 Nov 2023 11:40:45 +0200 From: Vladimir Oltean To: Wei Fang Cc: "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , Claudiu Manoil , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next] net: enetc: add ethtool::get_channels support Message-ID: <20231123094045.bjgo4aqwdydeirgs@skbuf> References: <20231122102540.3766699-1-wei.fang@nxp.com> <20231122110120.crs4rh2utjweswsc@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: VI1P194CA0027.EURP194.PROD.OUTLOOK.COM (2603:10a6:803:3c::16) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|PA4PR04MB9391:EE_ X-MS-Office365-Filtering-Correlation-Id: 36c98aaa-528d-4575-0adb-08dbec08467a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WNwMWcJnaYLikmfkBYxpLX6RGuEf3f/DczZVJynFfbR+aZfvSB4MMQ+AEdkf8AfptwbAHkTbhZHInQiACNGb/Yp2mPdFpn8NksEyxrJmtYDMA4ViakgafljuYFfTrbBHnaj/ZIOyzFHLpR0Jz1G8kEu1D1sSYSGnC4e4iLG4YDbomcId85SCJLYMTzBdXLnqlyFkgTNTIo0da/SD8LWocjBhBdo6IRDH5oQ6EG5KWk+HxHlCZ4BHNVEcdW2d80wS0uCClXcwyrBp1kq/1dL6qT1OnD+2RdFkpntcr2kLliTZ3/BffQSQZ+XLiILoclyaCcbBUvFKeAwKxXefO0RjfnWwJk/SI/L5iQ1xZooqXcKZS1Z0N0lTBy3Fq5Gt9cXNHdd94XCm5JSch+CSC485IM2CvhRSXb6qhV/UTP85UmJqrsSI+KPCRshQ+Wbi7GL/fl7DDPbdZOuhSstOn7Jty6FeDxBbQ2JZ+t76YljA6J4xKoKpDotI/7UBmlT/UcSVOsbUAsQujrNz86x9qT0syqoncOhkQAt6b5HZ1xr+Fjcls1E2QYNFPgQAuUH7Xn0o X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(396003)(39860400002)(366004)(376002)(346002)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(41300700001)(44832011)(2906002)(86362001)(6666004)(6862004)(5660300002)(4326008)(316002)(26005)(66556008)(66476007)(6636002)(54906003)(66946007)(6486002)(6506007)(478600001)(8676002)(6512007)(9686003)(1076003)(8936002)(33716001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6D1e0xo9A84rMQ+yXbQdfbJ+heNOSUUlerEp5/1rll2u1bMURkG/LqXUaoc5?= =?us-ascii?Q?LZwZEXRgKCc/XXftVuOj591isd476JWtHpXbHY6JiTCE+cefcW+geRFZeC5B?= =?us-ascii?Q?gkPuKsoyH23cUC2pb+w8tn9paM2TZBsSN/ere+IJoH/lQQEmA8N27YpwHJ9g?= =?us-ascii?Q?xq5XB7pnVS0D7w0F20OhhKLYu0PXdocq8ZJjPV1V9KjEPmHF7yE+kKRMvMYj?= =?us-ascii?Q?AeCIdUaDVaHYBLvCtgKWPP2nsFbx5Gzh4G4hMt9/s0HRRpv0xYgtWcLYCxX3?= =?us-ascii?Q?7DZzrKNs7YBQ5dwez1h/0UQm0qNl+aTeCfYgR9LdCPHnlgKI+fTWOWCbtC68?= =?us-ascii?Q?aABAcArY6qI0nMsUNd7vwjaiKBrhj0hVVwDrkocmYKsGm9VJZkcAMtTnNMAN?= =?us-ascii?Q?UOO3+9Qn/olmPCZvyexL5s9ObGXUica4rZdwi+GaOpkw7qrSj7U0Ou9+G8Kp?= =?us-ascii?Q?EUHpjANDlUO98n4bbfUda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-ascii?Q?cFXcvlKKEow4+raYPxMz3BFWqd5E6I8bbkJY5z3hWks9cvAE0KFXrz/6mTJg?= =?us-ascii?Q?ZJB9RViBlBBBTV1k8Ey2Du53lzOJn+BQGkBrlgECEFfOk/OiKVYvp9A/AKQE?= =?us-ascii?Q?0aYnT4ur0dliW1oj24Y/FEP2UFO/QuSdoNgFfXtXEDB0rleX0bWsnWkOMne0?= =?us-ascii?Q?htnD3OaPtW75SMXOd+lMzeDX+V7H+Zq9yqyzAzzEwVeaIjsjqP5wbXtG7+8v?= =?us-ascii?Q?Uw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36c98aaa-528d-4575-0adb-08dbec08467a X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 09:40:49.1281 (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: rbeWIfrTDTOoDMEy6N5IaG6dv+/g8BydmemGoNeDY/6A0pMdQAmBgX5zFOhjpQ86rEz8M1ocLwGYEfmvicPY5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9391 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 01:41:57 -0800 (PST) On Thu, Nov 23, 2023 at 04:09:57AM +0200, Wei Fang wrote: > > I would suggest finding a way for the user space implementation to not > > assume that ETHTOOL_MSG_CHANNELS_GET is implemented by the driver. > > [Wei] IMO, the issue you encountered is that libbpf will perform an > ETHTOOL_GCHANNELS operation. The issue I encountered is that "ethtool -x" > will also perform an ETHTOOL_GCHANNELS operation. Besides, There are other > apps that do the same operation as this, so I think it's best for fsl-enetc driver > to support querying channels. > Because your patch is more reasonable than mine, I think you should submit > this patch to upstream separately first. The crucial piece you're omitting is that for ethtool -x, the "get channels" operation didn't use to be required, making this new requirement a breaking change. The interface between the Linux kernel and applications doesn't do that, which is why it's preferable to bring it up with the ethtool maintainers and the patch author instead of fixing one driver and leaving who knows how many still unfixed (and also the stable kernels unfixed for enetc as well). To be clear, I won't submit the "get_channels" enetc patch for the RFH indirection table to keep working. I might resubmit it for other reasons, like when I return to the AF_XDP zerocopy work.