From patchwork Thu Feb 16 23:21:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 58282 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp583194wrn; Thu, 16 Feb 2023 15:23:43 -0800 (PST) X-Google-Smtp-Source: AK7set/AochrZzIM0y/n6XNKKIPkCjwATz58kiq+OBTCi3Fxh0FFj0gE2hSefuPjOhT+vXMTMsuj X-Received: by 2002:a05:6a20:12d4:b0:c7:4d95:276e with SMTP id v20-20020a056a2012d400b000c74d95276emr2475785pzg.60.1676589823649; Thu, 16 Feb 2023 15:23:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676589823; cv=pass; d=google.com; s=arc-20160816; b=icbs/dMGfDlCS6sDksybBCC+29oDY4sdew55YrtTGL0e0rZegYQi3FlY/FGuixs2D3 QoHdSsPbQoH+VLRkN9od9LgBnQGhCCeCGYSkeIuItQShVNcuiuFbvjucYCLvAXqiMP3S w48+59mSSDTY98ATCAzedEkjzlUrYXXLDskJ+OwNbC8hz074DpQGUW5YWKvhBTK+oRx9 QcUD50y1HxqyqCoVSW6+ncCb9UQBUBB1Fqyc4bfHana7FOySTmekcRzvvZAhSIOXidhX Di4+UUx4URpe2q2MqSiWlhGED1HlWJJtVZdwWDImwJnO42TaR64yPX1IIiDmQTW8cXnf IIuA== 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=141wq/zDW3i/p2w4llBv4/GzapNf8wupXTTUdv63uK4=; b=ln2C4m23Uf2YXq8NjDIwwvexe/fjcAE4cfhJW68Rk+tRS7OkQGZAdSQ9ewxAt9SjSK 2YG274LsrIqw/j//3sea0411MAMXPIjOAiQFrRLHEzGdvFmsJovbVsjTOBOEHbmvxJss VuuULrHZ5y3/58uodwQF/zX2MFAazoUtoj5lOlWFvTMAYFiAKB5NUmhLr4oBKQyZeabX EnhYokjWuM7LQ5PwZ9Yo+BwEmVgcxZHnx6eNE6XjfcOEvfS0CUtRHpSU5q5OvIqJvCA5 7yKoyEsVwTaWMkDa3t2/3Xci3AQacVBfVSCpyOFnmdjbUVh40oV1MIVDLaglhfsIlnmr 4U3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=N9QLubz0; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020a63c143000000b004fbfd0c7037si2789424pgi.461.2023.02.16.15.23.31; Thu, 16 Feb 2023 15:23:43 -0800 (PST) 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=N9QLubz0; 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 S229905AbjBPXWE (ORCPT + 99 others); Thu, 16 Feb 2023 18:22:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjBPXVu (ORCPT ); Thu, 16 Feb 2023 18:21:50 -0500 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2046.outbound.protection.outlook.com [40.107.104.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A20F52CDE; Thu, 16 Feb 2023 15:21:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RPf5EoEtSQNuladMyIBV2oEH0JK7CFcMbnzTtQbYXKITCDnJEcZN8vnn5kljb1FC48Jm2YMn5PEs4K3YqAJGfyKbghbJyiYKSHLPLQ1zHg8sVo3MFuSj/Pf4+alCAfVN7ncKY8cP90fXa7DwO2hCDWHr7uv2S9FHct5jLa6mAMNTXjmy9LiohkbMR4Dbq2r6LWTaFp14E+cznHWan3uWIDHVsP1Wn86AhDbVhtx+YSPpoVN0B1aaXdnIJwnF3W5xM6N5yIIIq36mGsCYcRemDfwsvFxroaCGXWFT/HL2bpFtivAobgq8O/FUeXRdotOWTd146PKV1+DVQKTyJFOcvg== 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=141wq/zDW3i/p2w4llBv4/GzapNf8wupXTTUdv63uK4=; b=AikfUcg3xfd2xTCFJOPnAJj3GlHUjHwFA4OOU9+KmqzEOol0DnuRyIbjzfxY5urtjTy7R6btT1x2VJ/ZJZJsg83gT/94FQYe/sRGtbmwf9gxxNtyP9FjQDbJaOLSRNCA9piS3TYDM3BavCQ4Obld1PMiximvYVa0x9zOi+7k3nzlUW2vf6MYt0Ay7b4mwZMmFBM93Wnn46aHPVzjPj2Tv7u/Znxl37oScSjCwvspOYfmaCbNlQLoRofiA/XLTiQwmrK50jdqSXSSBGMX+nP9UotHULX8SB+eAIDZ5z4gRITe/JZ/7r/kG0zWwsNeCpfFU4hk0CtKNjuH9GtUpXkW1w== 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=141wq/zDW3i/p2w4llBv4/GzapNf8wupXTTUdv63uK4=; b=N9QLubz0iFo5Bcg6Ih+EfYLaPkNYyf1/vrdI0vPs282SaM8UOaEdOjZVa5qKqcI4zHxcMquUm9j68j3lMqTV0CVMsKTz2iOWCx0J5D9caIk+Ov5/Op+tSaMew/BBpP+y7ps3V5imUR/fukpw3Itt44jJsF7cLOGlGZTzFKigy0E= 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 PR3PR04MB7436.eurprd04.prod.outlook.com (2603:10a6:102:87::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Thu, 16 Feb 2023 23:21:45 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%4]) with mapi id 15.20.6086.026; Thu, 16 Feb 2023 23:21:45 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , Kurt Kanzenbach , Gerhard Engleder , Amritha Nambiar , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Ferenc Fejes , Xiaoliang Yang , linux-kernel@vger.kernel.org Subject: [PATCH net-next 04/12] net: ethtool: fix __ethtool_dev_mm_supported() implementation Date: Fri, 17 Feb 2023 01:21:18 +0200 Message-Id: <20230216232126.3402975-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216232126.3402975-1-vladimir.oltean@nxp.com> References: <20230216232126.3402975-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR0501CA0018.eurprd05.prod.outlook.com (2603:10a6:800:92::28) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|PR3PR04MB7436:EE_ X-MS-Office365-Filtering-Correlation-Id: bf211a17-582e-4b54-1267-08db107491e8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dwVGus31ktGIs3FnlHjKyfxkv0+87hTnQvFIotv8tHLy+2/GhByAigpVvzTRy6YufycW95ufggrZIKNP32oAhRc3+4Pkry6hdD1GcY1sbnSRr1fI6XiQUdn+hEJw1qZX5rAmk86ynPtux4ZuWhThamGwvJGcF7w54DU9tsFTR8T0WKDbqOatHlgJ72uxvLmSQaziclONtyOgSaEU1wFG4WIaQ1Vk1cDO4lDie2RLGbl6QBMeF8S7W5jYPYyuLgfHbXkMSjfhS6F491r05IMYTB35F//CL5WeNjFf9Wh0/G4KFRWvrhr80gSEeEqU5KUcDBN4D3QUcjvn78fdiGtHWwPAOpaDAx5zhF8Hw/XXo+aBs6fntnZ2yXRUGBN2AtAH7q7Jdp/xbK+HxecPu31aQShcKyMLpcALrSehi0BPEUi3Z24nET1P+v6h46luRwld02hva4iZwZyAKBl3kBVs3Jsc+4N1TQwC+BcxWKTtSL6KQOH3E/EmP66kratDzQGhD/+yXVWx5cTg+81MJ04CUstL2rgjWQO1+ZTjDsb+rxBLzYctp/p+wwzNm8rOI43PI/Qajh9voyC+4obSRLiNaYgkDpNAXPxT1QdZ1RXd6nDXUnaFZS7O9oAmiaqThvts+qOIoJxTpNuy3ZRN5x1CJWs1KIzG+8PtTUJO1bbyHJVPpgSKpDoWLjfxw2ug5+3NyRrNmyAZYckdstyDdaUccg== 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:(13230025)(4636009)(376002)(366004)(396003)(136003)(39860400002)(346002)(451199018)(38100700002)(2906002)(38350700002)(44832011)(7416002)(4744005)(83380400001)(66476007)(2616005)(966005)(86362001)(478600001)(6916009)(66556008)(36756003)(5660300002)(41300700001)(6506007)(52116002)(6666004)(4326008)(66946007)(6486002)(54906003)(186003)(316002)(8936002)(26005)(6512007)(1076003)(8676002)(309714004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: q5GKpGFej0wUG0BKBx/0Pt4RjxHg4371mzAzY/igz5FEJMMlFOs1K4rVrs5w8N2O01+pgVi3qMblXoUPTr9RURB24z7ibta0Lb2XbgmcBWqayhefiKqueeVyAOCF0SDXqZfmCJiphiWBHrVfy4fALZgegobRxrjapzt0rruihN2sBxt7+DMQ1N7OmPKz2Yi6asdTuFaJl9LS+nJPi7LFh2W2hBWDcOvJW5eM8vjlPoun/u/OLin2uZ9Vm242hjHPguZXAfivvMyhrz6kYZ/DgR93ALMxcqdU8f3WPSI4Oeu/CLAgc1Ddx1xk6b48bqDXsQRq4UqryV3WEceCuHN5tQlub7mHwcA6dfek1x1mtNpsr5oQrij5IC5nwp/qvZcLoN83JBvrKU696LTW2c1MH9JCUMbZ5EzGbWBlgUD2JJE+TaF8hVNJ5I2Bw2jlEd1wVhyfHX61XXESDJ9OuKKTv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ppjztCSbfWhGBGcimdnE2eUyak7xdAmsAsjisApCjJ1K8B3utN5w6EOtD1EYf6MwQ5eoVlx0IIX3k2msZw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf211a17-582e-4b54-1267-08db107491e8 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2023 23:21:45.4931 (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: WyiAG/xLy48Wpmf0m2pjgpD2VB4BIvrad2585H7mxPgc8ZVkoQxX8XZ0JDLp8lUdNp7Zby3mJvrs53zSMubO6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7436 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_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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758031851162060109?= X-GMAIL-MSGID: =?utf-8?q?1758031851162060109?= The MAC Merge layer is supported when ops->get_mm() returns 0. The implementation was changed during review, and in this process, a bug was introduced. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230111161706.1465242-5-vladimir.oltean@nxp.com/ Fixes: 04692c9020b7 ("net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC)") Signed-off-by: Vladimir Oltean --- net/ethtool/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c index e612856eed8c..fce3cc2734f9 100644 --- a/net/ethtool/mm.c +++ b/net/ethtool/mm.c @@ -247,5 +247,5 @@ bool __ethtool_dev_mm_supported(struct net_device *dev) if (ops && ops->get_mm) ret = ops->get_mm(dev, &state); - return !!ret; + return !ret; }