Linux CXL
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "fan.ni@samsung.com" <fan.ni@samsung.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
	"gregory.price@memverge.com" <gregory.price@memverge.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"Jonathan.Cameron@Huawei.com" <Jonathan.Cameron@Huawei.com>,
	"dave@stgolabs.net" <dave@stgolabs.net>,
	"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Subject: Re: [PATCH ndctl 1/7] cxl/region: skip region_actions for region creation
Date: Wed, 8 Feb 2023 00:19:09 +0000	[thread overview]
Message-ID: <5c8659811878addf570549c31419b9e458306418.camel@intel.com> (raw)
In-Reply-To: <20230207220723.GA702843@bgt-140510-bm03>

On Tue, 2023-02-07 at 22:07 +0000, Fan Ni wrote:
> On Tue, Feb 07, 2023 at 12:16:27PM -0700, Vishal Verma wrote:
> > Commit 3d6cd829ec08 ("cxl/region: Use cxl_filter_walk() to gather create-region targets")
> > removed the early return for create-region, and this caused a
> > create-region operation to unnecessarily loop through buses and root
> > decoders only to EINVAL out because ACTION_CREATE is handled outside of
> > the other actions. This results in confising messages such as:
> s/confising/confusing/
> > 
> >   # cxl create-region -t ram -d 0.0 -m 0,4
> >   {
> >     "region":"region7",
> >     "resource":"0xf030000000",
> >     "size":"512.00 MiB (536.87 MB)",
> >     ...
> >   }
> >   cxl region: decoder_region_action: region0: failed: Invalid argument
> >   cxl region: region_action: one or more failures, last failure: Invalid argument
> >   cxl region: cmd_create_region: created 1 region
> > 
> > Since there's no need to walk through the topology after creating a
> > region, and especially not to perform an invalid 'action', switch
> > back to retuening early for create-region.
> s/retuening/returning/

Thanks Fan! Fixed for v2.

> > 
> > Fixes: 3d6cd829ec08 ("cxl/region: Use cxl_filter_walk() to gather create-region targets")
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> > ---
> >  cxl/region.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/cxl/region.c b/cxl/region.c
> > index efe05aa..38aa142 100644
> > --- a/cxl/region.c
> > +++ b/cxl/region.c
> > @@ -789,7 +789,7 @@ static int region_action(int argc, const char **argv, struct cxl_ctx *ctx,
> >                 return rc;
> >  
> >         if (action == ACTION_CREATE)
> > -               rc = create_region(ctx, count, p);
> > +               return create_region(ctx, count, p);
> >  
> >         cxl_bus_foreach(ctx, bus) {
> >                 struct cxl_decoder *decoder;
> > 
> > -- 
> > 2.39.1
> > 


  reply	other threads:[~2023-02-08  0:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 19:16 [PATCH ndctl 0/7] cxl: add support for listing and creating volatile regions Vishal Verma
2023-02-07 19:16 ` [PATCH ndctl 1/7] cxl/region: skip region_actions for region creation Vishal Verma
2023-02-07 22:07   ` Fan Ni
2023-02-08  0:19     ` Verma, Vishal L [this message]
2023-02-08  3:45   ` Ira Weiny
2023-02-08  5:41   ` Dan Williams
2023-02-07 19:16 ` [PATCH ndctl 2/7] cxl: add a type attribute to region listings Vishal Verma
2023-02-08  3:46   ` Ira Weiny
2023-02-08  5:47   ` Dan Williams
2023-02-08  6:10     ` Verma, Vishal L
2023-02-10  0:47   ` Fan Ni
2023-02-07 19:16 ` [PATCH ndctl 3/7] cxl: add core plumbing for creation of ram regions Vishal Verma
2023-02-08  3:55   ` Ira Weiny
2023-02-08  6:23     ` Verma, Vishal L
2023-02-08 22:07       ` Ira Weiny
2023-02-08  5:49   ` Dan Williams
2023-02-10  1:04   ` Fan Ni
2023-02-10  1:10     ` Verma, Vishal L
2023-02-10  1:15       ` Fan Ni
2023-02-07 19:16 ` [PATCH ndctl 4/7] cxl/region: accept user-supplied UUIDs for pmem regions Vishal Verma
2023-02-08  3:56   ` Ira Weiny
2023-02-08  5:51   ` Dan Williams
2023-02-07 19:16 ` [PATCH ndctl 5/7] cxl/region: determine region type based on root decoder capability Vishal Verma
2023-02-08  4:07   ` Ira Weiny
2023-02-08  6:34     ` Verma, Vishal L
2023-02-08 22:09       ` Ira Weiny
2023-02-08  5:55   ` Dan Williams
2023-02-08  6:36     ` Verma, Vishal L
2023-02-07 19:16 ` [PATCH ndctl 6/7] cxl/list: Include regions in the verbose listing Vishal Verma
2023-02-08  4:08   ` Ira Weiny
2023-02-07 19:16 ` [PATCH ndctl 7/7] cxl/list: Enumerate device-dax properties for regions Vishal Verma
2023-02-08  4:15   ` Ira Weiny
2023-02-08  6:00   ` Dan Williams
2023-02-08  6:48     ` Verma, Vishal L

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=5c8659811878addf570549c31419b9e458306418.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=gregory.price@memverge.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    /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