[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE4R7bBkO=mcMQ-Pbns5kq4gcjZNqpZz1_-snn89bnfGdqzVcw@mail.gmail.com>
Date: Mon, 12 Oct 2015 20:08:23 -0700
From: Scott Feldman <sfeldma@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Ido Schimmel <idosch@...lanox.com>,
Elad Raz <eladr@...lanox.com>,
Florian Fainelli <f.fainelli@...il.com>,
Guenter Roeck <linux@...ck-us.net>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
"andrew@...n.ch" <andrew@...n.ch>,
john fastabend <john.fastabend@...il.com>,
David Laight <David.Laight@...lab.com>,
"stephen@...workplumber.org" <stephen@...workplumber.org>
Subject: Re: [patch net-next v4 4/7] switchdev: introduce possibility to defer obj_add/del
On Mon, Oct 12, 2015 at 11:03 AM, Jiri Pirko <jiri@...nulli.us> wrote:
> From: Jiri Pirko <jiri@...lanox.com>
>
> Similar to the attr usecase, the caller knows if he is holding RTNL and is
> in atomic section. So let the called to decide the correct call variant.
>
> This allows drivers to sleep inside their ops and wait for hw to get the
> operation status. Then the status is propagated into switchdev core.
> This avoids silent errors in drivers.
>
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
<snip>
> +static void switchdev_port_obj_work(struct work_struct *work)
> +{
> + struct switchdev_obj_work *ow =
> + container_of(work, struct switchdev_obj_work, work);
> + bool rtnl_locked = rtnl_is_locked();
> + int err;
> +
> + if (!rtnl_locked)
> + rtnl_lock();
Same comment as on patch 2/7 about not unconditionally grabbing rtnl_lock.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists