From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Mitsyanko Subject: Re: [PATCH net-next 2/5] bridge: propagate BR_ flags updates through sysfs to switchdev Date: Mon, 12 Mar 2018 13:07:40 -0700 Message-ID: References: <20180310030308.12947-1-igor.mitsyanko.os@quantenna.com> <20180310030308.12947-3-igor.mitsyanko.os@quantenna.com> <20180310163838.GG29174@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: ivecera@redhat.com, jiri@resnulli.us, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, sergey.matyukevich.os@quantenna.com, ashevchenko@quantenna.com, smaksimenko@quantenna.com, dlebed@quantenna.com To: Andrew Lunn Return-path: In-Reply-To: <20180310163838.GG29174@lunn.ch> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org On 03/10/2018 08:38 AM, Andrew Lunn wrote: > >> + return 0; >> + >> + err = br_switchdev_set_port_flag(p, flags, mask); >> + if (err) >> + return err; > > You might want to consider the br_warn() in > br_switchdev_set_port_flag(). Do we want to spam the kernel log? Or > should store_flag() do some validation before calling > br_switchdev_set_port_flag()? > > Andrew > Is there any convention for that in Linux? While I would agree that simply returning a error code is sufficient in this case, another user of br_switchdev_set_port_flag() is a netlink interface, aren't they supposed to be an equivalent? That is, if netlink prints into kernel log, sysfs should do that too?