Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next v7 09/10] net: team: Add new tx_enabled team port option
From: Kuniyuki Iwashima @ 2026-04-10  6:36 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-9-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> This option allows independent control over tx enablement without
> affecting rx enablement. Like the rx_enabled option, this also
> implicitly affects the enabled option.
>
> If this option is not used, then the enabled option will continue to
> behave as it did before.
>
> Tested in a follow-up patch with a new selftest.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* [PATCH next-next v2] net:mctp: fix setting mctp hdr ver reserved field cause  data dropped
From: wit_yuan @ 2026-04-10  6:33 UTC (permalink / raw)
  To: netdev; +Cc: Yuan Zhaoming
In-Reply-To: <20260410063334.7531-1-yuanzhaoming901030@126.com>

From: Yuan Zhaoming <yuanzm2@lenovo.com>

from spec dsp0236_1.2.1.pdf page 26, the mctp header contains the
RSVD(4bit) and Hdr version(4 bit).

mctp_pkttype_receive invoke mctp_hdr, and get mh->ver whole byte 
compare the MCTP_VER_MIN, MCTP_VER_MAX. the reserver bits may be by 
misleading used.

one type hba card will set pcie vdm header Pad Len the same with RSVD
bit, this will not work on mctp kernel solution.

Signed-off-by: Yuan Zhaoming <yuanzm2@lenovo.com>

---
 include/net/mctp.h | 1 +
 net/mctp/route.c   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/net/mctp.h b/include/net/mctp.h
