All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH] libnvdimm: clean up command definitions
Date: Tue, 29 Aug 2017 10:03:50 +0900	[thread overview]
Message-ID: <20170829100344.C729.E1E9C6FF@jp.fujitsu.com> (raw)
In-Reply-To: <CAPcyv4hw+REtb2be0WpBRWG3QXajEUFdG9vOXkV+H-ar7mZRhA@mail.gmail.com>

> On Mon, Aug 28, 2017 at 1:50 PM, Jerry Hoemann <jerry.hoemann@hpe.com> wrote:
> >
> > On Mon, Aug 28, 2017 at 08:45:32AM -0700, Dan Williams wrote:
> >> Remove the command payloads that do not have an associated libnvdimm
> >> ioctl. I.e. remove the payloads that would only ever be carried in the
> >> ND_CMD_CALL envelope. This prevents userspace from growing unnecessary
> >> dependencies on this kernel header when userspace already has everything
> >> it needs to craft and send these commands.
> >
> > Userspace needs to include linux/ndctl.h to make the call as
> > that is where nd_cmd_pkg is defined.
> >
> > So you want to have some structures defined in ndctl.h and other
> > defined in the to be created libndctl-nfit.h?  Plus a third header
> > file for the HPE non-root calls?
> 
> Yes. ndctl.h exports the ioctl command payloads, everything that goes
> inside of ND_CMD_CALL is defined by userspace headers. The
> libndctl-nfit.h header is proposed as a place to land vendor agnostic
> NFIT-defined payloads, and any vendor specific definitions would
> remain internal to libndctl as they are today.
> 
> > Will libndctl-nfit.h be generally available and installed?
> 
> Yes, that's the plan.
> 
> > Will it be clean so that other applications can use it to get these
> > definitions?  Or will it be loaded w/ a bunch of stuff only useful
> > to your ndctl command?
> 
> Yes, that's the plan. It's a bug if libndctl-nfit.h is not generically
> clean for issuing the NFIT root device commands via some ND_CMD_CALL
> helpers from the base libndctl library.
> 
> In other words libndctl-nfit.h defines the payload and libndctl
> defines some general helpers for issuing commands.

Maybe I don't understand your idea yet, let me confirm it.

Certainly, current acpi driver does not need these definitions.
But, I think nfit_test.ko will need them to emulate these features.

Do you intend that libndctl-nfit.h should be defined at "include/uapi/linux/"
directory?
Otherwise, it should be defined at "tools/testing/nvdimm/" or 
"tools/testing/nvdimm/test" ?

Thanks,
---
Yasunori Goto


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Jerry Hoemann <Jerry.Hoemann@hpe.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] libnvdimm: clean up command definitions
Date: Tue, 29 Aug 2017 10:03:50 +0900	[thread overview]
Message-ID: <20170829100344.C729.E1E9C6FF@jp.fujitsu.com> (raw)
In-Reply-To: <CAPcyv4hw+REtb2be0WpBRWG3QXajEUFdG9vOXkV+H-ar7mZRhA@mail.gmail.com>

> On Mon, Aug 28, 2017 at 1:50 PM, Jerry Hoemann <jerry.hoemann@hpe.com> wrote:
> >
> > On Mon, Aug 28, 2017 at 08:45:32AM -0700, Dan Williams wrote:
> >> Remove the command payloads that do not have an associated libnvdimm
> >> ioctl. I.e. remove the payloads that would only ever be carried in the
> >> ND_CMD_CALL envelope. This prevents userspace from growing unnecessary
> >> dependencies on this kernel header when userspace already has everything
> >> it needs to craft and send these commands.
> >
> > Userspace needs to include linux/ndctl.h to make the call as
> > that is where nd_cmd_pkg is defined.
> >
> > So you want to have some structures defined in ndctl.h and other
> > defined in the to be created libndctl-nfit.h?  Plus a third header
> > file for the HPE non-root calls?
> 
> Yes. ndctl.h exports the ioctl command payloads, everything that goes
> inside of ND_CMD_CALL is defined by userspace headers. The
> libndctl-nfit.h header is proposed as a place to land vendor agnostic
> NFIT-defined payloads, and any vendor specific definitions would
> remain internal to libndctl as they are today.
> 
> > Will libndctl-nfit.h be generally available and installed?
> 
> Yes, that's the plan.
> 
> > Will it be clean so that other applications can use it to get these
> > definitions?  Or will it be loaded w/ a bunch of stuff only useful
> > to your ndctl command?
> 
> Yes, that's the plan. It's a bug if libndctl-nfit.h is not generically
> clean for issuing the NFIT root device commands via some ND_CMD_CALL
> helpers from the base libndctl library.
> 
> In other words libndctl-nfit.h defines the payload and libndctl
> defines some general helpers for issuing commands.

Maybe I don't understand your idea yet, let me confirm it.

Certainly, current acpi driver does not need these definitions.
But, I think nfit_test.ko will need them to emulate these features.

Do you intend that libndctl-nfit.h should be defined at "include/uapi/linux/"
directory?
Otherwise, it should be defined at "tools/testing/nvdimm/" or 
"tools/testing/nvdimm/test" ?

Thanks,
---
Yasunori Goto

  reply	other threads:[~2017-08-29  1:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 15:45 [PATCH] libnvdimm: clean up command definitions Dan Williams
2017-08-28 15:45 ` Dan Williams
2017-08-28 20:50 ` Jerry Hoemann
2017-08-28 20:50   ` Jerry Hoemann
2017-08-28 21:06   ` Dan Williams
2017-08-28 21:06     ` Dan Williams
2017-08-29  1:03     ` Yasunori Goto [this message]
2017-08-29  1:03       ` Yasunori Goto
2017-08-29  3:22       ` Dan Williams
2017-08-29  3:22         ` Dan Williams
2017-08-29 10:09         ` Yasunori Goto
2017-08-29 10:09           ` Yasunori Goto
2017-08-29 16:26           ` Dan Williams
2017-08-29 16:26             ` Dan Williams
2017-08-30  0:23             ` Yasunori Goto
2017-08-30  0:23               ` Yasunori Goto

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=20170829100344.C729.E1E9C6FF@jp.fujitsu.com \
    --to=y-goto@jp.fujitsu.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.