From: "Tauro, Riana" <riana.tauro@intel.com>
To: Raag Jadav <raag.jadav@intel.com>,
<aravind.iddamsetty@linux.intel.com>, <rodrigo.vivi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <netdev@vger.kernel.org>,
<anshuman.gupta@intel.com>, <joonas.lahtinen@linux.intel.com>,
<simona.vetter@ffwll.ch>, <airlied@gmail.com>,
<pratik.bari@intel.com>, <joshua.santosh.ranjan@intel.com>,
<ashwin.kumar.kulkarni@intel.com>, <shubham.kumar@intel.com>,
<ravi.kishore.koppuravuri@intel.com>, <anvesh.bakwad@intel.com>,
<maarten.lankhorst@linux.intel.com>,
Zack McKevitt <zachary.mckevitt@oss.qualcomm.com>,
Lijo Lazar <lijo.lazar@amd.com>,
"Hawking Zhang" <Hawking.Zhang@amd.com>,
"David S. Miller" <davem@davemloft.net>,
"Paolo Abeni" <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH 3/4] drm/drm_ras: Add DRM RAS netlink error event notification
Date: Wed, 8 Apr 2026 19:59:33 +0530 [thread overview]
Message-ID: <09f253b3-ee64-4fbb-8cec-820e9769aa80@intel.com> (raw)
In-Reply-To: <acPjxf5XTYuR7sbM@black.igk.intel.com>
On 3/25/2026 7:01 PM, Raag Jadav wrote:
> On Wed, Mar 11, 2026 at 03:59:17PM +0530, Riana Tauro wrote:
>> Add support for asynchronous error notifications in drm_ras.
> It's either drm_ras or DRM RAS, make it consistent in all patches
> (both commit message and subject).
Sure.
>
>> Define a new `error-event` netlink event and a new multicast
>> group `error-notify` in drm_ras spec. Each event contains
>> a node-id and error-id to identify the type and source
>> of error.
>>
>> Add drm_ras_error_notify() to trigger this event from drivers.
>> Userspace can receive this event by subscribing to the
>> multicast group error-notify.
>>
>> Example: Using ynl tool
> Ditto. Either Usage or Example, make it consistent in all patches.
>
> Also, please utilize the full 75 character space where possible.
Will fix.
>
>> $ sudo ynl --family drm_ras --subscribe error-notify
>>
>> Cc: Jakub Kicinski <kuba@kernel.org>
>> Cc: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com>
>> Cc: Lijo Lazar <lijo.lazar@amd.com>
>> Cc: Hawking Zhang <Hawking.Zhang@amd.com>
>> Cc: David S. Miller <davem@davemloft.net>
>> Cc: Paolo Abeni <pabeni@redhat.com>
>> Cc: Eric Dumazet <edumazet@google.com>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>> Documentation/gpu/drm-ras.rst | 9 +++++
>> Documentation/netlink/specs/drm_ras.yaml | 14 +++++++
>> drivers/gpu/drm/drm_ras.c | 48 ++++++++++++++++++++++++
>> drivers/gpu/drm/drm_ras_nl.c | 6 +++
>> drivers/gpu/drm/drm_ras_nl.h | 4 ++
>> include/drm/drm_ras.h | 2 +
>> include/uapi/drm/drm_ras.h | 3 ++
>> 7 files changed, 86 insertions(+)
>>
>> diff --git a/Documentation/gpu/drm-ras.rst b/Documentation/gpu/drm-ras.rst
>> index 4636e68f5678..09b2918f67bd 100644
>> --- a/Documentation/gpu/drm-ras.rst
>> +++ b/Documentation/gpu/drm-ras.rst
>> @@ -54,6 +54,8 @@ User space tools can:
>> ``node-id`` and ``error-id`` as parameters.
>> * Clear specific error counters with the ``clear-error-counter`` command, using both
>> ``node-id`` and ``error-id`` as parameters.
>> +* Listen to ``error-event`` notifications for error events by subscribing to the
>> + ``error-notify`` multicast group.
>>
>> YAML-based Interface
>> --------------------
>> @@ -109,3 +111,10 @@ Example: Clear an error counter for a given node
>>
>> sudo ynl --family drm_ras --do clear-error-counter --json '{"node-id":0, "error-id":1}'
>> None
>> +
>> +Example: Listen to error events
>> +
>> +.. code-block:: bash
>> +
>> + sudo ynl --family drm_ras --subscribe error-notify
>> + {'msg': {'error-id': 1, 'node-id': 1}, 'name': 'error-event'}
> Can we also have error-name and node-name? I'd be pulling my hair off
> if I need to remember all the ids.
Yeah makes sense. We can add the node_name, error_name.
Adding device_name would also be more useful in the event.
@Rodrigo/@aravind thoughts?
>
> On that note, I think it'll be good to have them as part of request
> attributes as an alternative to ids (also for existing commands) but
> that can done as a follow up.
>
We cannot use names as alternative because it won't work for multiple cards.
example in xe: Suppose there are 2 cards and each has 2 nodes. We cannot
query using node_name+error_name.
Also most of the netlink implementations use id's as unique identifiers.
$ sudo ./cli.py --family drm_ras --dump list-nodes
[{'device-name': 'bdf_1', 'node-id': 0, 'node-name':
'correctable-errors', 'node-type': 'error-counter'},
{'device-name': 'bdf_1, 'node-id': 1, 'node-name':
'uncorrectable-errors', 'node-type': 'error-counter'},
{'device-name': 'bdf_2', 'node-id': 2, 'node-name':
'correctable-errors', 'node-type': 'error-counter'},
{'device-name': 'bdf_2', 'node-id': 3, 'node-name':
'uncorrectable-errors', 'node-type': 'error-counter'}]
>
> Also, what if I have multiple devices with multiple nodes. Do they need
> separate subscription?
>
No, we subscribe only to the group not the nodes. In this case the group
is 'error-notify'
$ sudo ./cli.py --family drm_ras --subscribe error-notify
{'msg': {'error-id': 1, 'node-id': 1}, 'name': 'error-event'}
{'msg': {'error-id': 1, 'node-id': 3}, 'name': 'error-event'}
Thanks
Riana
>
> Raag
next prev parent reply other threads:[~2026-04-08 14:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 10:29 [PATCH 0/4] Add support for clear counter and error event in DRM RAS Riana Tauro
2026-03-11 10:29 ` [PATCH 1/4] drm/drm_ras: Add clear-error-counter netlink command to drm_ras Riana Tauro
2026-03-12 0:29 ` Jakub Kicinski
2026-03-25 12:40 ` Raag Jadav
2026-03-11 10:29 ` [PATCH 2/4] drm/xe/xe_drm_ras: Add support for clear-error-counter in XE DRM RAS Riana Tauro
2026-03-12 10:17 ` Raag Jadav
2026-03-11 10:29 ` [PATCH 3/4] drm/drm_ras: Add DRM RAS netlink error event notification Riana Tauro
2026-03-25 13:31 ` Raag Jadav
2026-04-08 14:29 ` Tauro, Riana [this message]
2026-03-11 10:29 ` [PATCH 4/4] drm/xe/xe_drm_ras: Add error-event support in XE DRM RAS Riana Tauro
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=09f253b3-ee64-4fbb-8cec-820e9769aa80@intel.com \
--to=riana.tauro@intel.com \
--cc=Hawking.Zhang@amd.com \
--cc=airlied@gmail.com \
--cc=anshuman.gupta@intel.com \
--cc=anvesh.bakwad@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=ashwin.kumar.kulkarni@intel.com \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=joshua.santosh.ranjan@intel.com \
--cc=kuba@kernel.org \
--cc=lijo.lazar@amd.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pratik.bari@intel.com \
--cc=raag.jadav@intel.com \
--cc=ravi.kishore.koppuravuri@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=shubham.kumar@intel.com \
--cc=simona.vetter@ffwll.ch \
--cc=zachary.mckevitt@oss.qualcomm.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