index f481007a6..1392fafe7 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -35,6 +35,7 @@ struct mctp_hdr {
 #define MCTP_HDR_SEQ_MASK	GENMASK(1, 0)
 #define MCTP_HDR_TAG_SHIFT	0
 #define MCTP_HDR_TAG_MASK	GENMASK(2, 0)
+#define MCTP_HDR_VER_MASK	GENMASK(3, 0)
 
 #define MCTP_INITIAL_DEFAULT_NET	1
 
diff --git a/net/mctp/route.c b/net/mctp/route.c
index 56c441e90..aa0e89d67 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -464,7 +464,7 @@ static int mctp_dst_input(struct mctp_dst *dst, struct sk_buff *skb)
 	netid = mctp_cb(skb)->net;
 	skb_pull(skb, sizeof(struct mctp_hdr));
 
-	if (mh->ver != 1)
+	if (((mh->ver & MCTP_HDR_VER_MASK)) < MCTP_VER_MIN || (mh->ver & MCTP_HDR_VER_MASK) > MCTP_VER_MAX)
 		goto out;
 
 	flags = mh->flags_seq_tag & (MCTP_HDR_FLAG_SOM | MCTP_HDR_FLAG_EOM);
@@ -1345,7 +1345,7 @@ static int mctp_pkttype_receive(struct sk_buff *skb, struct net_device *dev,
 
 	/* We have enough for a header; decode and route */
 	mh = mctp_hdr(skb);
-	if (mh->ver < MCTP_VER_MIN || mh->ver > MCTP_VER_MAX)
+	if (((mh->ver & MCTP_HDR_VER_MASK)) < MCTP_VER_MIN || (mh->ver & MCTP_HDR_VER_MASK) > MCTP_VER_MAX)
 		goto err_drop;
 
 	/* source must be valid unicast or null; drop reserved ranges and
-- 
2.43.0


^ permalink raw reply related

* (no subject)
From: wit_yuan @ 2026-04-10  6:33 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20260410060957.1336-2-yuanzhaoming901030@126.com>


Please ignore this patch. It was sent by mistake due to i'm newbee.

I will send a corrected version shortly.

Sorry for the noise.




^ permalink raw reply

* Re: [PATCH net-next v7 08/10] net: team: Add new rx_enabled team port option
From: Kuniyuki Iwashima @ 2026-04-10  6:33 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-8-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> Allow independent control over rx enablement via the rx_enabled option
> without affecting tx enablement. This affects the normal enabled
> option since a port is only considered enabled if both tx and rx are
> enabled.
>
> If this option is not used, then the enabled option will continue to
> behave exactly as it did before.
>
> Tested in a follow-up patch with a new selftest.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* [PATCH net 1/1] af_unix: Hold receive queue lock in ioctl(SIOCATMARK)
From: Ren Wei @ 2026-04-10  6:31 UTC (permalink / raw)
  To: netdev
  Cc: kuniyu, davem, edumazet, kuba, pabeni, horms, rao.shoaib,
	yifanwucs, tomapufckgml, yuantan098, bird, enjou1224z,
	wangjiexun2025, n05ec
In-Reply-To: <cover.1775731983.git.wangjiexun2025@gmail.com>

From: Jiexun Wang <wangjiexun2025@gmail.com>

unix_ioctl() peeks at the receive queue and may check both the head skb
and its successor while deciding whether SIOCATMARK should report the
mark. However, u->iolock does not stabilize receive-queue element
lifetime. Queue teardown paths can purge or splice the queue under
sk->sk_receive_queue.lock and free the skb while unix_ioctl() still
uses it.

Take sk->sk_receive_queue.lock while inspecting the queue so the skb
and next_skb stay alive for the whole decision.

Fixes: 314001f0bf92 ("af_unix: Add OOB support")
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
Suggested-by: Xin Liu <bird@lzu.edu.cn>
Tested-by: Ren Wei <enjou1224z@gmail.com>
Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
---
 net/unix/af_unix.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index b23c33df8b46..54f12d5cda37 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -3301,6 +3301,8 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 			int answ = 0;
 
 			mutex_lock(&u->iolock);
+			/* The receive queue lock keeps skb and next_skb alive. */
+			spin_lock(&sk->sk_receive_queue.lock);
 
 			skb = skb_peek(&sk->sk_receive_queue);
 			if (skb) {
@@ -3315,6 +3317,7 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 					answ = 1;
 			}
 
+			spin_unlock(&sk->sk_receive_queue.lock);
 			mutex_unlock(&u->iolock);
 
 			err = put_user(answ, (int __user *)arg);
-- 
2.34.1


^ permalink raw reply related

* Re: [PATCH net-next v7 07/10] net: team: Track rx enablement separately from tx enablement
From: Kuniyuki Iwashima @ 2026-04-10  6:31 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-7-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> Separate the rx and tx enablement/disablement into different
> functions so that it is easier to interact with them independently
> later.
>
> Although this patch changes receive and transmit paths, the actual
> behavior of the teaming driver should remain unchanged, since there
> is no option introduced yet to change rx or tx enablement
> independently. Those options will be added in follow-up patches.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* Re: [PATCH net-next v7 06/10] net: team: Rename enablement functions and struct members to tx
From: Kuniyuki Iwashima @ 2026-04-10  6:22 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-6-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> Add no functional changes, but rename enablement functions, variables
> etc. that are used in teaming driver transmit decisions.
>
> Since rx and tx enablement are still coupled, some of the variables
> renamed in this patch are still used for the rx path, but that will
> change in a follow-up patch.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* Re: [PATCH 3/4] drm/drm_ras: Add DRM RAS netlink error event notification
From: Tauro, Riana @ 2026-04-10  6:20 UTC (permalink / raw)
  To: Raag Jadav, aravind.iddamsetty, intel-xe
  Cc: rodrigo.vivi, dri-devel, netdev, anshuman.gupta, joonas.lahtinen,
	simona.vetter, airlied, pratik.bari, joshua.santosh.ranjan,
	ashwin.kumar.kulkarni, shubham.kumar, ravi.kishore.koppuravuri,
	anvesh.bakwad, maarten.lankhorst, Zack McKevitt, Lijo Lazar,
	Hawking Zhang, David S. Miller, Paolo Abeni, Eric Dumazet,
	Jakub Kicinski
In-Reply-To: <adc6hTz-xMopiJsc@black.igk.intel.com>


On 4/9/2026 11:05 AM, Raag Jadav wrote:
> On Wed, Apr 08, 2026 at 07:59:33PM +0530, Tauro, Riana wrote:
>> On 3/25/2026 7:01 PM, Raag Jadav wrote:
>>> On Wed, Mar 11, 2026 at 03:59:17PM +0530, Riana Tauro wrote:
> ...
>
>>>> +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?
>>
I tried adding all parameters, but the event response seems overloaded.
I think node-name, error-name is not necessary since this will be mostly 
used

by tools and scripts that get the nodes and error-ids prior to subscribing.

Let me know your thoughts

$ sudo ./tools/net/ynl/pyynl/cli.py --family drm_ras --subscribe 
error-notify

{'msg': {'device-name': '0000:03:00.0', 'error-id': 1, 'error-name': 
'core-compute', 'node-id': 3, 'node-name': 'uncorrectable-errors'},

'name': 'error-event'}

{'msg': {'device-name': '0000:04:00.0', 'error-id': 1, 'error-name': 
'core-compute', 'node-id': 1, 'node-name': 'uncorrectable-errors'},

'name': 'error-event'}

Thanks
Riana

>>
>>> 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'}]
> This means they don't persist the user needs to figures out all the ids before
> anything can happen. In device node world we have /dev/dri/by-path/<bdf> which
> makes it much easier.
>
> Also, I'm not much informed about the history and it's still unclear to me what
> problem did netlink solve here that cannot be solved by anything else? But we're
> too late for that discussion, and again, not my call.
>
>>> 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'}
> Hm, perhaps I need to spend some time wrapping my head around the new concept.
> Let's catch up sometime this week.
>
> Raag

^ permalink raw reply

* Re: [PATCH net-next v7 05/10] selftests: net: Add test for enablement of ports with teamd
From: Kuniyuki Iwashima @ 2026-04-10  6:18 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-5-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> There are no tests that verify enablement and disablement of team driver
> ports with teamd. This should work even with changes to the enablement
> option, so it is important to test.
>
> This test sets up an active-backup network configuration across two
> network namespaces, and tries to send traffic while changing which
> link is the active one.
>
> Also increase the team test timeout to 300 seconds, because gracefully
> killing teamd can take 30 seconds for each instance.
>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* [PATCH next-next v2] net:mctp: fix setting mctp hdr ver reserved field cause  data dropped
From: wit_yuan @ 2026-04-10  6:17 UTC (permalink / raw)
  To: jk
  Cc: yuanzhaoming901030, yuanzm2, matt, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel
In-Reply-To: <20260410061703.3547-1-yuanzhaoming901030@126.com>

From: Yuan Zhaoming <yuanzm2@lenovo.com>

from spec dsp0236_1.2.1.pdf page 26, the mctp header contains the
RSVD(4bit) and Hdr version(4 bit).

mctp_pkttype_receive invoke mctp_hdr, and get mh->ver whole byte 
compare the MCTP_VER_MIN, MCTP_VER_MAX. the reserver bits may be by 
misleading used.

one type hba card will set pcie vdm header Pad Len the same with RSVD
bit, this will not work on mctp kernel solution.

Signed-off-by: Yuan Zhaoming <yuanzm2@lenovo.com>

---
 include/net/mctp.h | 1 +
 net/mctp/route.c   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/net/mctp.h b/include/net/mctp.h
index f481007a6..1392fafe7 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -35,6 +35,7 @@ struct mctp_hdr {
 #define MCTP_HDR_SEQ_MASK	GENMASK(1, 0)
 #define MCTP_HDR_TAG_SHIFT	0
 #define MCTP_HDR_TAG_MASK	GENMASK(2, 0)
+#define MCTP_HDR_VER_MASK	GENMASK(3, 0)
 
 #define MCTP_INITIAL_DEFAULT_NET	1
 
diff --git a/net/mctp/route.c b/net/mctp/route.c
index 56c441e90..aa0e89d67 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -464,7 +464,7 @@ static int mctp_dst_input(struct mctp_dst *dst, struct sk_buff *skb)
 	netid = mctp_cb(skb)->net;
 	skb_pull(skb, sizeof(struct mctp_hdr));
 
-	if (mh->ver != 1)
+	if (((mh->ver & MCTP_HDR_VER_MASK)) < MCTP_VER_MIN || (mh->ver & MCTP_HDR_VER_MASK) > MCTP_VER_MAX)
 		goto out;
 
 	flags = mh->flags_seq_tag & (MCTP_HDR_FLAG_SOM | MCTP_HDR_FLAG_EOM);
@@ -1345,7 +1345,7 @@ static int mctp_pkttype_receive(struct sk_buff *skb, struct net_device *dev,
 
 	/* We have enough for a header; decode and route */
 	mh = mctp_hdr(skb);
-	if (mh->ver < MCTP_VER_MIN || mh->ver > MCTP_VER_MAX)
+	if (((mh->ver & MCTP_HDR_VER_MASK)) < MCTP_VER_MIN || (mh->ver & MCTP_HDR_VER_MASK) > MCTP_VER_MAX)
 		goto err_drop;
 
 	/* source must be valid unicast or null; drop reserved ranges and
-- 
2.43.0


^ permalink raw reply related

* (no subject)
From: wit_yuan @ 2026-04-10  6:17 UTC (permalink / raw)
  To: jk
  Cc: yuanzhaoming901030, yuanzm2, matt, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel
In-Reply-To: <ff147a3f0d27ef2aa6026cc86f9113d56a8c61ac.camel@codeconstruct.com.au>



thanks for you reply, jeremy.

I will change the identity.

I also modify the optimized code.


^ permalink raw reply

* Re: [PATCH net-next 2/9] r8152: Add support for RTL8157 SRAM access and ADV indirect access
From: Birger Koblitz @ 2026-04-10  6:11 UTC (permalink / raw)
  To: kernel test robot, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: llvm, oe-kbuild-all, netdev, linux-usb, linux-kernel
In-Reply-To: <202604101309.B9mdviRN-lkp@intel.com>

On 10/04/2026 07:17, kernel test robot wrote:
> Hi Birger,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 5c9e55fecf9365890c64f14761a80f9413a3b1d1]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Birger-Koblitz/r8152-Add-support-for-RTL8157-RX-TX-descriptor-format/20260315-014044
> base:   5c9e55fecf9365890c64f14761a80f9413a3b1d1
> patch link:    https://lore.kernel.org/r/20260314-rtl8157_next-v1-2-9ba77b428afd%40birger-koblitz.de
> patch subject: [PATCH net-next 2/9] r8152: Add support for RTL8157 SRAM access and ADV indirect access

This refers to the initial version of the patch, possibly v1, but v7 was applied, which did not even
have this particular patch. This is probably a configuration issue of what the robot sees.

Birger

^ permalink raw reply

* [PATCH next-next v2] net:mctp: fix setting mctp hdr ver reserved field cause  data dropped
From: wit_yuan @ 2026-04-10  6:09 UTC (permalink / raw)
  To: jk
  Cc: yuanzhaoming901030, yuanzm2, matt, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel
In-Reply-To: <20260410060957.1336-1-yuanzhaoming901030@126.com>

From: Yuan Zhaoming <yuanzm2@lenovo.com>

from spec dsp0236_1.2.1.pdf page 26, the mctp header contains the
RSVD(4bit) and Hdr version(4 bit).

mctp_pkttype_receive invoke mctp_hdr, and get mh->ver whole byte 
compare the MCTP_VER_MIN, MCTP_VER_MAX. the reserver bits may be by 
misleading used.

one type hba card will set pcie vdm header Pad Len the same with RSVD
bit, this will not work on mctp kernel solution.

Signed-off-by: Yuan Zhaoming <yuanzm2@lenovo.com>

---
 include/net/mctp.h | 1 +
 net/mctp/route.c   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/net/mctp.h b/include/net/mctp.h
index f481007a6..1392fafe7 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -35,6 +35,7 @@ struct mctp_hdr {
 #define MCTP_HDR_SEQ_MASK	GENMASK(1, 0)
 #define MCTP_HDR_TAG_SHIFT	0
 #define MCTP_HDR_TAG_MASK	GENMASK(2, 0)
+#define MCTP_HDR_VER_MASK	GENMASK(3, 0)
 
 #define MCTP_INITIAL_DEFAULT_NET	1
 
diff --git a/net/mctp/route.c b/net/mctp/route.c
index 56c441e90..aa0e89d67 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -464,7 +464,7 @@ static int mctp_dst_input(struct mctp_dst *dst, struct sk_buff *skb)
 	netid = mctp_cb(skb)->net;
 	skb_pull(skb, sizeof(struct mctp_hdr));
 
-	if (mh->ver != 1)
+	if (((mh->ver & MCTP_HDR_VER_MASK)) < MCTP_VER_MIN || (mh->ver & MCTP_HDR_VER_MASK) > MCTP_VER_MAX)
 		goto out;
 
 	flags = mh->flags_seq_tag & (MCTP_HDR_FLAG_SOM | MCTP_HDR_FLAG_EOM);
@@ -1345,7 +1345,7 @@ static int mctp_pkttype_receive(struct sk_buff *skb, struct net_device *dev,
 
 	/* We have enough for a header; decode and route */
 	mh = mctp_hdr(skb);
-	if (mh->ver < MCTP_VER_MIN || mh->ver > MCTP_VER_MAX)
+	if (((mh->ver & MCTP_HDR_VER_MASK)) < MCTP_VER_MIN || (mh->ver & MCTP_HDR_VER_MASK) > MCTP_VER_MAX)
 		goto err_drop;
 
 	/* source must be valid unicast or null; drop reserved ranges and
-- 
2.43.0


^ permalink raw reply related

* (no subject)
From: wit_yuan @ 2026-04-10  6:09 UTC (permalink / raw)
  To: jk
  Cc: yuanzhaoming901030, yuanzm2, matt, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel
In-Reply-To: <ff147a3f0d27ef2aa6026cc86f9113d56a8c61ac.camel@codeconstruct.com.au/T/#rc39d8ae7e5ee7e74556d16fc836cc9f2bf745701>


thanks for you reply, jeremy.

I will change the identity.

I also modify the optimized code.



^ permalink raw reply

* Re: [PATCH net-next v7 04/10] selftests: net: Add tests for failover of team-aggregated ports
From: Kuniyuki Iwashima @ 2026-04-10  6:09 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-4-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> There are currently no kernel tests that verify the effect of setting
> the enabled team driver option. In a followup patch, there will be
> changes to this option, so it will be important to make sure it still
> behaves as it does now.
>
> The test verifies that tcp continues to work across two different team
> devices in separate network namespaces, even when member links are
> manually disabled.
>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* Re: [PATCH net-next v7 03/10] net: team: Rename port_disabled team mode op to port_tx_disabled
From: Kuniyuki Iwashima @ 2026-04-10  5:56 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-3-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> This team mode op is only used by the load balance mode, and it only
> uses it in the tx path.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* Re: [PATCH net-next v7 02/10] net: team: Remove unused team_mode_op, port_enabled
From: Kuniyuki Iwashima @ 2026-04-10  5:56 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-2-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> This team_mode_op wasn't used by any of the team modes, so remove it.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply

* Re: [PATCH net-next v7 01/10] net: team: Annotate reads and writes for mixed lock accessed values
From: Kuniyuki Iwashima @ 2026-04-10  5:55 UTC (permalink / raw)
  To: Marc Harvey
  Cc: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman, netdev,
	linux-kernel, linux-kselftest
In-Reply-To: <20260409-teaming-driver-internal-v7-1-f47e7589685d@google.com>

On Wed, Apr 8, 2026 at 7:59 PM Marc Harvey <marcharvey@google.com> wrote:
>
> The team_port's "index" and the team's "en_port_count" are read in
> the hot transmit path, but are only written to when holding the rtnl
> lock.
>
> Use READ_ONCE() for all lockless reads of these values, and use
> WRITE_ONCE() for all writes.
>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Marc Harvey <marcharvey@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

fwiw, Sashiko's review is orthogonal to this patch;
the comments are for the existing code before this patch.

^ permalink raw reply

* [bug report] octeontx2-af: npc: cn20k: Use common APIs
From: Dan Carpenter @ 2026-04-10  5:52 UTC (permalink / raw)
  To: Suman Ghosh; +Cc: Ratheesh Kannoth, Suman Ghosh, netdev

Hello Suman Ghosh,

Commit 6d1e70282f76 ("octeontx2-af: npc: cn20k: Use common APIs")
from Feb 24, 2026 (linux-next), leads to the following Smatch static
checker warning:

	drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c:1065 npc_cn20k_config_mcam_entry()
	error: uninitialized symbol 'kw_type'.

drivers/net/ethernet/marvell/octeontx2/af/cn20k/npc.c
    1045 void npc_cn20k_config_mcam_entry(struct rvu *rvu, int blkaddr, int index,
    1046                                  u8 intf, struct cn20k_mcam_entry *entry,
    1047                                  bool enable, u8 hw_prio, u8 req_kw_type)
    1048 {
    1049         struct npc_mcam *mcam = &rvu->hw->mcam;
    1050         int mcam_idx = index % mcam->banksize;
    1051         int bank = index / mcam->banksize;
    1052         int kw = 0;
    1053         u8 kw_type;
    1054 
    1055         /* Disable before mcam entry update */
    1056         npc_cn20k_enable_mcam_entry(rvu, blkaddr, index, false);
    1057 
    1058         npc_mcam_idx_2_key_type(rvu, index, &kw_type);

No error checking?

    1059         /* CAM1 takes the comparison value and
    1060          * CAM0 specifies match for a bit in key being '0' or '1' or 'dontcare'.
    1061          * CAM1<n> = 0 & CAM0<n> = 1 => match if key<n> = 0
    1062          * CAM1<n> = 1 & CAM0<n> = 0 => match if key<n> = 1
    1063          * CAM1<n> = 0 & CAM0<n> = 0 => always match i.e dontcare.
    1064          */
--> 1065         if (kw_type == NPC_MCAM_KEY_X2) {
                     ^^^^^^^
Uninitialized

    1066                 /* Clear mcam entry to avoid writes being suppressed by NPC */
    1067                 npc_cn20k_clear_mcam_entry(rvu, blkaddr, bank, mcam_idx);
    1068                 npc_cn20k_config_kw_x2(rvu, mcam, blkaddr,

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

^ permalink raw reply

* [PATCH net-next v2 1/2] pppox: remove sk_pppox() helper
From: Qingfang Deng @ 2026-04-10  5:49 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Qingfang Deng, Kees Cook, Guillaume Nault,
	Eric Woudstra, Dawid Osuchowski, netdev, linux-kernel
  Cc: linux-ppp

The sk member can be directly accessed from struct pppox_sock without
relying on type casting. Remove the sk_pppox() helper and update all
call sites to use po->sk directly.

Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
Changes in v2: none
 Link to v1: https://lore.kernel.org/r/20260408015138.280687-1-qingfang.deng@linux.dev

 drivers/net/ppp/pppoe.c  | 10 +++++-----
 drivers/net/ppp/pptp.c   |  6 +++---
 include/linux/if_pppox.h |  5 -----
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index 1ac61c273b28..d546a7af0d54 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -231,7 +231,7 @@ static inline struct pppox_sock *get_item(struct pppoe_net *pn, __be16 sid,
 	struct pppox_sock *po;
 
 	po = __get_item(pn, sid, addr, ifindex);
-	if (po && !refcount_inc_not_zero(&sk_pppox(po)->sk_refcnt))
+	if (po && !refcount_inc_not_zero(&po->sk.sk_refcnt))
 		po = NULL;
 
 	return po;
@@ -273,7 +273,7 @@ static void pppoe_flush_dev(struct net_device *dev)
 			if (!po)
 				break;
 
-			sk = sk_pppox(po);
+			sk = &po->sk;
 
 			/* We always grab the socket lock, followed by the
 			 * hash_lock, in that order.  Since we should hold the
@@ -413,7 +413,7 @@ static int pppoe_rcv(struct sk_buff *skb, struct net_device *dev,
 	if (!po)
 		goto drop;
 
-	return __sk_receive_skb(sk_pppox(po), skb, 0, 1, false);
+	return __sk_receive_skb(&po->sk, skb, 0, 1, false);
 
 drop:
 	kfree_skb(skb);
@@ -425,7 +425,7 @@ static void pppoe_unbind_sock_work(struct work_struct *work)
 {
 	struct pppox_sock *po = container_of(work, struct pppox_sock,
 					     proto.pppoe.padt_work);
-	struct sock *sk = sk_pppox(po);
+	struct sock *sk = &po->sk;
 
 	lock_sock(sk);
 	if (po->pppoe_dev) {
@@ -469,7 +469,7 @@ static int pppoe_disc_rcv(struct sk_buff *skb, struct net_device *dev,
 	po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
 	if (po)
 		if (!schedule_work(&po->proto.pppoe.padt_work))
-			sock_put(sk_pppox(po));
+			sock_put(&po->sk);
 
 abort:
 	kfree_skb(skb);
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index b18acd810561..cc8c102122d8 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -62,7 +62,7 @@ static struct pppox_sock *lookup_chan(u16 call_id, __be32 s_addr)
 		if (opt->dst_addr.sin_addr.s_addr != s_addr)
 			sock = NULL;
 		else
-			sock_hold(sk_pppox(sock));
+			sock_hold(&sock->sk);
 	}
 	rcu_read_unlock();
 
@@ -164,7 +164,7 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
 	struct iphdr  *iph;
 	int    max_headroom;
 
-	if (sk_pppox(po)->sk_state & PPPOX_DEAD)
+	if (po->sk.sk_state & PPPOX_DEAD)
 		goto tx_drop;
 
 	rt = pptp_route_output(po, &fl4);
@@ -375,7 +375,7 @@ static int pptp_rcv(struct sk_buff *skb)
 	if (po) {
 		skb_dst_drop(skb);
 		nf_reset_ct(skb);
-		return sk_receive_skb(sk_pppox(po), skb, 0);
+		return sk_receive_skb(&po->sk, skb, 0);
 	}
 drop:
 	kfree_skb(skb);
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 8bbf676c2a85..636772693f9a 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -57,11 +57,6 @@ static inline struct pppox_sock *pppox_sk(struct sock *sk)
 	return (struct pppox_sock *)sk;
 }
 
-static inline struct sock *sk_pppox(struct pppox_sock *po)
-{
-	return (struct sock *)po;
-}
-
 struct module;
 
 struct pppox_proto {
-- 
2.43.0


^ permalink raw reply related

* [PATCH net-next v2 2/2] pppox: convert pppox_sk() to use container_of()
From: Qingfang Deng @ 2026-04-10  5:49 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel
  Cc: linux-ppp, Qingfang Deng
In-Reply-To: <20260410054954.114031-1-qingfang.deng@linux.dev>

Use container_of() macro instead of direct pointer casting to get the
pppox_sock from a sock pointer.

Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
Changes in v2:
 Do not remove the comment, as the struct is allocated from sk_alloc and
 still require sock to be the first member.

 Link to v1: https://lore.kernel.org/r/20260408015138.280687-2-qingfang.deng@linux.dev

 include/linux/if_pppox.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 636772693f9a..594d6dc3f4c9 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -54,7 +54,7 @@ struct pppox_sock {
 
 static inline struct pppox_sock *pppox_sk(struct sock *sk)
 {
-	return (struct pppox_sock *)sk;
+	return container_of(sk, struct pppox_sock, sk);
 }
 
 struct module;
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH v2 1/4] rust: netlink: add raw netlink abstraction
From: Alice Ryhl @ 2026-04-10  5:42 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
	Donald Hunter, Jakub Kicinski, David S. Miller, Eric Dumazet,
	Paolo Abeni, Simon Horman, Greg Kroah-Hartman,
	Arve Hjønnevåg, Todd Kjos, Christian Brauner,
	Carlos Llamas, linux-kernel, rust-for-linux, netdev
In-Reply-To: <a12cc023-629e-457d-af02-4c481024dda0@lunn.ch>

On Thu, Apr 9, 2026 at 11:50 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > +__rust_helper void rust_helper_genlmsg_cancel(struct sk_buff *skb, void *hdr)
> > +{
> > +     return genlmsg_cancel(skb, hdr);
> > +}
> > +
> > +__rust_helper void rust_helper_genlmsg_end(struct sk_buff *skb, void *hdr)
> > +{
> > +     return genlmsg_end(skb, hdr);
> > +}
> > +
> > +__rust_helper void rust_helper_nlmsg_free(struct sk_buff *skb)
> > +{
> > +     return nlmsg_free(skb);
> > +}
>
> It is a bit odd for a void function to call return like this,
> especially when the functions they are calling are also void
> functions.

Oh you're right. I think that's what we call a copy-paste mistake.
I'll fix it up in the next version.

Alice

^ permalink raw reply

* Re: [PATCH v2 1/2] drm/drm_ras: Add clear-error-counter netlink command to drm_ras
From: Tauro, Riana @ 2026-04-10  5:25 UTC (permalink / raw)
  To: Zack McKevitt, intel-xe, dri-devel, netdev, rodrigo.vivi,
	joonas.lahtinen, aravind.iddamsetty
  Cc: anshuman.gupta, simona.vetter, airlied, pratik.bari,
	joshua.santosh.ranjan, ashwin.kumar.kulkarni, shubham.kumar,
	ravi.kishore.koppuravuri, raag.jadav, anvesh.bakwad,
	maarten.lankhorst, Jakub Kicinski, Lijo Lazar, Hawking Zhang,
	David S. Miller, Paolo Abeni, Eric Dumazet
In-Reply-To: <413e8508-5f29-4a5a-a583-8360f9e48712@oss.qualcomm.com>


On 4/10/2026 4:31 AM, Zack McKevitt wrote:
>
> On 4/9/2026 1:21 AM, Tauro, Riana wrote:
>> Hi Zack
>>
>> Could you please take a look at this patch if applicable to your 
>> usecase. Please let me know if any
>> changes are required
>>
>
> From a quick glance, I think this looks good from our end. 


Thank you Zack for taking a look.

>
> Thanks,
> Zack
>
>> @Rodrigo This is already reviewed by Jakub and Raag.
>> If there are no opens, can this be merged via drm_misc
>>
>> Thanks
>> Riana
>>
>> On 4/9/2026 1:03 PM, Riana Tauro wrote:
>>> Introduce a new 'clear-error-counter' drm_ras command to reset the 
>>> counter
>>> value for a specific error counter of a given node.
>>>
>>> The command is a 'do' netlink request with 'node-id' and 'error-id'
>>> as parameters with no response payload.
>>>
>>> Usage:
>>>
>>> $ sudo ynl --family drm_ras  --do clear-error-counter --json \
>>> '{"node-id":1, "error-id":1}'
>>> None
>>>
>>> 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>
>>> Reviewed-by: Jakub Kicinski <kuba@kernel.org>
>>> Reviewed-by: Raag Jadav <raag.jadav@intel.com>
>>> ---
>>>   Documentation/gpu/drm-ras.rst            |  8 +++++
>>>   Documentation/netlink/specs/drm_ras.yaml | 13 ++++++-
>>>   drivers/gpu/drm/drm_ras.c                | 43 
>>> +++++++++++++++++++++++-
>>>   drivers/gpu/drm/drm_ras_nl.c             | 13 +++++++
>>>   drivers/gpu/drm/drm_ras_nl.h             |  2 ++
>>>   include/drm/drm_ras.h                    | 11 ++++++
>>>   include/uapi/drm/drm_ras.h               |  1 +
>>>   7 files changed, 89 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/gpu/drm-ras.rst b/Documentation/gpu/drm- 
>>> ras.rst
>>> index 70b246a78fc8..4636e68f5678 100644
>>> --- a/Documentation/gpu/drm-ras.rst
>>> +++ b/Documentation/gpu/drm-ras.rst
>>> @@ -52,6 +52,8 @@ User space tools can:
>>>     as a parameter.
>>>   * Query specific error counter values with the 
>>> ``get-error-counter`` command, using both
>>>     ``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.
>>>   YAML-based Interface
>>>   --------------------
>>> @@ -101,3 +103,9 @@ Example: Query an error counter for a given node
>>>       sudo ynl --family drm_ras --do get-error-counter --json 
>>> '{"node- id":0, "error-id":1}'
>>>       {'error-id': 1, 'error-name': 'error_name1', 'error-value': 0}
>>> +Example: Clear an error counter for a given node
>>> +
>>> +.. code-block:: bash
>>> +
>>> +    sudo ynl --family drm_ras --do clear-error-counter --json 
>>> '{"node-id":0, "error-id":1}'
>>> +    None
>>> diff --git a/Documentation/netlink/specs/drm_ras.yaml 
>>> b/Documentation/ netlink/specs/drm_ras.yaml
>>> index 79af25dac3c5..e113056f8c01 100644
>>> --- a/Documentation/netlink/specs/drm_ras.yaml
>>> +++ b/Documentation/netlink/specs/drm_ras.yaml
>>> @@ -99,7 +99,7 @@ operations:
>>>         flags: [admin-perm]
>>>         do:
>>>           request:
>>> -          attributes:
>>> +          attributes: &id-attrs
>>>               - node-id
>>>               - error-id
>>>           reply:
>>> @@ -113,3 +113,14 @@ operations:
>>>               - node-id
>>>           reply:
>>>             attributes: *errorinfo
>>> +    -
>>> +      name: clear-error-counter
>>> +      doc: >-
>>> +           Clear error counter for a given node.
>>> +           The request includes the error-id and node-id of the
>>> +           counter to be cleared.
>>> +      attribute-set: error-counter-attrs
>>> +      flags: [admin-perm]
>>> +      do:
>>> +        request:
>>> +          attributes: *id-attrs
>>> diff --git a/drivers/gpu/drm/drm_ras.c b/drivers/gpu/drm/drm_ras.c
>>> index b2fa5ab86d87..d6eab29a1394 100644
>>> --- a/drivers/gpu/drm/drm_ras.c
>>> +++ b/drivers/gpu/drm/drm_ras.c
>>> @@ -26,7 +26,7 @@
>>>    * efficient lookup by ID. Nodes can be registered or unregistered
>>>    * dynamically at runtime.
>>>    *
>>> - * A Generic Netlink family `drm_ras` exposes two main operations to
>>> + * A Generic Netlink family `drm_ras` exposes the below operations to
>>>    * userspace:
>>>    *
>>>    * 1. LIST_NODES: Dump all currently registered RAS nodes.
>>> @@ -37,6 +37,10 @@
>>>    *    Returns all counters of a node if only Node ID is provided 
>>> or specific
>>>    *    error counters.
>>>    *
>>> + * 3. CLEAR_ERROR_COUNTER: Clear error counter of a given node.
>>> + *    Userspace must provide Node ID, Error ID.
>>> + *    Clears specific error counter of a node if supported.
>>> + *
>>>    * Node registration:
>>>    *
>>>    * - drm_ras_node_register(): Registers a new node and assigns
>>> @@ -66,6 +70,8 @@
>>>    *   operation, fetching all counters from a specific node.
>>>    * - drm_ras_nl_get_error_counter_doit(): Implements the 
>>> GET_ERROR_COUNTER doit
>>>    *   operation, fetching a counter value from a specific node.
>>> + * - drm_ras_nl_clear_error_counter_doit(): Implements the 
>>> CLEAR_ERROR_COUNTER doit
>>> + *   operation, clearing a counter value from a specific node.
>>>    */
>>>   static DEFINE_XARRAY_ALLOC(drm_ras_xa);
>>> @@ -314,6 +320,41 @@ int drm_ras_nl_get_error_counter_doit(struct 
>>> sk_buff *skb,
>>>       return doit_reply_value(info, node_id, error_id);
>>>   }
>>> +/**
>>> + * drm_ras_nl_clear_error_counter_doit() - Clear an error counter 
>>> of a node
>>> + * @skb: Netlink message buffer
>>> + * @info: Generic Netlink info containing attributes of the request
>>> + *
>>> + * Extracts the node ID and error ID from the netlink attributes and
>>> + * clears the current value.
>>> + *
>>> + * Return: 0 on success, or negative errno on failure.
>>> + */
>>> +int drm_ras_nl_clear_error_counter_doit(struct sk_buff *skb,
>>> +                    struct genl_info *info)
>>> +{
>>> +    struct drm_ras_node *node;
>>> +    u32 node_id, error_id;
>>> +
>>> +    if (!info->attrs ||
>>> +        GENL_REQ_ATTR_CHECK(info, 
>>> DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID) ||
>>> +        GENL_REQ_ATTR_CHECK(info, 
>>> DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID))
>>> +        return -EINVAL;
>>> +
>>> +    node_id = nla_get_u32(info- 
>>> >attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID]);
>>> +    error_id = nla_get_u32(info- 
>>> >attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID]);
>>> +
>>> +    node = xa_load(&drm_ras_xa, node_id);
>>> +    if (!node || !node->clear_error_counter)
>>> +        return -ENOENT;
>>> +
>>> +    if (error_id < node->error_counter_range.first ||
>>> +        error_id > node->error_counter_range.last)
>>> +        return -EINVAL;
>>> +
>>> +    return node->clear_error_counter(node, error_id);
>>> +}
>>> +
>>>   /**
>>>    * drm_ras_node_register() - Register a new RAS node
>>>    * @node: Node structure to register
>>> diff --git a/drivers/gpu/drm/drm_ras_nl.c 
>>> b/drivers/gpu/drm/drm_ras_nl.c
>>> index 16803d0c4a44..dea1c1b2494e 100644
>>> --- a/drivers/gpu/drm/drm_ras_nl.c
>>> +++ b/drivers/gpu/drm/drm_ras_nl.c
>>> @@ -22,6 +22,12 @@ static const struct nla_policy 
>>> drm_ras_get_error_counter_dump_nl_policy[DRM_RAS_
>>>       [DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID] = { .type = NLA_U32, },
>>>   };
>>> +/* DRM_RAS_CMD_CLEAR_ERROR_COUNTER - do */
>>> +static const struct nla_policy 
>>> drm_ras_clear_error_counter_nl_policy[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID 
>>> + 1] = {
>>> +    [DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID] = { .type = NLA_U32, },
>>> +    [DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID] = { .type = NLA_U32, },
>>> +};
>>> +
>>>   /* Ops table for drm_ras */
>>>   static const struct genl_split_ops drm_ras_nl_ops[] = {
>>>       {
>>> @@ -43,6 +49,13 @@ static const struct genl_split_ops 
>>> drm_ras_nl_ops[] = {
>>>           .maxattr    = DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID,
>>>           .flags        = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>>>       },
>>> +    {
>>> +        .cmd        = DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
>>> +        .doit        = drm_ras_nl_clear_error_counter_doit,
>>> +        .policy        = drm_ras_clear_error_counter_nl_policy,
>>> +        .maxattr    = DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID,
>>> +        .flags        = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>>> +    },
>>>   };
>>>   struct genl_family drm_ras_nl_family __ro_after_init = {
>>> diff --git a/drivers/gpu/drm/drm_ras_nl.h 
>>> b/drivers/gpu/drm/drm_ras_nl.h
>>> index 06ccd9342773..a398643572a5 100644
>>> --- a/drivers/gpu/drm/drm_ras_nl.h
>>> +++ b/drivers/gpu/drm/drm_ras_nl.h
>>> @@ -18,6 +18,8 @@ int drm_ras_nl_get_error_counter_doit(struct 
>>> sk_buff *skb,
>>>                         struct genl_info *info);
>>>   int drm_ras_nl_get_error_counter_dumpit(struct sk_buff *skb,
>>>                       struct netlink_callback *cb);
>>> +int drm_ras_nl_clear_error_counter_doit(struct sk_buff *skb,
>>> +                    struct genl_info *info);
>>>   extern struct genl_family drm_ras_nl_family;
>>> diff --git a/include/drm/drm_ras.h b/include/drm/drm_ras.h
>>> index 5d50209e51db..f2a787bc4f64 100644
>>> --- a/include/drm/drm_ras.h
>>> +++ b/include/drm/drm_ras.h
>>> @@ -58,6 +58,17 @@ struct drm_ras_node {
>>>       int (*query_error_counter)(struct drm_ras_node *node, u32 
>>> error_id,
>>>                      const char **name, u32 *val);
>>> +    /**
>>> +     * @clear_error_counter:
>>> +     *
>>> +     * This callback is used by drm_ras to clear a specific error 
>>> counter.
>>> +     * Driver should implement this callback to support clearing 
>>> error counters
>>> +     * of a node.
>>> +     *
>>> +     * Returns: 0 on success, negative error code on failure.
>>> +     */
>>> +    int (*clear_error_counter)(struct drm_ras_node *node, u32 
>>> error_id);
>>> +
>>>       /** @priv: Driver private data */
>>>       void *priv;
>>>   };
>>> diff --git a/include/uapi/drm/drm_ras.h b/include/uapi/drm/drm_ras.h
>>> index 5f40fa5b869d..218a3ee86805 100644
>>> --- a/include/uapi/drm/drm_ras.h
>>> +++ b/include/uapi/drm/drm_ras.h
>>> @@ -41,6 +41,7 @@ enum {
>>>   enum {
>>>       DRM_RAS_CMD_LIST_NODES = 1,
>>>       DRM_RAS_CMD_GET_ERROR_COUNTER,
>>> +    DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
>>>       __DRM_RAS_CMD_MAX,
>>>       DRM_RAS_CMD_MAX = (__DRM_RAS_CMD_MAX - 1)
>

^ permalink raw reply

* Re: [PATCH net] netrom: do some basic forms of validation on incoming frames
From: Greg Kroah-Hartman @ 2026-04-10  5:24 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Simon Horman, netdev, linux-kernel, David S. Miller, Eric Dumazet,
	Paolo Abeni, linux-hams, Yizhe Zhuang, stable
In-Reply-To: <20260409203235.6b9329f0@kernel.org>

On Thu, Apr 09, 2026 at 08:32:35PM -0700, Jakub Kicinski wrote:
> On Thu, 9 Apr 2026 20:03:28 +0100 Simon Horman wrote:
> > I expect that checking skb->len isn't sufficient here
> > and pskb_may_pull needs to be used to ensure that
> > the data is also available in the linear section of the skb.
> 
> Or for simplicity we could also be testing against skb_headlen()
> since we don't expect any legit non-linear frames here? Dunno.

I'll be glad to change this either way, your call.  Given that this is
an obsolete protocol that seems to only be a target for drive-by fuzzers
to attack, whatever the simplest thing to do to quiet them up I'll be
glad to implement.

Or can we just delete this stuff entirely?  :)

thanks,

greg k-h

^ permalink raw reply

* Re: [PATCH v2 1/2] drm/drm_ras: Add clear-error-counter netlink command to drm_ras
From: Tauro, Riana @ 2026-04-10  5:21 UTC (permalink / raw)
  To: Rodrigo Vivi, maarten.lankhorst
  Cc: intel-xe, dri-devel, netdev, Zack McKevitt, joonas.lahtinen,
	aravind.iddamsetty, anshuman.gupta, simona.vetter, airlied,
	pratik.bari, joshua.santosh.ranjan, ashwin.kumar.kulkarni,
	shubham.kumar, ravi.kishore.koppuravuri, raag.jadav,
	anvesh.bakwad, Jakub Kicinski, Lijo Lazar, Hawking Zhang,
	David S. Miller, Paolo Abeni, Eric Dumazet
In-Reply-To: <aderpXuhLoiUoxcT@intel.com>

Hi Rodrigo

On 4/9/2026 7:07 PM, Rodrigo Vivi wrote:
> On Thu, Apr 09, 2026 at 12:51:44PM +0530, Tauro, Riana wrote:
>> Hi Zack
>>
>> Could you please take a look at this patch if applicable to your usecase.
>> Please let me know if any
>> changes are required
>>
>> @Rodrigo This is already reviewed by Jakub and Raag.
>> If there are no opens, can this be merged via drm_misc
> if we push this to drm-misc-next, it might take a few weeks to propagate
> back to drm-xe-next. With other work from you and Raag going fast pace
> on drm-xe-next around this area, I'm afraid it could cause some conflicts.
>
> It is definitely fine by me, but another option is to get ack from
> drm-misc maintainers to get this through drm-xe-next.
>

Yeah this would be better with the other RAS patches close to merge.

@Maarten Can you please help with an ack if this patch looks good to you?
This has been reviewed by Jakub from netdev and Raag from intel-xe
There are no other opens.

Thanks
Riana

>
> so, really okay with drm-misc-next?
>
>> Thanks
>> Riana
>>
>> On 4/9/2026 1:03 PM, Riana Tauro wrote:
>>> Introduce a new 'clear-error-counter' drm_ras command to reset the counter
>>> value for a specific error counter of a given node.
>>>
>>> The command is a 'do' netlink request with 'node-id' and 'error-id'
>>> as parameters with no response payload.
>>>
>>> Usage:
>>>
>>> $ sudo ynl --family drm_ras  --do clear-error-counter --json \
>>> '{"node-id":1, "error-id":1}'
>>> None
>>>
>>> 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>
>>> Reviewed-by: Jakub Kicinski <kuba@kernel.org>
>>> Reviewed-by: Raag Jadav <raag.jadav@intel.com>
>>> ---
>>>    Documentation/gpu/drm-ras.rst            |  8 +++++
>>>    Documentation/netlink/specs/drm_ras.yaml | 13 ++++++-
>>>    drivers/gpu/drm/drm_ras.c                | 43 +++++++++++++++++++++++-
>>>    drivers/gpu/drm/drm_ras_nl.c             | 13 +++++++
>>>    drivers/gpu/drm/drm_ras_nl.h             |  2 ++
>>>    include/drm/drm_ras.h                    | 11 ++++++
>>>    include/uapi/drm/drm_ras.h               |  1 +
>>>    7 files changed, 89 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/gpu/drm-ras.rst b/Documentation/gpu/drm-ras.rst
>>> index 70b246a78fc8..4636e68f5678 100644
>>> --- a/Documentation/gpu/drm-ras.rst
>>> +++ b/Documentation/gpu/drm-ras.rst
>>> @@ -52,6 +52,8 @@ User space tools can:
>>>      as a parameter.
>>>    * Query specific error counter values with the ``get-error-counter`` command, using both
>>>      ``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.
>>>    YAML-based Interface
>>>    --------------------
>>> @@ -101,3 +103,9 @@ Example: Query an error counter for a given node
>>>        sudo ynl --family drm_ras --do get-error-counter --json '{"node-id":0, "error-id":1}'
>>>        {'error-id': 1, 'error-name': 'error_name1', 'error-value': 0}
>>> +Example: Clear an error counter for a given node
>>> +
>>> +.. code-block:: bash
>>> +
>>> +    sudo ynl --family drm_ras --do clear-error-counter --json '{"node-id":0, "error-id":1}'
>>> +    None
>>> diff --git a/Documentation/netlink/specs/drm_ras.yaml b/Documentation/netlink/specs/drm_ras.yaml
>>> index 79af25dac3c5..e113056f8c01 100644
>>> --- a/Documentation/netlink/specs/drm_ras.yaml
>>> +++ b/Documentation/netlink/specs/drm_ras.yaml
>>> @@ -99,7 +99,7 @@ operations:
>>>          flags: [admin-perm]
>>>          do:
>>>            request:
>>> -          attributes:
>>> +          attributes: &id-attrs
>>>                - node-id
>>>                - error-id
>>>            reply:
>>> @@ -113,3 +113,14 @@ operations:
>>>                - node-id
>>>            reply:
>>>              attributes: *errorinfo
>>> +    -
>>> +      name: clear-error-counter
>>> +      doc: >-
>>> +           Clear error counter for a given node.
>>> +           The request includes the error-id and node-id of the
>>> +           counter to be cleared.
>>> +      attribute-set: error-counter-attrs
>>> +      flags: [admin-perm]
>>> +      do:
>>> +        request:
>>> +          attributes: *id-attrs
>>> diff --git a/drivers/gpu/drm/drm_ras.c b/drivers/gpu/drm/drm_ras.c
>>> index b2fa5ab86d87..d6eab29a1394 100644
>>> --- a/drivers/gpu/drm/drm_ras.c
>>> +++ b/drivers/gpu/drm/drm_ras.c
>>> @@ -26,7 +26,7 @@
>>>     * efficient lookup by ID. Nodes can be registered or unregistered
>>>     * dynamically at runtime.
>>>     *
>>> - * A Generic Netlink family `drm_ras` exposes two main operations to
>>> + * A Generic Netlink family `drm_ras` exposes the below operations to
>>>     * userspace:
>>>     *
>>>     * 1. LIST_NODES: Dump all currently registered RAS nodes.
>>> @@ -37,6 +37,10 @@
>>>     *    Returns all counters of a node if only Node ID is provided or specific
>>>     *    error counters.
>>>     *
>>> + * 3. CLEAR_ERROR_COUNTER: Clear error counter of a given node.
>>> + *    Userspace must provide Node ID, Error ID.
>>> + *    Clears specific error counter of a node if supported.
>>> + *
>>>     * Node registration:
>>>     *
>>>     * - drm_ras_node_register(): Registers a new node and assigns
>>> @@ -66,6 +70,8 @@
>>>     *   operation, fetching all counters from a specific node.
>>>     * - drm_ras_nl_get_error_counter_doit(): Implements the GET_ERROR_COUNTER doit
>>>     *   operation, fetching a counter value from a specific node.
>>> + * - drm_ras_nl_clear_error_counter_doit(): Implements the CLEAR_ERROR_COUNTER doit
>>> + *   operation, clearing a counter value from a specific node.
>>>     */
>>>    static DEFINE_XARRAY_ALLOC(drm_ras_xa);
>>> @@ -314,6 +320,41 @@ int drm_ras_nl_get_error_counter_doit(struct sk_buff *skb,
>>>    	return doit_reply_value(info, node_id, error_id);
>>>    }
>>> +/**
>>> + * drm_ras_nl_clear_error_counter_doit() - Clear an error counter of a node
>>> + * @skb: Netlink message buffer
>>> + * @info: Generic Netlink info containing attributes of the request
>>> + *
>>> + * Extracts the node ID and error ID from the netlink attributes and
>>> + * clears the current value.
>>> + *
>>> + * Return: 0 on success, or negative errno on failure.
>>> + */
>>> +int drm_ras_nl_clear_error_counter_doit(struct sk_buff *skb,
>>> +					struct genl_info *info)
>>> +{
>>> +	struct drm_ras_node *node;
>>> +	u32 node_id, error_id;
>>> +
>>> +	if (!info->attrs ||
>>> +	    GENL_REQ_ATTR_CHECK(info, DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID) ||
>>> +	    GENL_REQ_ATTR_CHECK(info, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID))
>>> +		return -EINVAL;
>>> +
>>> +	node_id = nla_get_u32(info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID]);
>>> +	error_id = nla_get_u32(info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID]);
>>> +
>>> +	node = xa_load(&drm_ras_xa, node_id);
>>> +	if (!node || !node->clear_error_counter)
>>> +		return -ENOENT;
>>> +
>>> +	if (error_id < node->error_counter_range.first ||
>>> +	    error_id > node->error_counter_range.last)
>>> +		return -EINVAL;
>>> +
>>> +	return node->clear_error_counter(node, error_id);
>>> +}
>>> +
>>>    /**
>>>     * drm_ras_node_register() - Register a new RAS node
>>>     * @node: Node structure to register
>>> diff --git a/drivers/gpu/drm/drm_ras_nl.c b/drivers/gpu/drm/drm_ras_nl.c
>>> index 16803d0c4a44..dea1c1b2494e 100644
>>> --- a/drivers/gpu/drm/drm_ras_nl.c
>>> +++ b/drivers/gpu/drm/drm_ras_nl.c
>>> @@ -22,6 +22,12 @@ static const struct nla_policy drm_ras_get_error_counter_dump_nl_policy[DRM_RAS_
>>>    	[DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID] = { .type = NLA_U32, },
>>>    };
>>> +/* DRM_RAS_CMD_CLEAR_ERROR_COUNTER - do */
>>> +static const struct nla_policy drm_ras_clear_error_counter_nl_policy[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID + 1] = {
>>> +	[DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID] = { .type = NLA_U32, },
>>> +	[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID] = { .type = NLA_U32, },
>>> +};
>>> +
>>>    /* Ops table for drm_ras */
>>>    static const struct genl_split_ops drm_ras_nl_ops[] = {
>>>    	{
>>> @@ -43,6 +49,13 @@ static const struct genl_split_ops drm_ras_nl_ops[] = {
>>>    		.maxattr	= DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID,
>>>    		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
>>>    	},
>>> +	{
>>> +		.cmd		= DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
>>> +		.doit		= drm_ras_nl_clear_error_counter_doit,
>>> +		.policy		= drm_ras_clear_error_counter_nl_policy,
>>> +		.maxattr	= DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID,
>>> +		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>>> +	},
>>>    };
>>>    struct genl_family drm_ras_nl_family __ro_after_init = {
>>> diff --git a/drivers/gpu/drm/drm_ras_nl.h b/drivers/gpu/drm/drm_ras_nl.h
>>> index 06ccd9342773..a398643572a5 100644
>>> --- a/drivers/gpu/drm/drm_ras_nl.h
>>> +++ b/drivers/gpu/drm/drm_ras_nl.h
>>> @@ -18,6 +18,8 @@ int drm_ras_nl_get_error_counter_doit(struct sk_buff *skb,
>>>    				      struct genl_info *info);
>>>    int drm_ras_nl_get_error_counter_dumpit(struct sk_buff *skb,
>>>    					struct netlink_callback *cb);
>>> +int drm_ras_nl_clear_error_counter_doit(struct sk_buff *skb,
>>> +					struct genl_info *info);
>>>    extern struct genl_family drm_ras_nl_family;
>>> diff --git a/include/drm/drm_ras.h b/include/drm/drm_ras.h
>>> index 5d50209e51db..f2a787bc4f64 100644
>>> --- a/include/drm/drm_ras.h
>>> +++ b/include/drm/drm_ras.h
>>> @@ -58,6 +58,17 @@ struct drm_ras_node {
>>>    	int (*query_error_counter)(struct drm_ras_node *node, u32 error_id,
>>>    				   const char **name, u32 *val);
>>> +	/**
>>> +	 * @clear_error_counter:
>>> +	 *
>>> +	 * This callback is used by drm_ras to clear a specific error counter.
>>> +	 * Driver should implement this callback to support clearing error counters
>>> +	 * of a node.
>>> +	 *
>>> +	 * Returns: 0 on success, negative error code on failure.
>>> +	 */
>>> +	int (*clear_error_counter)(struct drm_ras_node *node, u32 error_id);
>>> +
>>>    	/** @priv: Driver private data */
>>>    	void *priv;
>>>    };
>>> diff --git a/include/uapi/drm/drm_ras.h b/include/uapi/drm/drm_ras.h
>>> index 5f40fa5b869d..218a3ee86805 100644
>>> --- a/include/uapi/drm/drm_ras.h
>>> +++ b/include/uapi/drm/drm_ras.h
>>> @@ -41,6 +41,7 @@ enum {
>>>    enum {
>>>    	DRM_RAS_CMD_LIST_NODES = 1,
>>>    	DRM_RAS_CMD_GET_ERROR_COUNTER,
>>> +	DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
>>>    	__DRM_RAS_CMD_MAX,
>>>    	DRM_RAS_CMD_MAX = (__DRM_RAS_CMD_MAX - 1)

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox