From: Aaron Sierra <asierra@xes-inc.com>
To: Allen Hubbe <allenbh@gmail.com>
Cc: linux-ntb <linux-ntb@googlegroups.com>,
Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
davem <davem@davemloft.net>
Subject: Re: [PATCH 0/2] NTB: Stash private data in transport client device
Date: Mon, 15 Oct 2018 11:50:44 -0500 (CDT) [thread overview]
Message-ID: <1893808301.140368.1539622244524.JavaMail.zimbra@xes-inc.com> (raw)
In-Reply-To: <1171724234.130293.1539620853528.JavaMail.zimbra@xes-inc.com>
----- Original Message -----
> From: "Aaron Sierra" <asierra@xes-inc.com>
> Sent: Monday, October 15, 2018 11:27:33 AM
> ----- Original Message -----
>> From: "Allen Hubbe" <allenbh@gmail.com>
>> Sent: Monday, October 15, 2018 9:59:28 AM
>
>> On Fri, Oct 12, 2018 at 4:20 PM Aaron Sierra <asierra@xes-inc.com> wrote:
>>>
>>> Support NTB transport client device drivers stashing a reference to
>>> their private device representation within the transport client device
>>> for trivial lookup.
>>
>> Can dev_get/set_drvdata() be used instead?
>
> Allen, sure that would work just fine. You're asking for dev_get_drvdata
> and dev_set_drvdata to be used behind-the-scenes as an implementation
> detail, right?
>
>>> Use the new stashing mechanism to simplify ntb_netdev device probe
>>> and remove. This optimization will also benefit any out-of-tree
>>> drivers that care to use it.
>>
>> Simplify ntb_netdev_remove() looks good. Please also set(NULL) on remove.
>
> I'd like to add this cleanup as a call to ntb_transport_client_set_pdata()
> in ntb_transport_client_release(), so all transport client drivers get it for
> free if that's alright with you.
Allen,
Actually, does it really make sense to explicitly set the private data to
NULL at all? Either location is pretty immediately before freeing the
device's memory. The initial value of the data will always be NULL based on
how the memory is allocated.
-Aaron S.
>>>
>>> Aaron Sierra (2):
>>> NTB: transport: Support client device private data
>>> ntb_netdev: Simplify remove with client private data
>>>
>>> drivers/net/ntb_netdev.c | 28 +++-------------------------
>>> drivers/ntb/ntb_transport.c | 19 +++++++++++++++++++
>>> include/linux/ntb_transport.h | 2 ++
>>> 3 files changed, 24 insertions(+), 25 deletions(-)
>>>
>>> --
> >> 2.7.4
next prev parent reply other threads:[~2018-10-15 16:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 20:20 [PATCH 0/2] NTB: Stash private data in transport client device Aaron Sierra
2018-10-12 20:20 ` [PATCH 1/2] NTB: transport: Support client device private data Aaron Sierra
2018-10-12 20:20 ` [PATCH 2/2] ntb_netdev: Simplify remove with client " Aaron Sierra
2018-10-15 14:59 ` [PATCH 0/2] NTB: Stash private data in transport client device Allen Hubbe
2018-10-15 16:27 ` Aaron Sierra
2018-10-15 16:50 ` Aaron Sierra [this message]
2018-10-15 17:55 ` Logan Gunthorpe
2018-10-15 20:32 ` [PATCH] ntb_netdev: Simplify remove with client device drvdata Aaron Sierra
2018-10-15 20:42 ` Logan Gunthorpe
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=1893808301.140368.1539622244524.JavaMail.zimbra@xes-inc.com \
--to=asierra@xes-inc.com \
--cc=allenbh@gmail.com \
--cc=dave.jiang@intel.com \
--cc=davem@davemloft.net \
--cc=jdmason@kudzu.us \
--cc=linux-ntb@googlegroups.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