From patchwork Wed Mar 29 14:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Peens X-Patchwork-Id: 13192676 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 86F04C74A5B for ; Wed, 29 Mar 2023 14:47:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjC2Orw (ORCPT ); Wed, 29 Mar 2023 10:47:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbjC2Ore (ORCPT ); Wed, 29 Mar 2023 10:47:34 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2104.outbound.protection.outlook.com [40.107.237.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E1BE619F for ; Wed, 29 Mar 2023 07:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jpr4b8DNz1TjxyNPV6B0cxsXuFgsiYpy3hnbOA6l7kqCljo6+pxKAYbAP/7CKPyywXZTfgEEsfF5X2pVw0Af4TjA+hMNq+Ds+lcdwyOUf1MaRj0TKR+/diwSlPr8T9L/eI9pJi3GaIwlNeziKTI13HEWoIkM8vXGpFg0Z/lsy33H3nIY3c9bUqo91Qs/syqxHP13o7Qra19H7UJ5BIQB0fe4HQyweDMq5srs9W3e2Dvvv+cGnubKrgUh7elJEMHVarfxt8+5QtVAmvF0JP+yx6VRLouMjKY0fv6/tNqWWOs9H0J4weSpu47nDh2Riv1aUQS7Oy/+igQFsk06uui2IQ== 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=wmfQOceEffqcrqaYJEOtoddyaTGzSYMqkCj6H/a/9SI=; b=k2NKc1YMH5WslsBZF+nNhmzaVYBHzYgUWNW42RQ3shYawZq1S2gBAwIhhWCoQjoFF0/AGNxebBqOC87+PcdzYI47jmG5Sjg5pAJWZRdKsG4EaaHleXxUV72/DilkWZQsi/1ZZMok5ZyMOV80MbMQ7So/hiprBg+gFb4MMlOzZUAa/PZXKuEn/hJ+/5rZMq2qcWreuLH1eqsvhed9O1L3YZyDz1T3KwWtdXiGQvGTVtQkGPcGrGXOaGN3iT2PncvVNjYbHixt1kBuPascO1hOQeSxsVWfdsH3dnFOUvPcckVNnkPXO/a+z0GIHCgWMQYMMCmShVgBJ8oBgK6G1wv+Pg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wmfQOceEffqcrqaYJEOtoddyaTGzSYMqkCj6H/a/9SI=; b=p5PcIdOMvp2JS7FdmZ7ttj+mnE5XTfAeY1oeenJ6/nQHzBPAhIVc5ODUIU5GBTNo2xchuK0+1OBFkjnt8OitzNzDgIdc2pTht/462yH1hxx7S2dNNmsYIc1k5Ro9aiJnhUGobn/tntBCHmA7Tr3lW15p0RDkB/1LoXRt9SuaS5U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from DM6PR13MB4249.namprd13.prod.outlook.com (2603:10b6:5:7b::25) by SA1PR13MB5588.namprd13.prod.outlook.com (2603:10b6:806:233::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Wed, 29 Mar 2023 14:46:12 +0000 Received: from DM6PR13MB4249.namprd13.prod.outlook.com ([fe80::80b4:733:367f:7e84]) by DM6PR13MB4249.namprd13.prod.outlook.com ([fe80::80b4:733:367f:7e84%6]) with mapi id 15.20.6222.029; Wed, 29 Mar 2023 14:46:12 +0000 From: Louis Peens To: David Miller , Jakub Kicinski , Paolo Abeni Cc: Simon Horman , netdev@vger.kernel.org, oss-drivers@corigine.com, Yinjun Zhang Subject: [PATCH net-next 0/2] Small series of enhancements Date: Wed, 29 Mar 2023 16:45:46 +0200 Message-Id: <20230329144548.66708-1-louis.peens@corigine.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: JNAP275CA0048.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:4e::11) To DM6PR13MB4249.namprd13.prod.outlook.com (2603:10b6:5:7b::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR13MB4249:EE_|SA1PR13MB5588:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e9c8acc-63d7-46ea-e027-08db306456b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cfi3oWm54fBDMj/JNfAzCfFrhQUyNhU3cWGMKKlQWJ7Ufsf6rxPOfXHFlcl/P50+qqrvAJWLbBbSdZIwJi7l14rIfngQJ7kopThJ4nRu6CYCkXQ4SsrjCO7hoICHECu08aJdfcnL2D/I0b/u1r9dit9SB2a46y6xcaRPHhJNDf9UoVWQo9V2gU1cKnQAOdcVVufEeoOTI6TovFJsX3qezED+COkxf+xd3Eyyaky7gPWyJqe2NwA6m8LTcQCJ5Fr3GSy3voaEGuEVGXtkp7Oa4t6aXAk87o1Kvt8UDfIQQ31sP5/4jOSSOYF8cKTEUiSWHdvPy9y1V+PKeFeaRuCHZuFP641oaY6fqvOM0ZaCFIQibDfg811L/uPw8YUcET/RzDcPbTBtIIvRakmEiGq/FlqJp/ZDJIfPe4fT/hHqWxk+wUEqr6yZ8qz9flwekL8icTGrJrqAPl5TqwPcLbPIqPp2rk2Nj1rDLsCwu7x987WobUHJ4wD5JYLYcjsdieA98l63B4nZEoSusFji2FmLw1RmQsEX7Uagh6bmI8gs8ErLbQlwLAovl7/ybocOt9d5B18y6HZgxGoPtmLFaL5cFGECwZDFetkEQtbxeetEmZv4c8nMm2B+BGh/5UqP2tPi X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR13MB4249.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(39840400004)(396003)(346002)(376002)(451199021)(6512007)(26005)(41300700001)(6506007)(1076003)(6666004)(107886003)(186003)(6486002)(52116002)(83380400001)(2616005)(478600001)(54906003)(110136005)(316002)(4326008)(38350700002)(44832011)(66476007)(38100700002)(4744005)(66556008)(2906002)(8676002)(66946007)(86362001)(36756003)(5660300002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cxKOYYE+x/REYHPSL4XQmHFI+XL5OcVJWlaewqWLPYeGacIHUQQ9BeKl3d/laRBpwf8Pnk5Zx2a+s+fOyRzgfUM6pcA0k1tFiHHl+JGv2okTsV3LJH6iByvaY4JSXwGBxxPUAT1CkL7IEnhXx6cA0ijjWeAJRj6s7ZP5HGTgSNQ1DLlbnaD238sFaFdV4zhUS8CcQ8RiOE0RfuG9pDcT2nwAQQCuitznp6FoHdNpfxM+guiD4LCpfOGjqskEPtuIEsv8Hh7OnsbZIar2PjQ4XdQVmnaNlIU8GsX6QvjnCCZgjRm8EqV6sbqmppefvANURmM/zC5UD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JIESQMGCIaYQ9nxV5DAqCptQuLJHE+kDfm4UN1PGGh02CEKFJHF3xXCEezeK9+008j4lwwWh/WBVolTSEOgEy7wRbf3hA0ZvpwOKDrXlGsTaMVjZ8f4n8rZdPD3IsMMoNvHErH+XE8Dx47yaaFZuWNroME5hz3sCHpz71PuaMD/ScqlTya0HjxZ7yv5j8+sU3MAtAvE7lERQlitYw== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e9c8acc-63d7-46ea-e027-08db306456b8 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB4249.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2023 14:46:11.9322 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uOXLnsdE6pRz8wB66nLMxs5Y/fgvegyHPcOcfuc5U80Cm2mIo4SE8z/u6hpznhXJT6bsFCRavnVPYdwMYNQFegWyyPqCJvpx+PC0ITck0tg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB5588 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This small series adds two changes - The first is a simple update to make sure the dev_port id is getting populated properly. - The second changes the lower link state of the phy ports to be disconnected from the admin state. This is mostly for SRIOV cases, as explained in the patch. Functionality to make this behaviour configurable is added through an ethtool private flag. Yinjun Zhang (2): nfp: initialize netdev's dev_port with correct id nfp: separate the port's upper state with lower phy state .../ethernet/netronome/nfp/nfp_net_ethtool.c | 103 ++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_port.c | 1 + drivers/net/ethernet/netronome/nfp/nic/main.c | 20 ++++ 3 files changed, 124 insertions(+)