Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2222085iof; Tue, 7 Jun 2022 23:40:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBIwtCKkITR9iZGDhEhkJjQ2M9tlGhB3AW1DYNbek/N0yRF+pAN5bz124xIJ0MbbBrUsTf X-Received: by 2002:a17:90b:3b86:b0:1e8:6b89:2bb2 with SMTP id pc6-20020a17090b3b8600b001e86b892bb2mr19608055pjb.15.1654670403982; Tue, 07 Jun 2022 23:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654670403; cv=none; d=google.com; s=arc-20160816; b=NuU//knWgNRrxGXXwAVrruywhhlA1uNpUd+AGuBtLgu5hPEYLJDUNS6ztP409uXpfs mW6ea+vgX19qphYYqiKD5pc80x5Se+Pj2t7aGoWbreTKyR265FWzL00V0bK8rnFxdW0J EYBELYceHAvcjtkU4KWcoCgin9CQyj+5zCQIQMne6TSzt5SZYuq+oZ4zhn2qCYSoRPUy iwZ1+GUl7SqpHEsPFhHZoDoGpn2J30nB4/Mkre3Wfoj6eTB0mNgGtUquNta58tKUrQA8 ikCuHJAMTQW1+YOK5G0ylOXidmhbU4VG752DblTzxUSA7EIcVTJNaPtSASVHAvW1AX2j Ol+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vWgo17YIvcyqZHQNtSH5Lbvobpkm4FG4wx251fWgWb0=; b=wxzyh2gA13c9rD1iYtDtvmyeNlCsIRA+uVTYSwnNSbnqhbv9I/4Loh/8LKvH/uSQIF ji8VpoOEWPPvx5RStNe7q56LK0WKjycycimxCcjpdFwVXsUF2fMxUwui5m7lwgoCGXVD DljdFnQ0Z+EbHRb1mcDGROifxntvVcYlfkB4/IcpeuEdw0L6qc2QU53V+Kg+VhMc/cb/ ORTi9aw9gRzOTTaCnULx8IddW01itDSIL3zZRLx6BlVB5ttBsQ8SQLzCUWu8BOJnDf1V pYAddty0RqOugJOdl9epLYTbOadXG9FiCxWk88oGCG3RxRomn4g7hJCljApn488llHzA HNrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RH7DATHT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x6-20020a170902ec8600b0015827ec0073si20841494plg.452.2022.06.07.23.40.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:40:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RH7DATHT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2C23E1775CD; Tue, 7 Jun 2022 23:01:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349133AbiFHCtP (ORCPT + 99 others); Tue, 7 Jun 2022 22:49:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391769AbiFHClF (ORCPT ); Tue, 7 Jun 2022 22:41:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B57118E44B; Tue, 7 Jun 2022 17:20:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id A5DDBCE252F; Wed, 8 Jun 2022 00:19:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1AECC34114; Wed, 8 Jun 2022 00:19:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654647591; bh=fq4GpmIoMBpe6Gkv7KefRfP5KgwGRQ83n3I5kKZKWGM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RH7DATHTyY+lEXNxdqkE4reMrwRkel4Bdp3YHDJH3l8vdj9DUxExUl2WPoNz7QNnm TZBTZbprN1yh6oon7E2HlEm/YldiyYkHbITWDpcOAdLsnSUt0nEGx1DQsTJtslgE3J AwubBSFNgAaV0OiiYfB+cF6kAL7LeNKLb2iFdd/9rqRkslaedHaTcPwjwyFrvlNk98 bxXl121UoqrpMDURAqIfMVORdioSXDgWnIsJC5c8EIfDARi0baa0nEOd/PmwvgiRwn sEfEeMm7bd5lwqAT8qcXA3kk9ZJpcG+1R9WkeQQ1wMNqHhzTqGzmUoPdCT04HM5Dw5 HUCz7evZCnvzA== Date: Tue, 7 Jun 2022 17:19:49 -0700 From: Jakub Kicinski To: Jonathan Toppins Cc: netdev@vger.kernel.org, Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [net-next 1/2] bonding: netlink error message support for options Message-ID: <20220607171949.764e3286@kernel.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Mon, 6 Jun 2022 11:26:52 -0400 Jonathan Toppins wrote: > Add support for reporting errors via extack in both bond_newlink > and bond_changelink. > > Instead of having to look in the kernel log for why an option was not > correct just report the error to the user via the extack variable. > > What is currently reported today: > ip link add bond0 type bond > ip link set bond0 up > ip link set bond0 type bond mode 4 > RTNETLINK answers: Device or resource busy > > After this change: > ip link add bond0 type bond > ip link set bond0 up > ip link set bond0 type bond mode 4 > Error: unable to set option because the bond is up. > > Signed-off-by: Jonathan Toppins > --- > > Notes: > Removed the printf support and just added static messages for various > error events. Thanks! nit, missing kdoc: drivers/net/bonding/bond_options.c:729: warning: Function parameter or member 'bad_attr' not described in '__bond_opt_set' drivers/net/bonding/bond_options.c:729: warning: Function parameter or member 'extack' not described in '__bond_opt_set'