netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	andrew.gospodarek@broadcom.com, davem@davemloft.net,
	edumazet@google.com, jgg@ziepe.ca, leon@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	michael.chan@broadcom.com, netdev@vger.kernel.org,
	pabeni@redhat.com, selvin.xavier@broadcom.com
Subject: Re: [PATCH net-next v7 1/8] bnxt_en: Add auxiliary driver support
Date: Mon, 16 Jan 2023 20:56:25 -0800	[thread overview]
Message-ID: <20230116205625.394596cc@kernel.org> (raw)
In-Reply-To: <CACZ4nhuKo-h_dcSGuzAm4vJJuuxmnVo8jYO2scCxfqtktbCjfw@mail.gmail.com>

On Sat, 14 Jan 2023 12:39:09 -0800 Ajit Khaparde wrote:
> > > +static void bnxt_aux_dev_release(struct device *dev)
> > > +{
> > > +     struct bnxt_aux_dev *bnxt_adev =
> > > +             container_of(dev, struct bnxt_aux_dev, aux_dev.dev);
> > > +     struct bnxt *bp = netdev_priv(bnxt_adev->edev->net);
> > > +
> > > +     bnxt_adev->edev->en_ops = NULL;
> > > +     kfree(bnxt_adev->edev);  
> >
> > And yet the reference counted "release" function accesses the bp->adev
> > like it must exist.
> >
> > This seems odd to me - why do we need refcounting on devices at all
> > if we can free them synchronously? To be clear - I'm not sure this is
> > wrong, just seems odd.  
> I followed the existing implementations in that regard. Thanks

Leon, could you take a look? Is there no problem in assuming bnxt_adev
is still around in the release function?

  reply	other threads:[~2023-01-17  4:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 20:29 [PATCH net-next v7 0/8] Add Auxiliary driver support Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 1/8] bnxt_en: Add auxiliary " Ajit Khaparde
2023-01-14  6:10   ` Jakub Kicinski
2023-01-14 20:39     ` Ajit Khaparde
2023-01-17  4:56       ` Jakub Kicinski [this message]
2023-01-17 12:31         ` Leon Romanovsky
2023-01-17 17:18           ` Leon Romanovsky
2023-01-17 19:33           ` Ajit Khaparde
2023-01-18  6:32           ` Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 2/8] RDMA/bnxt_re: Use auxiliary driver interface Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 3/8] bnxt_en: Remove usage of ulp_id Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 4/8] bnxt_en: Use direct API instead of indirection Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 5/8] bnxt_en: Use auxiliary bus calls over proprietary calls Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 6/8] bnxt_en: Remove struct bnxt access from RoCE driver Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 7/8] RDMA/bnxt_re: Remove the sriov config callback Ajit Khaparde
2023-01-12 20:29 ` [PATCH net-next v7 8/8] bnxt_en: Remove runtime interrupt vector allocation Ajit Khaparde

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=20230116205625.394596cc@kernel.org \
    --to=kuba@kernel.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=selvin.xavier@broadcom.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).