public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: "Cheatham, Benjamin" <benjamin.cheatham@amd.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: <nvdimm@lists.linux.dev>, <dave.jiang@intel.com>,
	<vishal.l.verma@intel.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH v8 0/7] Add error injection support
Date: Mon, 16 Feb 2026 08:28:30 -0600	[thread overview]
Message-ID: <32ad3973-57e1-4fee-8afe-5bc82f6d3d5f@amd.com> (raw)
In-Reply-To: <aY5saAx5BOJ5jSyw@aschofie-mobl2.lan>



On 2/12/2026 6:12 PM, Alison Schofield wrote:
> On Fri, Feb 06, 2026 at 03:50:01PM -0600, Ben Cheatham wrote:
> 
> snip
>>
>> Ben Cheatham (7):
>>   libcxl: Add debugfs path to CXL context
>>   libcxl: Add CXL protocol errors
>>   libcxl: Add poison injection support
>>   cxl: Add inject-protocol-error command
>>   cxl: Add poison injection/clear commands
>>   cxl/list: Add injectable errors in output
>>   Documentation: Add docs for protocol and poison injection commands
> 
> Hi Ben,
> 
> Same concern touches 2 patches, so commenting here:
> 	libcxl: Add CXL protocol errors
> 	cxl/list: Add injectable errors in output
> 
> I'm seeing some unwanted complaining with cxl list when protocol inject
> is not supported. Here is a sample:
> 
> # cxl list -P -v
> libcxl: cxl_add_protocol_errors: failed to access /sys/kernel/debug/cxl/einj_types: No such file or directory
> libcxl: cxl_dport_get_einj_path: failed to access /sys/kernel/debug/cxl/cxl_host_bridge.0/einj_inject: No such file or directory
> libcxl: cxl_dport_get_einj_path: failed to access /sys/kernel/debug/cxl/cxl_root_port.0/einj_inject: No such file or directory
> libcxl: cxl_dport_get_einj_path: failed to access /sys/kernel/debug/cxl/cxl_switch_dport.0/einj_inject: No such file or directory
> 
> I believe it is not an error for the path not to exist. With the device poison,
> you already treat search for debugfs file as an existence test and no
> error is emitted on failure to find. 
> 
> If the diff below works for you, and nothing else comes up, I can fix it up
> when merging. Let me know -
> 

Sorry about that, below looks good to me!

Thanks,
Ben
> diff --git a/cxl/lib/libcxl.c b/cxl/lib/libcxl.c
> index d86884bc2de1..5e8deb6e297b 100644
> --- a/cxl/lib/libcxl.c
> +++ b/cxl/lib/libcxl.c
> @@ -3496,10 +3496,8 @@ static void cxl_add_protocol_errors(struct cxl_ctx *ctx)
>         }
>  
>         rc = access(path, F_OK);
> -       if (rc) {
> -               err(ctx, "failed to access %s: %s\n", path, strerror(errno));
> +       if (rc)
>                 goto err;
> -       }
>  
>         rc = sysfs_read_attr(ctx, path, buf);
>         if (rc) {
> @@ -3593,7 +3591,6 @@ CXL_EXPORT char *cxl_dport_get_einj_path(struct cxl_dport *dport)
>  
>         rc = access(path, F_OK);
>         if (rc) {
> -               err(ctx, "failed to access %s: %s\n", path, strerror(errno));
>                 free(path);
>                 return NULL;
>         }
> 


      reply	other threads:[~2026-02-16 14:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06 21:50 [ndctl PATCH v8 0/7] Add error injection support Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 1/7] libcxl: Add debugfs path to CXL context Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 2/7] libcxl: Add CXL protocol errors Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 3/7] libcxl: Add poison injection support Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 4/7] cxl: Add inject-protocol-error command Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 5/7] cxl: Add poison injection/clear commands Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 6/7] cxl/list: Add injectable errors in output Ben Cheatham
2026-02-06 21:50 ` [PATCH v8 7/7] Documentation: Add docs for protocol and poison injection commands Ben Cheatham
2026-02-10 17:52 ` [ndctl PATCH v8 0/7] Add error injection support Verma, Vishal L
2026-02-13  0:12 ` Alison Schofield
2026-02-16 14:28   ` Cheatham, Benjamin [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=32ad3973-57e1-4fee-8afe-5bc82f6d3d5f@amd.com \
    --to=benjamin.cheatham@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@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