From: Li Qiang <johnny.li@montage-tech.com>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Subject: Re: can call libcxl function outside ndctl tool?
Date: Wed, 20 Oct 2021 15:28:48 -0400 [thread overview]
Message-ID: <20211020192848.GA12788@montage-desktop> (raw)
In-Reply-To: <78e901122fa889e595e709d69a303446351540f4.camel@intel.com>
On Wed, Oct 20, 2021 at 06:21:07AM +0000, Verma, Vishal L (vishal.l.verma@intel.com) wrote:
> On Tue, 2021-10-19 at 13:55 -0400, Li Qiang wrote:
> > Take cxl_cmd_new_identify as example.
> > There is CXL_EXPORT prefix, it seems can be called outside ndctl tool.
>
> Yes it can be linked to like any other library.
Thanks for your confirmation
>
> > While the intput and outpust struct cxl_memdev and cxl_cmd are private.
> >
> > ```
> >
> > CXL_EXPORT struct cxl_cmd *cxl_cmd_new_identify(struct cxl_memdev *memdev)
> > {
> > return cxl_cmd_new_generic(memdev, CXL_MEM_COMMAND_ID_IDENTIFY);
> > }
> >
> > ```
>
> Right - the intention is that those structs always remain private.
> Instead we provide accessor APIs to get fields out of the different
> command structures. e.g. for 'identify' we have
> cxl_cmd_identify_get_fw_rev, and so on. If there are other fields that
> lack these getter APIs, we can definitely add them. e.g. The
> health_info command has an exhaustive set of getter APIs.
These accessor getter APIs are used to decode output struct cxl_cmd.
Is there any setter APIs can construct the input struct cxl_memdev?
>
> >
> >
> > Thanks
> > Johnny
> >
> >
>
prev parent reply other threads:[~2021-10-20 7:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 17:55 can call libcxl function outside ndctl tool? Li Qiang
2021-10-20 6:21 ` Verma, Vishal L
2021-10-20 19:28 ` Li Qiang [this message]
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=20211020192848.GA12788@montage-desktop \
--to=johnny.li@montage-tech.com \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.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