From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgwkm02.jp.fujitsu.com (mgwkm02.jp.fujitsu.com [202.219.69.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D170621E11D07 for ; Mon, 28 Aug 2017 18:01:45 -0700 (PDT) Received: from m3050.s.css.fujitsu.com (msm.b.css.fujitsu.com [10.134.21.208]) by kw-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id 4F632AC006D for ; Tue, 29 Aug 2017 10:04:22 +0900 (JST) Date: Tue, 29 Aug 2017 10:03:50 +0900 From: Yasunori Goto Subject: Re: [PATCH] libnvdimm: clean up command definitions In-Reply-To: References: <20170828205033.GA6859@anatevka.americas.hpqcorp.net> Message-Id: <20170829100344.C729.E1E9C6FF@jp.fujitsu.com> MIME-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" List-ID: > On Mon, Aug 28, 2017 at 1:50 PM, Jerry Hoemann 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751298AbdH2BPf (ORCPT ); Mon, 28 Aug 2017 21:15:35 -0400 Received: from mgwkm01.jp.fujitsu.com ([202.219.69.168]:12148 "EHLO mgwkm01.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbdH2BPd (ORCPT ); Mon, 28 Aug 2017 21:15:33 -0400 X-Greylist: delayed 669 seconds by postgrey-1.27 at vger.kernel.org; Mon, 28 Aug 2017 21:15:33 EDT X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 250e3f8cf36e4023b22e1185d6e70e76 Date: Tue, 29 Aug 2017 10:03:50 +0900 From: Yasunori Goto To: Dan Williams Subject: Re: [PATCH] libnvdimm: clean up command definitions Cc: Jerry Hoemann , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" In-Reply-To: References: <20170828205033.GA6859@anatevka.americas.hpqcorp.net> Message-Id: <20170829100344.C729.E1E9C6FF@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.73 [ja] X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mon, Aug 28, 2017 at 1:50 PM, Jerry Hoemann 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