From patchwork Wed Dec 6 15:12:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Peens X-Patchwork-Id: 13481944 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=corigine.onmicrosoft.com header.i=@corigine.onmicrosoft.com header.b="OHLi74/s" Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2119.outbound.protection.outlook.com [40.107.244.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE42112 for ; Wed, 6 Dec 2023 07:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N2Zd7+jb/wOOlowhwBMW4KCuKoX+iE+QuwGahZzsWBu5fJJNupREHWr+HWLCq5llAqvAyYRBpWL/wiIQrNn7wT9JtUu+AVBe+DK/ZQMRk84Uy+qEgJk2y7svXflHPzvPDYwz1oz6Xo5trjcr++EH68iZCYRW8LqLZuODoN+ZUtjVXLCKdHyXSlFQgCyGL8hhOcCHmp0yL+jcbWjW8+kXTvzuLPFD73qS8oZbO8PzivpdIjn3u2xf0+ZdRk/exbIvmPHU65I8ZZcRTjYJCnukN1NA3lHaVOkhOk8w8V1xPL/tnsW1ynYBCylRF6Cm9OjlW60de1XJCfnQhsPJ/C3mig== 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=20dxaEgOIN+DvVzwTjKnC9EmUy6RYdz02QUEWA04MHU=; b=VX7fgfguSVZ6zBnnNL8Ou34REruqIBupG4LwhhC+cXgD/2PqNfjCNzYA5mKgzuK+7THp8ab0yIPLDBHPeDHGY4V6MjIxku/nJbQoNwVUIrhQsGlMVq9T7bjHfJr3HoPN735rCEwbFBQulMm13ZqFW1U+tzL23EQyFAl7UOAx/cB/ZTmkjVB9USkJ1XirhfQY5Oyfr4DQgM8iLg0bV/aTsyWuukMukm7GpSUyi5xblSuo0kLHk+KhSatUr5DAB1fatAKJjaG/SB31fipOU73h+ZqSau/WrtqbregTtpfKi3SOVcilnLvnOK59cFb2yMUnk9Sdq9/W/eA0XJZgDLUWwQ== 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=20dxaEgOIN+DvVzwTjKnC9EmUy6RYdz02QUEWA04MHU=; b=OHLi74/sU3GPfj4ZPUNqnXribYxZkoaKrVRC1TSXlKWwmX7v/qqAP+F5B9a2jDRhEkC8a144H8T22tAaofBKWgs5kxhKnxp/GW8v5RV9kVnJsgpwQpOMBcnt5uSRtqLbpT0/HPkqY8GGLl4vzEOCUToiYZzgvYsjK6i2VgdUQfc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from BL0PR13MB4403.namprd13.prod.outlook.com (2603:10b6:208:1c4::8) by LV8PR13MB6421.namprd13.prod.outlook.com (2603:10b6:408:18d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 15:12:36 +0000 Received: from BL0PR13MB4403.namprd13.prod.outlook.com ([fe80::d3c0:fa39:cb9e:a536]) by BL0PR13MB4403.namprd13.prod.outlook.com ([fe80::d3c0:fa39:cb9e:a536%7]) with mapi id 15.20.7068.025; Wed, 6 Dec 2023 15:12:36 +0000 From: Louis Peens To: David Miller , Jakub Kicinski , Paolo Abeni Cc: Ryno Swart , netdev@vger.kernel.org, oss-drivers@corigine.com Subject: [PATCH net-next 2/2] nfp: devlink: add extended ack report messages Date: Wed, 6 Dec 2023 17:12:09 +0200 Message-Id: <20231206151209.20296-3-louis.peens@corigine.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231206151209.20296-1-louis.peens@corigine.com> References: <20231206151209.20296-1-louis.peens@corigine.com> X-ClientProxiedBy: JN3P275CA0008.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:70::10) To BL0PR13MB4403.namprd13.prod.outlook.com (2603:10b6:208:1c4::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR13MB4403:EE_|LV8PR13MB6421:EE_ X-MS-Office365-Filtering-Correlation-Id: bb470232-74b8-45aa-76b9-08dbf66dc758 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jj4nyWzCK1i8Vfi4HLPbVMOr5RyF2Gy/z3v0RIy65lbAFyYR2QJtsyOrv3C+KO4D88ZUbcUaqpEEwbFMhMD67ylsGLTc5DKLH479fA23EtpKnz5ScWA+55PCNE9uHXuI4WRTXMtOP3tsvtWsoDQnuTgTIemwgbQ/gOGW3XiayNVhiW3nWTkzq2tKlHybH55ghemBRhiHUMrLhoyuU/cPMTKQXSm4UOvnQWDAy6uxYTphkZswG8BcZpvPvskpog++jNU5xqJ31Vhvxo2UAgqO/zkrb8wfFtnOddRG5RMenC/RUtu9Sqdc8/P6m73fEYWn0Yq1X6LKJVsDL+eZz1bLk/iGcju7kD7ONrdShcIIMJYScfgFZwBDkngDHCT5ZutMpY1npfjxDytCviwGyAsbimV+OBA8ya1VRinq094B634svc3TNg9hUQ3sCObpRaLiXXRMHDoibRuTNptTP6/qJLTFKyQehQgSrA/+quZqH5WuDKRgkPs/IHjlS1vkCFiRAfn1JGf2gfQdu+dc9rd9iMjbh64e9NntdBp/cXyzLLtCXbwPEFL4bvBP3TprV6sSXWKLihLWC2k5t91wXimp8mCnlkL6mNj18cLJbzyuhqXlif51bpWfco666YbqE9opP9Q8ePxw6+h8om4U8Tcy7k5lsh/rTHleRqpOYMEuNqk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR13MB4403.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39840400004)(376002)(396003)(136003)(346002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(38350700005)(4326008)(6512007)(52116002)(478600001)(8676002)(8936002)(26005)(107886003)(2616005)(1076003)(6506007)(6666004)(66476007)(110136005)(66946007)(66556008)(316002)(83380400001)(15650500001)(36756003)(6486002)(38100700002)(5660300002)(2906002)(86362001)(41300700001)(44832011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2ltE+89COLs/C1LokzIMKSm3mD+fa3zl26KP+/Tu4qt+aztqnTUR2gjni6aPyKN3s3GPZp7MFY0+5AZUmYvl3O8dSurvTilDgaPNiZln/Fcq4FmBizW2V7uPrs0TBW2GaAg0g2hlA01OsVcXxmEJ5PqkKJEfVdXHwtH0KcoMyhbfgbheiznPMQGKvDxvo/aTb/MHWfhhQYh/JhnE0Ymqyho4UIY0plJos2q+OgoPl3sRVw1xaucIUanXTljv49dI7Ao2BzY13KHIw5rIxm41bhO5941FJOwHKD1FyXIcFNkHS8nb59Jr+cKpRTxcFL1r14NZcKPtIr7QXBzQgaKFOj5Dod5v+0KUudxRQnIBxlQiDa7suRrK768zc+hL7eiXBbgHvlMcy3WRHysIn5VA+O3G/R7Al95D+C8Oh52JA/iJqoKa05PkBNjSu/aiBYegR5UNmBAwS/mzgKMknbC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BLK5+Et9udfoP0fpZaIawh2cjEFiI9vbakQwf/GpQCIH2E2lpHaSHVuEgXG1M68y8vK9eeJcHeLu9AnEjQbuILMcR/EA== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb470232-74b8-45aa-76b9-08dbf66dc758 X-MS-Exchange-CrossTenant-AuthSource: BL0PR13MB4403.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2023 15:12:36.3177 (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: SdVqoNMdtt7OQay+oHo0X9Lxpku1LPV3LbA525HFX0r4ZzYjos0elDrdR/p67vTk1Et1ZOZJLZaRueg12xnnkXThQVTlDdzC4oSX07fzjfk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR13MB6421 X-Patchwork-Delegate: kuba@kernel.org From: Ryno Swart Add descriptive error messages to common devlink failures to be more user friendly. Signed-off-by: Ryno Swart Signed-off-by: Louis Peens --- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c index 8c6954c58a88..635d33c0d6d3 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c @@ -75,8 +75,10 @@ nfp_devlink_port_split(struct devlink *devlink, struct devlink_port *port, if (ret) return ret; - if (eth_port.port_lanes % count) + if (eth_port.port_lanes % count) { + NL_SET_ERR_MSG_MOD(extack, "invalid count"); return -EINVAL; + } /* Special case the 100G CXP -> 2x40G split */ lanes = eth_port.port_lanes / count; @@ -101,8 +103,10 @@ nfp_devlink_port_unsplit(struct devlink *devlink, struct devlink_port *port, if (ret) return ret; - if (!eth_port.is_split) + if (!eth_port.is_split) { + NL_SET_ERR_MSG_MOD(extack, "port is not split"); return -EINVAL; + } /* Special case the 100G CXP -> 2x40G unsplit */ lanes = eth_port.port_lanes;