From: Leon Romanovsky <leon@kernel.org>
To: Edwin Peer <edwin.peer@broadcom.com>
Cc: Ido Schimmel <idosch@idosch.org>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Ido Schimmel <idosch@mellanox.com>,
Jiri Pirko <jiri@mellanox.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
syzbot+93d5accfaefceedf43c1@syzkaller.appspotmail.com,
Michael Chan <michael.chan@broadcom.com>
Subject: Re: [PATCH net-next] netdevsim: Register and unregister devlink traps on probe/remove device
Date: Tue, 26 Oct 2021 08:56:29 +0300 [thread overview]
Message-ID: <YXeYjXx92wKdPe02@unreal> (raw)
In-Reply-To: <CAKOOJTzc9pJ1KKDHuGTFDeHb77B2GynA9HEVWKys=zvh_kY+Hw@mail.gmail.com>
On Mon, Oct 25, 2021 at 04:19:07PM -0700, Edwin Peer wrote:
> On Sun, Oct 24, 2021 at 3:35 PM Ido Schimmel <idosch@idosch.org> wrote:
>
> > On Sun, Oct 24, 2021 at 11:42:11AM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@nvidia.com>
> > >
> > > Align netdevsim to be like all other physical devices that register and
> > > unregister devlink traps during their probe and removal respectively.
> >
> > No, this is incorrect. Out of the three drivers that support both reload
> > and traps, both netdevsim and mlxsw unregister the traps during reload.
> > Here is another report from syzkaller about mlxsw [1].
> >
> > Please revert both 22849b5ea595 ("devlink: Remove not-executed trap
> > policer notifications") and 8bbeed485823 ("devlink: Remove not-executed
> > trap group notifications").
>
> Could we also revert 82465bec3e97 ("devlink: Delete reload
> enable/disable interface")?
Absolutely not.
> This interface is needed because bnxt_en cannot reorder devlink last.
> If Leon had fully carried out the re-ordering in our driver he would
> have introduced a udev phys_port_name regression because of:
>
> cda2cab0771 ("bnxt_en: Move devlink_register before registering netdev")
>
> and:
>
> ab178b058c4 ("bnxt: remove ndo_get_phys_port_name implementation")
devlink_register() doesn't do anything except performing as a barrier.
In a nutshell, latest devlink_register() implementation is better
implementation of previously existed "reload enable/disable" boolean.
You don't need to reorder whole devlink logic, just put a call to
devlink_register() in the place where you wanted to put your
devlink_reload_enable().
>
> I think this went unnoticed for bnxt_en, because Michael had not yet
> posted our devlink reload patches, which presently rely on the reload
> enable/disable API. Absent horrible kludges in reload down/up which
> currently depends on the netdev, there doesn't appear to be a clean
> way to resolve the circular dependency without the interlocks this API
> provides.
You was supposed to update and retest your out-of-tree implementation
of devlink reload before posting it to the ML. However, if you use
devlink_*() API correctly, such dependency won't exist.
>
> I imagine other subtle regressions are lying in wait.
Sorry, but we don't have crystal ball and can't guess what else is
broken in your out-of-tree driver.
Thanks
>
> Regards,
> Edwin Peer
next prev parent reply other threads:[~2021-10-26 5:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-24 8:42 [PATCH net-next] netdevsim: Register and unregister devlink traps on probe/remove device Leon Romanovsky
2021-10-24 9:05 ` Ido Schimmel
2021-10-24 9:54 ` Leon Romanovsky
2021-10-24 10:48 ` Ido Schimmel
2021-10-25 5:34 ` Leon Romanovsky
2021-10-25 8:08 ` Ido Schimmel
2021-10-25 10:56 ` Leon Romanovsky
2021-10-26 6:51 ` Ido Schimmel
2021-10-26 7:18 ` Leon Romanovsky
2021-10-26 14:09 ` Ido Schimmel
2021-10-26 16:14 ` Leon Romanovsky
2021-10-26 19:02 ` Jakub Kicinski
2021-10-26 19:30 ` Leon Romanovsky
2021-10-26 19:56 ` Jakub Kicinski
2021-10-27 5:56 ` Leon Romanovsky
2021-10-27 14:17 ` Jakub Kicinski
2021-10-27 15:17 ` Leon Romanovsky
2021-10-27 19:15 ` Leon Romanovsky
2021-10-27 19:28 ` Jakub Kicinski
2021-10-25 18:24 ` Jakub Kicinski
2021-10-25 19:12 ` Leon Romanovsky
2021-10-25 23:19 ` Edwin Peer
2021-10-26 5:56 ` Leon Romanovsky [this message]
2021-10-26 17:34 ` Edwin Peer
2021-10-26 19:22 ` Leon Romanovsky
2021-10-26 20:03 ` Edwin Peer
2021-10-27 6:43 ` Leon Romanovsky
2021-10-27 8:46 ` Edwin Peer
2021-10-27 9:43 ` Leon Romanovsky
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=YXeYjXx92wKdPe02@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edwin.peer@broadcom.com \
--cc=idosch@idosch.org \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=syzbot+93d5accfaefceedf43c1@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).