From: Jiri Pirko <jiri@resnulli.us>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, j.vosburgh@gmail.com, vfalico@gmail.com,
andy@greyhouse.net, jiri@mellanox.com, idosch@mellanox.com,
davem@davemloft.net, bridge@lists.linux-foundation.org
Subject: Re: [PATCH net-next 5/7] net: bonding: Add extack messages for some enslave failures
Date: Wed, 4 Oct 2017 20:39:35 +0200 [thread overview]
Message-ID: <20171004183935.GI1895@nanopsycho> (raw)
In-Reply-To: <1d18c43d-0604-3d38-2b68-ca3c7d1ab754@gmail.com>
Wed, Oct 04, 2017 at 08:06:16PM CEST, dsahern@gmail.com wrote:
>On 10/4/17 11:04 AM, Jiri Pirko wrote:
>> Wed, Oct 04, 2017 at 05:35:46PM CEST, dsahern@gmail.com wrote:
>>> On 10/3/17 11:38 PM, Jiri Pirko wrote:
>>>> Wed, Oct 04, 2017 at 06:58:52AM CEST, dsahern@gmail.com wrote:
>>>>> A number of bond_enslave errors are logged using the netdev_err API.
>>>>> Return those messages to userspace via the extack facility.
>>>>>
>>>>> Signed-off-by: David Ahern <dsahern@gmail.com>
>>>>> ---
>>>>> drivers/net/bonding/bond_main.c | 12 ++++++++++++
>>>>> 1 file changed, 12 insertions(+)
>>>>>
>>>>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>>>>> index bc92307c2082..6688dc9154e0 100644
>>>>> --- a/drivers/net/bonding/bond_main.c
>>>>> +++ b/drivers/net/bonding/bond_main.c
>>>>> @@ -1348,12 +1348,15 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
>>>>>
>>>>> /* already in-use? */
>>>>> if (netdev_is_rx_handler_busy(slave_dev)) {
>>>>> + NL_SET_ERR_MSG(extack,
>>>>> + "Device is in use and cannot be enslaved");
>>>>
>>>> Please don't do this kind of wrapping. Just let the string be on the
>>>> same line.
>>>>
>>>
>>> Ok, I will do that for bonding only since it is the existing style.
>>
>> I don't believe you need to do this wrap for any code. Just don't wrap.
>> General code stype says no wrap for strings :)
>>
>
>I do not break / wrap strings; they need to be searchable. I assumed you
>meant this is preferred for bonding:
>
>NL_SET_ERR_MSG(extack, "Device is in use and cannot be enslaved");
Yep.
>
>
>over what I have done:
>
>NL_SET_ERR_MSG(extack,
> "Device is in use and cannot be enslaved");
next prev parent reply other threads:[~2017-10-04 18:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 4:58 [PATCH net-next 0/7] net: Plumb extack error reporting to enslavements David Ahern
2017-10-04 4:58 ` [PATCH net-next 1/7] net: Add extack to netdev_notifier_info David Ahern
2017-10-04 4:58 ` [PATCH net-next 2/7] net: Add extack to ndo_add_slave David Ahern
2017-10-04 4:58 ` [PATCH net-next 3/7] net: Add extack to upper device linking David Ahern
2017-10-04 4:58 ` [PATCH net-next 4/7] net: vrf: Add extack messages for enslave errors David Ahern
2017-10-04 4:58 ` [PATCH net-next 5/7] net: bonding: Add extack messages for some enslave failures David Ahern
2017-10-04 6:38 ` Jiri Pirko
2017-10-04 15:35 ` David Ahern
2017-10-04 18:04 ` Jiri Pirko
2017-10-04 18:06 ` David Ahern
2017-10-04 18:39 ` Jiri Pirko [this message]
2017-10-04 4:58 ` [PATCH net-next 6/7] net: bridge: Pass extack to down to netdev_master_upper_dev_link David Ahern
2017-10-04 15:13 ` Stephen Hemminger
2017-10-04 16:16 ` David Ahern
2017-10-04 4:58 ` [PATCH net-next 7/7] mlxsw: spectrum: Add extack messages for enslave failures David Ahern
2017-10-04 13:24 ` Ido Schimmel
2017-10-04 15:44 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171004183935.GI1895@nanopsycho \
--to=jiri@resnulli.us \
--cc=andy@greyhouse.net \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=idosch@mellanox.com \
--cc=j.vosburgh@gmail.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox