From: Leon Romanovsky <leon@kernel.org>
To: Abhijit Gangurde <abhijit.gangurde@amd.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
shannon.nelson@amd.com, brett.creeley@amd.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, corbet@lwn.net, andrew+netdev@lunn.ch,
allen.hubbe@amd.com, nikhil.agarwal@amd.com,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Boyer <andrew.boyer@amd.com>
Subject: Re: [PATCH 08/14] RDMA/ionic: Register auxiliary module for ionic ethernet adapter
Date: Fri, 25 Apr 2025 20:10:05 +0300 [thread overview]
Message-ID: <20250425171005.GU48485@unreal> (raw)
In-Reply-To: <ab361812-566e-5454-ab2c-40757a8808da@amd.com>
On Fri, Apr 25, 2025 at 03:46:06PM +0530, Abhijit Gangurde wrote:
> On 4/24/25 18:38, Jason Gunthorpe wrote:
> > On Wed, Apr 23, 2025 at 03:59:07PM +0530, Abhijit Gangurde wrote:
> > > +static int ionic_aux_probe(struct auxiliary_device *adev,
> > > + const struct auxiliary_device_id *id)
> > > +{
> > > + struct ionic_aux_dev *ionic_adev;
> > > + struct net_device *ndev;
> > > + struct ionic_ibdev *dev;
> > > +
> > > + ionic_adev = container_of(adev, struct ionic_aux_dev, adev);
> > > + ndev = ionic_api_get_netdev_from_handle(ionic_adev->handle);
> > It must not do this, the net_device should not go into the IB driver,
> > like this that will create a huge complex tangled mess.
> >
> > The netdev(s) come in indirectly through the gid table and through the
> > net notifiers and ib_device_set_netdev() and they should only be
> > touched in paths dealing with specific areas.
> >
> > So don't use things like netdev_err, we have ib_err/dev_err and
> > related instead for IB drivers to use.
>
> Sure. Will remove storing of net_device in the IB driver and its
> references in the next spin. Will wait for some more feedback
> before rolling out v2.
The problem is that coupling with net_device is so distracting that
both of us are not really invested time into deep review of this series.
Another problematic pattern is usage of "void *handle" to convey
information between aux devices. Please use struct pointer instead of
void for that.
Thanks
>
> Thanks,
> Abhijit
>
> >
> > > +struct ionic_ibdev {
> > > + struct ib_device ibdev;
> > > +
> > > + struct device *hwdev;
> > > + struct net_device *ndev;
> > Same here, this member should not exist, and it didn't hold a
> > refcount for this pointer.
> >
> > Jason
next prev parent reply other threads:[~2025-04-25 17:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 10:28 [PATCH 00/14] Introduce AMD Pensando RDMA driver Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 01/14] net: ionic: Rename neqs_per_lif to reflect rdma capability Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 02/14] net: ionic: Create an auxiliary device for rdma driver Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 03/14] net: ionic: Export the APIs from net driver to get RDMA capabilities Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 04/14] net: ionic: Export the APIs from net driver to support device commands Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 05/14] net: ionic: Provide doorbell and CMB region information Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 06/14] net: ionic: Move header files to a common location Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 07/14] RDMA: Add IONIC to rdma_driver_id definition Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 08/14] RDMA/ionic: Register auxiliary module for ionic ethernet adapter Abhijit Gangurde
2025-04-24 13:08 ` Jason Gunthorpe
2025-04-25 10:16 ` Abhijit Gangurde
2025-04-25 17:10 ` Leon Romanovsky [this message]
2025-04-28 4:34 ` Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 09/14] RDMA/ionic: Create device queues to support admin operations Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 10/14] RDMA/ionic: Register device ops for control path Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 11/14] RDMA/ionic: Register device ops for datapath Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 12/14] RDMA/ionic: Register device ops for miscellaneous functionality Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 13/14] RDMA/ionic: Implement device stats ops Abhijit Gangurde
2025-04-23 10:29 ` [PATCH 14/14] RDMA/ionic: Add Makefile/Kconfig to kernel build environment Abhijit Gangurde
2025-04-24 21:57 ` kernel test robot
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=20250425171005.GU48485@unreal \
--to=leon@kernel.org \
--cc=abhijit.gangurde@amd.com \
--cc=allen.hubbe@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.boyer@amd.com \
--cc=brett.creeley@amd.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikhil.agarwal@amd.com \
--cc=pabeni@redhat.com \
--cc=shannon.nelson@amd.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).