From: David Miller <davem@davemloft.net>
To: yanhaishuang@cmss.chinamobile.com
Cc: stephen@networkplumber.org, bridge@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bridge: Allow set bridge ageing time when switchdev disabled
Date: Wed, 30 Mar 2016 15:40:43 -0400 (EDT) [thread overview]
Message-ID: <20160330.154043.649305811904515416.davem@davemloft.net> (raw)
In-Reply-To: <1459248488-25621-1-git-send-email-yanhaishuang@cmss.chinamobile.com>
From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Tue, 29 Mar 2016 18:48:08 +0800
> When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP,
> we should ignore this error code and continue to set the ageing time.
>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Applied and queued up for -stable, thanks.
> @@ -582,7 +582,7 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
> int err;
>
> err = switchdev_port_attr_set(br->dev, &attr);
> - if (err)
> + if (err && err != -EOPNOTSUPP)
> return err;
>
> br->ageing_time = t;
This is at least the 5th time I've had to apply a bug fix exactly like
this one.
If this doesn't convince everyone that this whole -EOPNOTSUPP
mechanism is extremely error prone, I don't know what will.
There should be only one or two strictly controlled locations that
reinterpret the return value from all of these routines that have this
special way of signalling lack of switchdev support via -EOPNOTSUPP.
It can't be spread all over the place like this, it simply does NOT work.
prev parent reply other threads:[~2016-03-30 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 10:48 Haishuang Yan
2016-03-29 21:34 ` Ido Schimmel
2016-03-30 19:40 ` David Miller [this message]
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=20160330.154043.649305811904515416.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bridge@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=yanhaishuang@cmss.chinamobile.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
all inboxes | Powered by JetHome®