From patchwork Sat Apr 15 17:34:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13212613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36076C77B70 for ; Sat, 15 Apr 2023 17:36:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229989AbjDORgJ (ORCPT ); Sat, 15 Apr 2023 13:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjDORgH (ORCPT ); Sat, 15 Apr 2023 13:36:07 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2045.outbound.protection.outlook.com [40.107.15.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8463A8E; Sat, 15 Apr 2023 10:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DF28YG6x3iMQCIEtmijFpwxM2RY+S7IzQXmBgQ0+2VIlSbmiQ/PCkrZTApjicr6aMGtswT53AstfkuSfjHcg+rN3Nwy1MZzgHe7H5TYplXalGcBM7SxUQsi24vGEwtEbpo3fEWLgAwq4JaYD/cSZp+VwmTia7Jf3WFqOF9Xsmz7PG1Lvptqc8pwdc+6UA7ZOFzmcDx+p58ytGaAZ1+uQLZVYbScVJPOx97AzdmUhfdwfHdF8lXykgEzwIMAY0yr9K0qYp/ILSlSLsqxOsG5hBnSqoSMxGBGfwsdj4zGLYNCpc7A0vsGfl03tvIIWdpJMG4cERfC8akhGQbYEUm2mPw== 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=Amb4UHMS6czfmm1idpvdJ4tLo1E3iW3fC9/FCArbcYE=; b=mGFHOVNl60/9T9RFOx/fGVz0e6lI1TSISZjkhRQ5wJ9tvs9p0vSSI7CbeLTYoveRua1CFrPzj/6PlpYUP6gk1taeAk5mFFv9paWHYr4LEzHJuZsOTH/R7IItdxcp3uZLE6xaf/5RT4VyjhG1Qk8sNH0NCvluQ2Qau2cUNUyvBtKcFw7rWVYR2avkz7M/9S+SSuf8uK662d/82T9X4Ezp0uSeHktPYXkGkCrPUzIAsaYFVvLnBIK4zOk98BdToHL0KxkEyALTybKgA6lMhipD4AMT3ZFp9MqUdo32KjaM+x/e/rZO5MjuKE058CA3GjJQcgZ9kti5FOWlkM8Y4FVmIw== 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=Amb4UHMS6czfmm1idpvdJ4tLo1E3iW3fC9/FCArbcYE=; b=guVcJbqmPqbib8v7Wt1OrHuuL2O5LwbfbDTUoWi+nY0zR5UsXOzBsam+2f2ro3i/JNJjJbMrDAMHzlMdpae61G5RJmOWRA+fjuTvNE7IwtxFRGpULzMcq1LqhZ6qAijxSFSVKiBSRpaYae1zBXf0I3bhgf19q8w7EWtR0Ytzf8Q= 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 AM9PR04MB8322.eurprd04.prod.outlook.com (2603:10a6:20b:3e3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Sat, 15 Apr 2023 17:35:56 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::55b1:d2dd:4327:912b]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::55b1:d2dd:4327:912b%5]) with mapi id 15.20.6298.028; Sat, 15 Apr 2023 17:35:56 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Michal Kubecek , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Xiaoliang Yang , linux-kernel@vger.kernel.org Subject: [PATCH net-next 0/2] ethtool mm API improvements Date: Sat, 15 Apr 2023 20:34:52 +0300 Message-Id: <20230415173454.3970647-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: FR3P281CA0156.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::17) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM9PR04MB8322:EE_ X-MS-Office365-Filtering-Correlation-Id: 91195951-4d5f-4ed5-c952-08db3dd7de48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jus6VnZmGfoNFnSTVNN/h+y4j8/F2Tg2G1kDccEOobJt8JvfD49ohulAOkmUj8yPpH/QlBDS93iw2mBJZJOaUmRSr+qTD2pGW6pFoMH+f24gINjNvzAIPhOYJTxAQYSdw7EJ3Ze+NLDgaJX18atpl4XZLYiHdlLTfjpxzXa4RpOT+miT/xBb6KvUlHnmzb2yJEPl47a88Pwfz6EbmMCO+3rQxjcaiP6SgvYXKF5A8M8P18sMuGwCho3sIvA2o4bJfgtQJdMsq3+WaX/0Xtvs9cLhWllhi37Z6MyC7hHKg8DEtozQBMUOwjujPcmhFyCKZAg3WwjUACWyXetU1gJ7GKZ0mQLd8GvorziX7mkb47/6pquc9l5ofGp8BEIJGLqF8qqSfaH6xCjBvr3+EZY+9LWH3nJMeWiD5RGc+9DOzyRs3LmWEHdC5ClG5KcYkSE72ZSqGnq91aEuaYmqUJCloi3z6yaPRBISZmnf7InSO5+Wzbt+1CUhmgCs8jDHboZ6+Q2GiXzlMnunmtmDFb28sRbx3eTCn867/fMHty0ggin8g86o/4zMl4BELLBUeB9Jxp33h70hoezv+cLAkUI+PHI+dl9So3Tr2wDBc8ZxcXM= 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:(13230028)(4636009)(136003)(376002)(346002)(396003)(366004)(39860400002)(451199021)(54906003)(478600001)(83380400001)(1076003)(2616005)(6506007)(38100700002)(186003)(36756003)(6512007)(26005)(38350700002)(86362001)(6486002)(6666004)(966005)(2906002)(41300700001)(66476007)(316002)(66556008)(66946007)(4326008)(6916009)(44832011)(8676002)(4744005)(8936002)(52116002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RDajhXFqeIb8NADH6ONv6I0Kf2aCSqjUdbVCkcqjeBIAqUYfqK8YoD54/56tgf5AFwk0GmPIhtS/byjxaOC9+idLkYgZOm1v+QqFPfaOK5kCeKsW/gUG9hPyX7GioWOFRD5OcUkNSaeoaI9xCPg8WK9WNgQatoFnPdFrFXgDNOHdqvHBMwgwDjsCC4m797vDOauubTGqCueuhcZ3e0uWR5iMfAvLDcPzM6WsCQC358VKvu+iHIgoh0oJrfAmQrVnSNqT78rJ6s4KuZSQSY+xuvxfUki16eS7JfjevIy6Pv/rTGZQbDGdEb9pYkJw1SFrp1Y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T4kH/9qztp1hANo1mxDJsRpUwsn9CDivAW0MZGlSHCk8+eqm4Xyso9WKvtGLi65PxKfLqtMA5/ieOrYqvLCW1X8QqdgHmjP3b3r5rah/CkNqveo6/9qfwt5Lh8AyiLXJZC2zKBu7+r6LDlFPep3OMAfeYc86X+G7BKTeCj9bYj5OwyvTJ7NvYQOvP8ZMYpnYgmBKhhsipuRFjo9MTeEKHw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91195951-4d5f-4ed5-c952-08db3dd7de48 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2023 17:35:56.1889 (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: PY8vvwjc5Ay8T4P4VazjgFW6vIgoNhTAaydciB8cQsP9/am3daoWEu07ocGBDjdIAsc947tj4Lm+K1EGb2yWmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8322 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Currently the ethtool --set-mm API permits the existence of 2 configurations which don't make sense: - pmac-enabled false tx-enabled true - tx-enabled false verify-enabled true By rejecting these, we can give driver-level code more guarantees. I re-ran the MM selftest posted here (which I need to repost): https://lore.kernel.org/netdev/20230210221243.228932-1-vladimir.oltean@nxp.com/ and it didn't cause functional problems. Vladimir Oltean (2): net: enetc: fix MAC Merge layer remaining enabled until a link down event net: ethtool: mm: sanitize some UAPI configurations drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 11 +++++++---- net/ethtool/mm.c | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-)