Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net v3] gtp: parse extension headers before reading inner protocol
From: Paolo Abeni @ 2026-07-21  9:22 UTC (permalink / raw)
  To: Zhixing Chen, Pablo Neira Ayuso, Harald Welte
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	osmocom-net-gprs, netdev
In-Reply-To: <CAMyuFdVWgvx4yafBQfbTt4Do535p3PF0LCpZ6Gma0WZ-De2kyA@mail.gmail.com>

On 7/20/26 9:28 AM, Zhixing Chen wrote:
> Gentle ping on this v3, in case it fell through the cracks.

Please, don't.

Maintainers are overflown by LLM generated contents, and conferences &&
season interruption reduce the available time. While the patch is alive
in PW and no comments from reviewer and/or sashiko are pending, no
additional action is needed.

The patch LGTM, I'm applying it now.

/P


^ permalink raw reply

* [PATCH iwl-net v1] igbvf: fix DMA mapping leak on Tx error
From: xuanqiang.luo @ 2026-07-21  9:23 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev, davem,
	edumazet, kuba, pabeni, roel.kluin, tactii, netdev, Xuanqiang Luo,
	stable

From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>

When mapping a fragmented skb fails, count already matches the number of
successful mappings that must be undone. Decrementing it before the cleanup
loop leaves one mapping active. Reusing the descriptor then overwrites its
DMA address and loses the mapping.

Remove the extra decrement so the error path unmaps every successful
mapping.

Fixes: c1fa347f20f1 ("e1000/e1000e/igb/igbvf/ixgb/ixgbe: Fix tests of unsigned in *_tx_map()")
Cc: stable@vger.kernel.org
Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
---
 drivers/net/ethernet/intel/igbvf/netdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index c5ae15fcdca75..3d2aba5c3f126 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2190,8 +2190,6 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter,
 	buffer_info->time_stamp = 0;
 	buffer_info->length = 0;
 	buffer_info->mapped_as_page = false;
-	if (count)
-		count--;
 
 	/* clear timestamp and dma mappings for remaining portion of packet */
 	while (count--) {
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH net-next v9 2/3] net: airoha: fix ETS QoS stats counter underflow and cross-channel corruption
From: Lorenzo Bianconi @ 2026-07-21  9:27 UTC (permalink / raw)
  To: Jacob Keller
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Alexander Lobakin, linux-arm-kernel,
	linux-mediatek, netdev
In-Reply-To: <4f875005-e07c-4366-af8d-b7173d2d3b77@intel.com>

[-- Attachment #1: Type: text/plain, Size: 5262 bytes --]

> On 7/20/2026 3:03 PM, Lorenzo Bianconi wrote:
> > airoha_qdma_get_tx_ets_stats() has two bugs:
> > - The hardware counters read via airoha_qdma_rr() are 32-bit values
> >   but are stored in u64 locals and subtracted from u64 baselines. When
> >   a 32-bit hardware counter wraps around, the subtraction produces a
> >   large underflow value passed to _bstats_update().
> 
> This issue would only be a problem during rollover, which depending on
> how fast the counts increment may not be a big problem. I could see this
> not being worth going to net since it could be rare enough that it isn't
> considered a widespread issue...
> 
> > - The baseline counters (cpu_tx_packets, fwd_tx_packets) are stored as
> >   single per-device fields, but airoha_qdma_get_tx_ets_stats() is
> >   called with different channel values (0-3). Each call reads a
> >   different channel's hardware counter but overwrites the same
> >   baseline, corrupting the delta computation for other channels.
> > 
> 
> However, this issue seems like its going to cause a problem every time
> you read because any time you use a mix of channels you will get
> corrupted values?

Hi Jacob,

I agree this is a real bug (and it needs to be fixed). However, the real
use-case is having a single channel per net_device (a single HTB offloaded
qdisc) and multiple hw queues (connected to the ETS offloaded classes).
In this scenario we do not trigger this issue.

> 
> > Fix both by:
> > - Narrowing the counter locals and baselines to u32 so that 32-bit
> >   unsigned subtraction handles wrap-around naturally.
> > - Grouping the baselines into a per-channel qos_stats array so each
> >   channel tracks its own previous counter value independently.
> > - Splitting the delta addition into two statements so the first u32
> >   delta is widened to u64 on assignment and the second is added in
> >   u64 arithmetic, preventing overflow when both deltas are large.
> > 
> > Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support")
> 
> This targets a commit which merged in v6.14, but the patch is part of a
> series aimed at net-next. Could you explain why this shouldn't be
> separated out and put as a fix in net? It seems pretty obvious that
> users can easily reproduce problems by requesting stats from each
> channel? Or is this not really possible to trigger from userspace until
> patch 3/3?

For the reason described above and to avoid any possible conflicts with patch
3/3 I decided to add this patch here (adding the proper Fixes tag for the
backport) but if you prefer I can remove patch 2/3 from this series and send
it to net. What do you prefer?

Regards,
Lorenzo

> 
> > Reviewed-by: Simon Horman <horms@kernel.org>
> > Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  drivers/net/ethernet/airoha/airoha_eth.c | 18 +++++++++++-------
> >  drivers/net/ethernet/airoha/airoha_eth.h |  7 ++++---
> >  2 files changed, 15 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> > index 41c1a0ffbdd8..aaf2a4717d12 100644
> > --- a/drivers/net/ethernet/airoha/airoha_eth.c
> > +++ b/drivers/net/ethernet/airoha/airoha_eth.c
> > @@ -2482,16 +2482,20 @@ static int airoha_qdma_get_tx_ets_stats(struct net_device *netdev, int channel,
> >  {
> >  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> >  	struct airoha_qdma *qdma = dev->qdma;
> > +	u32 cpu_tx_packets, fwd_tx_packets;
> > +	u64 tx_packets;
> >  
> > -	u64 cpu_tx_packets = airoha_qdma_rr(qdma, REG_CNTR_VAL(channel << 1));
> > -	u64 fwd_tx_packets = airoha_qdma_rr(qdma,
> > -					    REG_CNTR_VAL((channel << 1) + 1));
> > -	u64 tx_packets = (cpu_tx_packets - dev->cpu_tx_packets) +
> > -			 (fwd_tx_packets - dev->fwd_tx_packets);
> > +	cpu_tx_packets = airoha_qdma_rr(qdma, REG_CNTR_VAL(channel << 1));
> > +	fwd_tx_packets = airoha_qdma_rr(qdma,
> > +					REG_CNTR_VAL((channel << 1) + 1));
> > +	tx_packets = (u32)(cpu_tx_packets -
> > +			   dev->qos_stats[channel].cpu_tx_packets);
> > +	tx_packets += (u32)(fwd_tx_packets -
> > +			    dev->qos_stats[channel].fwd_tx_packets);
> >  
> >  	_bstats_update(opt->stats.bstats, 0, tx_packets);
> > -	dev->cpu_tx_packets = cpu_tx_packets;
> > -	dev->fwd_tx_packets = fwd_tx_packets;
> > +	dev->qos_stats[channel].cpu_tx_packets = cpu_tx_packets;
> > +	dev->qos_stats[channel].fwd_tx_packets = fwd_tx_packets;
> >  
> >  	return 0;
> >  }
> > diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> > index bf1c249255bd..bf44be9f0954 100644
> > --- a/drivers/net/ethernet/airoha/airoha_eth.h
> > +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> > @@ -553,9 +553,10 @@ struct airoha_gdm_dev {
> >  	struct airoha_eth *eth;
> >  
> >  	DECLARE_BITMAP(qos_sq_bmap, AIROHA_NUM_QOS_CHANNELS);
> > -	/* qos stats counters */
> > -	u64 cpu_tx_packets;
> > -	u64 fwd_tx_packets;
> > +	struct {
> > +		u32 cpu_tx_packets;
> > +		u32 fwd_tx_packets;
> > +	} qos_stats[AIROHA_NUM_QOS_CHANNELS];
> >  
> >  	u32 flags;
> >  	int nbq;
> > 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v9 3/3] net: airoha: defer GDM3/GDM4 WAN mode and GDM2 loopback to QoS offload
From: Lorenzo Bianconi @ 2026-07-21  9:28 UTC (permalink / raw)
  To: Jacob Keller
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Alexander Lobakin, linux-arm-kernel,
	linux-mediatek, netdev, Madhur Agrawal
In-Reply-To: <5e0444bf-b258-4a6b-a1dc-fecc3419ebad@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2561 bytes --]

> On 7/20/2026 3:03 PM, Lorenzo Bianconi wrote:
> > GDM3 and GDM4 ports require GDM2 loopback to be enabled for hardware
> > QoS offload to function. Without it, HTB and ETS offload on these ports
> > do not work.
> > Previously, GDM3/GDM4 ports were automatically configured as WAN with
> > GDM2 loopback enabled during ndo_init(). Add the capability to configure
> > GDM3/GDM4 as WAN/LAN on demand when QoS offload is created or destroyed.
> > Hook airoha_enable_qos_for_gdm34() into TC_HTB_CREATE so that requesting
> > HTB offload on a GDM3/GDM4 LAN port switches it to WAN mode and enables
> > GDM2 loopback, with proper rollback on failure. Introduce the
> > AIROHA_DEV_F_QOS flag to track whether a device has an active HTB
> > qdisc; clear it on TC_HTB_DESTROY. The device keeps its WAN role after
> > qdisc teardown so that its configuration is preserved until another
> > device explicitly needs the WAN role for QoS offload.
> > If another GDM3/GDM4 device already holds the WAN role without an active
> > QoS qdisc, demote it to LAN before promoting the requesting device. Skip
> > the demotion when the requesting device is itself already the WAN device.
> > Since airoha_dev_set_qdma() can now be called on a running device to
> > migrate between QDMA blocks, make dev->qdma an RCU pointer so the TX
> > path can safely dereference it without holding RTNL.
> > Hold flow_offload_mutex in airoha_enable_qos_for_gdm34() and
> > airoha_disable_qos_for_gdm34() around the dev->flags update,
> > airoha_dev_set_qdma() and GDM2 loopback configuration, serializing
> > against concurrent airoha_ppe_hw_init() in the TC_SETUP_CLSFLOWER
> > offload path.
> > Introduce airoha_qdma_deref() helper that wraps rcu_dereference_protected()
> > with a lockdep condition accepting either rtnl_lock or flow_offload_mutex,
> > and use it across all control-path dereferences of the RCU-protected
> > dev->qdma pointer.
> > Add airoha_disable_gdm2_loopback() to disable GDM2 hw loopback.
> > 
> 
> A minor nit which may just be my personal preference/style:
> I had trouble following this commit message since it goes through a lot
> of detail about various problems with dereferencing and other changes
> related to allowing the defered configuration of WAN mode.
> 
> I do appreciate this detail as it helps understand the changes and
> motivations. However.. It might benefit from some additional line breaks
> for spacing to help readability.

Sure, I can rework the commit log if I need to repost.

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH net v3] gtp: parse extension headers before reading inner protocol
From: patchwork-bot+netdevbpf @ 2026-07-21  9:30 UTC (permalink / raw)
  To: Zhixing Chen
  Cc: pablo, laforge, andrew+netdev, davem, edumazet, kuba, pabeni,
	osmocom-net-gprs, netdev
In-Reply-To: <20260708042244.120898-1-running910@gmail.com>

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  8 Jul 2026 12:22:44 +0800 you wrote:
> GTPv1-U packets may carry a chain of extension headers before the inner
> IP packet. The receive path already parses and skips these extension
> headers, but it currently reads the inner protocol before doing so.
> 
> As a result, the first extension header byte is interpreted as the inner
> IP version. Packets with extension headers are then dropped before PDP
> lookup.
> 
> [...]

Here is the summary with links:
  - [net,v3] gtp: parse extension headers before reading inner protocol
    https://git.kernel.org/netdev/net/c/96e37e2f618e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH net-next v2] net: skbuff: optimization of net_zcopy_get() call in pskb_carve helpers
From: Paolo Abeni @ 2026-07-21  9:39 UTC (permalink / raw)
  To: Yun Lu, davem, edumazet, kuba, horms, kerneljasonxing, kuniyu,
	willemdebruijn.kernel
  Cc: mhal, bjorn, jiayuan.chen, netdev
In-Reply-To: <20260708055454.9167-1-luyun_611@163.com>

On 7/8/26 7:54 AM, Yun Lu wrote:
> From: Yun Lu <luyun@kylinos.cn>
> 
> Commit 98d0912e9f84 ("net: skbuff: fix missing zerocopy reference in
> pskb_carve helpers") introduced two calls of net_zcopy_get(skb_zcopy(skb)).
> In fact, skb_zcopy() has already been executed once before. When calling
> net_zcopy_get(), skb_zcopy() always returns skb_uarg(skb), which results
> in adding some unnecessary instructions in skb_zcopy. 

I'm quite surprised the compiler can't generate the same binary with the
old code. blot-o-meter seams to agree with me.

I think that the consistency argument is enough here to justify the
patch, but it would have been better to double the above guess with some
actual measurement.

/P


^ permalink raw reply

* [PATCH net v4] phonet: check register_netdevice_notifier() error in phonet_device_init()
From: Minhong He @ 2026-07-21  9:39 UTC (permalink / raw)
  To: courmisch, davem, edumazet, kuba, pabeni, horms,
	remi.denis-courmont
  Cc: netdev, linux-kernel, Minhong He

phonet_device_init() registers a netdevice notifier before calling
phonet_netlink_register(), but does not check whether notifier
registration succeeded. On failure, netlink setup still proceeds and
init may return success without the notifier in place.

Also, the existing phonet_netlink_register() failure path called
phonet_device_exit(), which runs rtnl_unregister_all() even though
rtnl_register_many() already unwound any partial registration. Calling
the full exit helper on a partial init is not correct.

Check each registration error, including proc_create_net(), and unwind
only the steps that have succeeded so far, in reverse order.

Signed-off-by: Minhong He <heminhong@kylinos.cn>
---
v4:
- Check proc_create_net() failure (-ENOMEM).
- Unwind in reverse registration order with one label per step
  (notifier -> proc -> pernet).
- Match phonet_device_exit() teardown order to the same sequence.
v3: https://lore.kernel.org/netdev/20260720070031.108248-1-heminhong@kylinos.cn/
- Use goto-based unwind; do not call phonet_device_exit() on
  phonet_netlink_register() failure.
- Drop Fixes tag (theoretical init failure path).
v2: https://lore.kernel.org/netdev/20260716101504.158387-1-heminhong@kylinos.cn/
v1: https://lore.kernel.org/netdev/20260713075212.431455-1-heminhong@kylinos.cn/

 net/phonet/pn_dev.c | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index ad44831d6745..1272d49cd038 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -350,16 +350,34 @@ static struct pernet_operations phonet_net_ops = {
 /* Initialize Phonet devices list */
 int __init phonet_device_init(void)
 {
-	int err = register_pernet_subsys(&phonet_net_ops);
+	int err;
+
+	err = register_pernet_subsys(&phonet_net_ops);
 	if (err)
 		return err;
 
-	proc_create_net("pnresource", 0, init_net.proc_net, &pn_res_seq_ops,
-			sizeof(struct seq_net_private));
-	register_netdevice_notifier(&phonet_device_notifier);
+	if (!proc_create_net("pnresource", 0, init_net.proc_net,
+			     &pn_res_seq_ops, sizeof(struct seq_net_private))) {
+		err = -ENOMEM;
+		goto err_pernet;
+	}
+
+	err = register_netdevice_notifier(&phonet_device_notifier);
+	if (err)
+		goto err_proc;
+
 	err = phonet_netlink_register();
 	if (err)
-		phonet_device_exit();
+		goto err_notifier;
+
+	return 0;
+
+err_notifier:
+	unregister_netdevice_notifier(&phonet_device_notifier);
+err_proc:
+	remove_proc_entry("pnresource", init_net.proc_net);
+err_pernet:
+	unregister_pernet_subsys(&phonet_net_ops);
 	return err;
 }
 
@@ -367,8 +385,8 @@ void phonet_device_exit(void)
 {
 	rtnl_unregister_all(PF_PHONET);
 	unregister_netdevice_notifier(&phonet_device_notifier);
-	unregister_pernet_subsys(&phonet_net_ops);
 	remove_proc_entry("pnresource", init_net.proc_net);
+	unregister_pernet_subsys(&phonet_net_ops);
 }
 
 int phonet_route_add(struct net_device *dev, u8 daddr)
-- 
2.25.1


^ permalink raw reply related

* Re: [PATCH net] nfc: nci: free destination parameters when closing a connection
From: Vadim Fedorenko @ 2026-07-21  9:47 UTC (permalink / raw)
  To: Linmao Li, David Heidelberg, Jakub Kicinski
  Cc: David S . Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
	oe-linux-nfc, netdev, linux-kernel
In-Reply-To: <20260721023518.1697625-1-lilinmao@kylinos.cn>

On 21/07/2026 03:35, Linmao Li wrote:
> When a connection is closed, nci_core_conn_close_rsp_packet() frees
> conn_info but not conn_info->dest_params, which is a separate devm
> allocation. Each connect/close cycle leaks one dest_params until the
> NFC device is removed. Free dest_params along with conn_info.
> 
> Fixes: 9b8d1a4cf2aa ("nfc: nci: Add an additional parameter to identify a connection id")
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
> ---
>   net/nfc/nci/rsp.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
> index 6b2fa6bdbd14..21c2fe64490e 100644
> --- a/net/nfc/nci/rsp.c
> +++ b/net/nfc/nci/rsp.c
> @@ -360,6 +360,7 @@ static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev,
>   			list_del(&conn_info->list);
>   			if (conn_info == ndev->rf_conn_info)
>   				ndev->rf_conn_info = NULL;
> +			devm_kfree(&ndev->nfc_dev->dev, conn_info->dest_params);
>   			devm_kfree(&ndev->nfc_dev->dev, conn_info);
>   		}
>   	}

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>

^ permalink raw reply

* Re: [PATCH net-next v2] net: skbuff: optimization of net_zcopy_get() call in pskb_carve helpers
From: patchwork-bot+netdevbpf @ 2026-07-21  9:50 UTC (permalink / raw)
  To: Yun Lu
  Cc: davem, edumazet, kuba, pabeni, horms, kerneljasonxing, kuniyu,
	willemdebruijn.kernel, mhal, bjorn, jiayuan.chen, netdev
In-Reply-To: <20260708055454.9167-1-luyun_611@163.com>

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  8 Jul 2026 13:54:54 +0800 you wrote:
> From: Yun Lu <luyun@kylinos.cn>
> 
> Commit 98d0912e9f84 ("net: skbuff: fix missing zerocopy reference in
> pskb_carve helpers") introduced two calls of net_zcopy_get(skb_zcopy(skb)).
> In fact, skb_zcopy() has already been executed once before. When calling
> net_zcopy_get(), skb_zcopy() always returns skb_uarg(skb), which results
> in adding some unnecessary instructions in skb_zcopy. So, change these
> two calls to directly use skb_uarg(skb) instead of skb_zcopy.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: skbuff: optimization of net_zcopy_get() call in pskb_carve helpers
    https://git.kernel.org/netdev/net-next/c/b9ecdfda4d48

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH net v3] gtp: parse extension headers before reading inner protocol
From: Zhixing Chen @ 2026-07-21  9:50 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: Pablo Neira Ayuso, Harald Welte, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, osmocom-net-gprs, netdev
In-Reply-To: <d6cab50d-dd90-4022-ae15-50df05b85556@redhat.com>

> season interruption reduce the available time. While the patch is alive
> in PW and no comments from reviewer and/or sashiko are pending, no
> additional action is needed.

Thanks Pablo, understood. I just learned this workflow and will keep it in
mind next time.

I appreciate your review and help.

Best regards,
Zhixing

^ permalink raw reply

* RE: [PATCH net-next v6 2/7] net: phy: phylink: add helper to modify pause
From: Javen @ 2026-07-21  9:52 UTC (permalink / raw)
  To: Maxime Chevallier, hkallweit1@gmail.com, nic_swsd@realtek.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	daniel@makrotopia.org, linux@armlinux.org.uk,
	enelsonmoore@gmail.com, daniel@thingy.jp
In-Reply-To: <044a9996-1cd0-49c4-892b-fb267037c568@bootlin.com>

Hi Maxime,

>
>Hi Javen,
>
>On 7/13/26 09:51, Javen wrote:
>> Hi,
>>
>>> There's a change in the MAC's ability to support Pause, so we should :
>>>
>>> - Recompute the pl->supported field. Update the
>>> config.mac_capabilities with the
>>>   new pause settings, calling phylink_validate() should do the trick I think,
>this
>>>   will rebuild the capability list:
>>>
>>>   phylink_validate(pl, pl->supported, &pl->link_config);
>>>
>>> - Then update the pl->link_config.pause,
>>>
>>> - Then update the pause advertising, like done in phylink_setpauseparam
>>>   ( I think, everything that comes after pl->state_mutex gets released in
>>>    phylink_ethtool_set_pauseparam)
>>>
>>> Ideally, the logic to update the advertising and re-trigger a
>>> negociation should be factored out in a private helper, then reused
>>> from both this path (MAC updates pause support) and the
>phylink_ethtool_set_pauseparam path.
>>>
>>> Maxime
>>
>> Thanks for review and helpful suggestions.
>>
>> I agree with your suggestion to factor out the logic into a private helper and
>reuse it for both phylink_ethtool_set_pauseparam() and
>phylink_update_mac_pause_capabilities().
>>
>> Here is the refactored logic. I want to share this specific part with you for a
>quick check before I submit v7 patch.
>
>I'm currently attending the netdev conference, It'll take a few days for me to
>look at this, sorry about that :/
>
>Maxime

Just a gentle ping on this thread. Could you please take a quick look at this refactored logic whenever you are free? Any suggestion would be greatly appreciated.

Thanks,
BRs,
Javen


^ permalink raw reply

* Re: [PATCH net v1] rxrpc: fix io_thread race in rxrpc_wake_up_io_thread()
From: patchwork-bot+netdevbpf @ 2026-07-21 10:00 UTC (permalink / raw)
  To: luoxuanqiang
  Cc: dhowells, marc.dionne, netdev, linux-afs, davem, edumazet, kuba,
	pabeni, horms, linux-kernel, luoxuanqiang
In-Reply-To: <20260708093534.53486-1-xuanqiang.luo@linux.dev>

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  8 Jul 2026 17:35:34 +0800 you wrote:
> From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
> 
> rxrpc_wake_up_io_thread() checks local->io_thread before waking it, but
> then reloads the pointer for wake_up_process().
> 
> local->io_thread is cleared with WRITE_ONCE() when the I/O thread exits, so
> the second load can see NULL even if the first load did not.
> 
> [...]

Here is the summary with links:
  - [net,v1] rxrpc: fix io_thread race in rxrpc_wake_up_io_thread()
    https://git.kernel.org/netdev/net/c/745fb794c3e9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH net-next v3 0/2] ipv4: update rt_flush_dev() and two dst.dev readers
From: patchwork-bot+netdevbpf @ 2026-07-21 10:00 UTC (permalink / raw)
  To: luoxuanqiang
  Cc: davem, edumazet, kuba, pabeni, dsahern, idosch, horms, kuniyu,
	netdev, linux-kernel
In-Reply-To: <20260708060537.17188-1-xuanqiang.luo@linux.dev>

Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  8 Jul 2026 14:05:35 +0800 you wrote:
> From: Xuanqiang Luo <xuanqiang.luo@linux.dev>
> 
> Patch 1 makes the rt_flush_dev() write to rt->dst.dev use
> rcu_assign_pointer(), matching the existing dst_dev_rcu() readers.
> 
> Patch 2 makes ip_rt_send_redirect() and ip_rt_get_source() use one
> dst.dev snapshot throughout each operation, so a concurrent rt_flush_dev()
> update cannot make them use values from two devices.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/2] ipv4: use rcu_assign_pointer() in rt_flush_dev()
    https://git.kernel.org/netdev/net-next/c/1469773b246a
  - [net-next,v3,2/2] ipv4: snapshot dst.dev in ip_rt_send_redirect() and ip_rt_get_source()
    https://git.kernel.org/netdev/net-next/c/7804eaa057fe

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH net-next v6 2/7] net: phy: phylink: add helper to modify pause
From: Maxime Chevallier @ 2026-07-21 10:01 UTC (permalink / raw)
  To: Javen, hkallweit1@gmail.com, nic_swsd@realtek.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	daniel@makrotopia.org, linux@armlinux.org.uk,
	enelsonmoore@gmail.com, daniel@thingy.jp
In-Reply-To: <ba61c475562f49c4a18038130f3508bc@realsil.com.cn>

Hi Javen,

On 7/21/26 11:52, Javen wrote:
> Hi Maxime,
> 
>>
>> Hi Javen,
>>
>> On 7/13/26 09:51, Javen wrote:
>>> Hi,
>>>
>>>> There's a change in the MAC's ability to support Pause, so we should :
>>>>
>>>> - Recompute the pl->supported field. Update the
>>>> config.mac_capabilities with the
>>>>   new pause settings, calling phylink_validate() should do the trick I think,
>> this
>>>>   will rebuild the capability list:
>>>>
>>>>   phylink_validate(pl, pl->supported, &pl->link_config);
>>>>
>>>> - Then update the pl->link_config.pause,
>>>>
>>>> - Then update the pause advertising, like done in phylink_setpauseparam
>>>>   ( I think, everything that comes after pl->state_mutex gets released in
>>>>    phylink_ethtool_set_pauseparam)
>>>>
>>>> Ideally, the logic to update the advertising and re-trigger a
>>>> negociation should be factored out in a private helper, then reused
>>>> from both this path (MAC updates pause support) and the
>> phylink_ethtool_set_pauseparam path.
>>>>
>>>> Maxime
>>>
>>> Thanks for review and helpful suggestions.
>>>
>>> I agree with your suggestion to factor out the logic into a private helper and
>> reuse it for both phylink_ethtool_set_pauseparam() and
>> phylink_update_mac_pause_capabilities().
>>>
>>> Here is the refactored logic. I want to share this specific part with you for a
>> quick check before I submit v7 patch.
>>
>> I'm currently attending the netdev conference, It'll take a few days for me to
>> look at this, sorry about that :/
>>
>> Maxime
> 
> Just a gentle ping on this thread. Could you please take a quick look at this refactored logic whenever you are free? Any suggestion would be greatly appreciated.

Thanks for the ping, I just looked at it from a high level and this is the
thing I had in mind yes :)

I think you can post a new revision then.

Thanks for that work,

Maxime


^ permalink raw reply

* Re: [PATCH net-next 4/5] net: phy: mediatek: add calibration logic for AN7581
From: Paolo Abeni @ 2026-07-21 10:02 UTC (permalink / raw)
  To: Christian Marangi, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Daniel Golle,
	Qingfang Deng, SkyLake Huang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-kernel, netdev,
	linux-arm-kernel, linux-mediatek
In-Reply-To: <20260708102341.53919-5-ansuelsmth@gmail.com>

On 7/8/26 12:23 PM, Christian Marangi wrote:
> +static int airoha_cal_cycle(struct phy_device *phydev, int devad,
> +			    u32 regnum, u16 mask, u16 cal_val)
> +{
> +	struct airoha_socphy_shared *shared = phy_package_get_priv(phydev);
> +	struct phy_device *phydev_p0;
> +	int ret;
> +
> +	phydev_p0 = shared->phydev_p0;
> +
> +	phy_modify_mmd(phydev, devad, regnum, mask, cal_val);
> +
> +	ret = mtk_cal_cycle_wait(phydev_p0);

The above call causes a builder error at link time in allmodyes config:

ERROR: modpost: "mtk_cal_cycle_wait"
[drivers/net/phy/mediatek/airoha-ge-soc.ko] undefined!

Also sashiko gemini has a few points:

https://sashiko.dev/#/patchset/20260708102341.53919-1-ansuelsmth%40gmail.com

/P


^ permalink raw reply

* Re: [PATCH net] net: hsr: fix memory leak on slave unregistration by removing synced VLANs
From: Eric Dumazet @ 2026-07-21 10:05 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: Jakub Kicinski, Fernando Fernandez Mancera, David S . Miller,
	Simon Horman, Andrew Lunn, netdev, eric.dumazet,
	syzbot+456957213f32970c0762
In-Reply-To: <0db18429-58f5-46de-8cb4-0a934ff4d650@redhat.com>

On Tue, Jul 21, 2026 at 10:59 AM Paolo Abeni <pabeni@redhat.com> wrote:
>
> On 7/21/26 3:12 AM, Jakub Kicinski wrote:
> > On Tue, 14 Jul 2026 22:45:24 +0200 Fernando Fernandez Mancera wrote:
> >>> When an HSR master device is brought UP, it auto-adds VLAN 0 via
> >>> vlan_vid0_add(), which propagates VID 0 to its slave devices.
> >>>
> >>> If a slave device is later unregistered while HSR is active (e.g., during
> >>> netns cleanup or interface destruction), hsr_del_port() is called to
> >>> detach the slave port from the HSR master. However, hsr_del_port() currently
> >>> does not delete the VLAN IDs that were synced to the slave device by HSR.
> >>>
> >>> As a result, the slave device retains a refcount on VID 0 (and any other
> >>> synced VLANs). When the slave device is destroyed, its vlan_info /
> >>> vlan_vid_info structure remains allocated, leading to a memory leak.
> >>>
> >>> Fix this by calling vlan_vids_del_by_dev(port->dev, master->dev) in
> >>> hsr_del_port() before unlinking the slave device, matching the cleanup
> >>> behavior in bonding and team drivers.
> >>>
> >>> Fixes: 1a8a63a5305e ("net: hsr: Add VLAN CTAG filter support")
> >>> Reported-by: syzbot+456957213f32970c0762@syzkaller.appspotmail.com
> >>> Closes: https://lore.kernel.org/netdev/6a4cb6ca.57639fcc.86d58.000b.GAE@google.com/T/#u
> >>> Signed-off-by: Eric Dumazet <edumazet@google.com>
> >>
> >> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
> >
> > Just to confirm - is the sashiko review a false positive?
> > https://sashiko.dev/#/patchset/20260707082327.3238690-1-edumazet%40google.com
>
> I'm sorry, meanwhile PW archived the patch; a repost is needed.

In any case, I think Sashiko was right, I will send a V2 incorporating
their feedback.

Thanks!

diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index d9af9e65f72f07b1997b80c85db16d812fbda488..01c73b4b50ddd89afa74defa37fa83d40c401cf8
100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -242,6 +242,8 @@ void hsr_del_port(struct hsr_port *port)
                netdev_rx_handler_unregister(port->dev);
                if (!port->hsr->fwd_offloaded)
                        dev_set_promiscuity(port->dev, -1);
+               if (port->type == HSR_PT_SLAVE_A || port->type ==
HSR_PT_SLAVE_B)
+                       vlan_vids_del_by_dev(port->dev, master->dev);
                netdev_upper_dev_unlink(port->dev, master->dev);
                if (hsr->prot_version == PRP_V1 &&
                    port->type == HSR_PT_SLAVE_B) {

^ permalink raw reply

* Re: [PATCH bpf v2] veth: convert frag_list skbs before running XDP
From: Lorenzo Bianconi @ 2026-07-21 10:05 UTC (permalink / raw)
  To: Matt Fleming
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrew Lunn,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Jesper Dangaard Brouer, John Fastabend,
	Stanislav Fomichev, Toke Høiland-Jørgensen, bpf, netdev,
	stable, kernel-team, Matt Fleming
In-Reply-To: <20260720140545.461747-1-matt@readmodwrite.com>

[-- Attachment #1: Type: text/plain, Size: 3615 bytes --]

> From: Matt Fleming <mfleming@cloudflare.com>
> 
> A frag_list skb can reach veth with data_len set but nr_frags zero.
> veth_convert_skb_to_xdp_buff() only converts skbs that are shared,
> locked, have frags[], or do not have enough headroom. It later uses
> skb_is_nonlinear() to decide whether to set XDP_FLAGS_HAS_FRAGS and
> xdp_frags_size.
> 
> That exposes frag_list data to XDP as if it were stored in frags[], but
> frags[] is empty. AF_XDP copy mode can then trust the bogus XDP fragment
> metadata, walk an empty fragment entry, and crash in memcpy() from
> __xsk_rcv().
> 
> Route non-linear skbs through skb_pp_cow_data() before exposing them to
> XDP, and only advertise XDP frags when the resulting skb has frags[].
> skb_copy_bits() already handles frag_list input, and skb_pp_cow_data()
> builds frags[] output with skb_add_rx_frag(), which is the
> representation XDP multi-buffer expects.
> 
> Fixes: 718a18a0c8a6 ("veth: Rework veth_xdp_rcv_skb in order to accept non-linear skb")
> Cc: stable@vger.kernel.org
> Signed-off-by: Matt Fleming <mfleming@cloudflare.com>

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> ---
> Changes in v2:
> - Use skb_is_nonlinear() in veth_convert_skb_to_xdp_buff().
> - Move the skb_pp_cow_data() comment into kerneldoc.
> 
>  drivers/net/veth.c |  4 ++--
>  net/core/skbuff.c  | 16 ++++++++++------
>  2 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index 1c5142149175..00e34afd858e 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -756,7 +756,7 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
>  	u32 frame_sz;
>  
>  	if (skb_shared(skb) || skb_head_is_locked(skb) ||
> -	    skb_shinfo(skb)->nr_frags ||
> +	    skb_is_nonlinear(skb) ||
>  	    skb_headroom(skb) < XDP_PACKET_HEADROOM) {
>  		if (skb_pp_cow_data(rq->page_pool, pskb, XDP_PACKET_HEADROOM))
>  			goto drop;
> @@ -771,7 +771,7 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
>  	xdp_prepare_buff(xdp, skb->head, skb_headroom(skb),
>  			 skb_headlen(skb), true);
>  
> -	if (skb_is_nonlinear(skb)) {
> +	if (skb_shinfo(skb)->nr_frags) {
>  		skb_shinfo(skb)->xdp_frags_size = skb->data_len;
>  		xdp_buff_set_frags_flag(xdp);
>  	} else {
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 18dabb4e9cfa..66f57131633a 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -927,6 +927,16 @@ static void skb_clone_fraglist(struct sk_buff *skb)
>  		skb_get(list);
>  }
>  
> +/**
> + * skb_pp_cow_data() - copy skb data into page-pool backed storage
> + * @pool: page pool to allocate from
> + * @pskb: pointer to skb pointer, replaced with the copied skb on success
> + * @headroom: headroom to reserve in the copied skb
> + *
> + * skb_copy_bits() handles both frags[] and frag_list input. If the copied
> + * skb remains non-linear, it uses frags[], which is the representation used
> + * by XDP multi-buffer.
> + */
>  int skb_pp_cow_data(struct page_pool *pool, struct sk_buff **pskb,
>  		    unsigned int headroom)
>  {
> @@ -936,12 +946,6 @@ int skb_pp_cow_data(struct page_pool *pool, struct sk_buff **pskb,
>  	int err, i, head_off;
>  	void *data;
>  
> -	/* XDP does not support fraglist so we need to linearize
> -	 * the skb.
> -	 */
> -	if (skb_has_frag_list(skb))
> -		return -EOPNOTSUPP;
> -
>  	max_head_size = SKB_WITH_OVERHEAD(PAGE_SIZE - headroom);
>  	if (skb->len > max_head_size + MAX_SKB_FRAGS * PAGE_SIZE)
>  		return -ENOMEM;
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v9 12/12] net: airoha: add phylink support
From: Lorenzo Bianconi @ 2026-07-21 10:10 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Simon Horman, Jonathan Corbet, Shuah Khan, Heiner Kallweit,
	Russell King, Saravana Kannan, Philipp Zabel, netdev, devicetree,
	linux-kernel, linux-doc, linux-arm-kernel, linux-mediatek,
	Maxime Chevallier
In-Reply-To: <6a5e421d.9099b29d.2f0302.1cf4@mx.google.com>

[-- Attachment #1: Type: text/plain, Size: 14947 bytes --]

> On Mon, Jul 20, 2026 at 05:35:48PM +0200, Lorenzo Bianconi wrote:
> > > Add phylink support for each GDM port. For GDM1 add the internal interface
> > > mode as the only supported mode. For GDM2/3/4 add the required
> > > configuration of the PCS to make the external PHY or attached SFP cage
> > > work.
> > > 
> > > These needs to be defined in the GDM port node using the pcs-handle
> > > property.
> > > 
> > > Update and provide a .get/set_link_ksettings function that use phylink
> > > for ethtool OPs now that we fully support phylink.
> > > 
> > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > > ---
> > >  drivers/net/ethernet/airoha/Kconfig       |   1 +
> > >  drivers/net/ethernet/airoha/airoha_eth.c  | 194 +++++++++++++++++++++-
> > >  drivers/net/ethernet/airoha/airoha_eth.h  |   7 +-
> > >  drivers/net/ethernet/airoha/airoha_regs.h |  12 ++
> > >  4 files changed, 207 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/drivers/net/ethernet/airoha/Kconfig b/drivers/net/ethernet/airoha/Kconfig
> > > index 1f6640a15fc9..789906516bf8 100644
> > > --- a/drivers/net/ethernet/airoha/Kconfig
> > > +++ b/drivers/net/ethernet/airoha/Kconfig
> > > @@ -20,6 +20,7 @@ config NET_AIROHA
> > >  	depends on NET_DSA || !NET_DSA
> > >  	select NET_AIROHA_NPU
> > >  	select PAGE_POOL
> > > +	select PHYLINK
> > >  	help
> > >  	  This driver supports the gigabit ethernet MACs in the
> > >  	  Airoha SoC family.
> > > diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> > > index 59001fd4b6f7..ed1ac032f337 100644
> > > --- a/drivers/net/ethernet/airoha/airoha_eth.c
> > > +++ b/drivers/net/ethernet/airoha/airoha_eth.c
> > > @@ -8,6 +8,7 @@
> > >  #include <linux/of_reserved_mem.h>
> > >  #include <linux/platform_device.h>
> > >  #include <linux/tcp.h>
> > > +#include <linux/pcs/pcs.h>
> > >  #include <linux/u64_stats_sync.h>
> > >  #include <net/dst_metadata.h>
> > >  #include <net/page_pool/helpers.h>
> > > @@ -1837,7 +1838,7 @@ static void airoha_update_hw_stats(struct airoha_gdm_dev *dev)
> > >  	struct airoha_gdm_port *port = dev->port;
> > >  	int i;
> > >  
> > > -	spin_lock(&port->stats_lock);
> > > +	spin_lock(&port->lock);
> > 
> > Hi Christian,
> > 
> > as pointed out in a previous email, I do not like the approach of reusing this
> > spin_lock for airoha_mac_link_up(). Can we use rtl_lock() (when necessary) as
> > pointed out before?
> > 
> 
> For context, quoting from the previous series, the suggestion is to use
> rtnl_is_locked() and then lock accordingly but I didn't find other usage of
> that in other driver (aside from core net) and I don't like the use of
> is_locked. I can already see the BOT saying that in the timeframe of
> is_locked and writing the register another interface goes up causing a
> race.

Can you please explain what is the problem of using rtnl_is_locked()?

> 
> Guess I will add a simple mutex for this case and the other.

I do not have a strong opinion on it. I guess it is ok if you are
planning to use it for future usage, otherwise I guess it is fine
to rely on rtnl lock.

Regards,
Lorenzo

> 
> > >  
> > >  	for (i = 0; i < ARRAY_SIZE(port->devs); i++) {
> > >  		if (port->devs[i])
> > > @@ -1848,7 +1849,7 @@ static void airoha_update_hw_stats(struct airoha_gdm_dev *dev)
> > >  	airoha_fe_set(dev->eth, REG_FE_GDM_MIB_CLEAR(port->id),
> > >  		      FE_GDM_MIB_RX_CLEAR_MASK | FE_GDM_MIB_TX_CLEAR_MASK);
> > >  
> > > -	spin_unlock(&port->stats_lock);
> > > +	spin_unlock(&port->lock);
> > >  }
> > >  
> > >  static void airoha_dev_set_xmit_frame_size(struct net_device *netdev)
> > > @@ -1870,6 +1871,14 @@ static int airoha_dev_open(struct net_device *netdev)
> > >  	u32 pse_port = FE_PSE_PORT_PPE1;
> > >  	int err;
> > >  
> > > +	err = phylink_of_phy_connect(dev->phylink, netdev->dev.of_node, 0);
> > > +	if (err) {
> > > +		netdev_err(netdev, "could not attach PHY: %d\n", err);
> > > +		return err;
> > > +	}
> > > +
> > > +	phylink_start(dev->phylink);
> > > +
> > >  	netif_tx_start_all_queues(netdev);
> > >  	err = airoha_set_vip_for_gdm_port(dev, true);
> > >  	if (err)
> > > @@ -1909,6 +1918,10 @@ static int airoha_dev_stop(struct net_device *netdev)
> > >  		airoha_set_gdm_port_fwd_cfg(qdma->eth,
> > >  					    REG_GDM_FWD_CFG(port->id),
> > >  					    FE_PSE_PORT_DROP);
> > > +
> > > +	phylink_stop(dev->phylink);
> > > +	phylink_disconnect_phy(dev->phylink);
> > > +
> > >  	return 0;
> > >  }
> > >  
> > > @@ -2389,6 +2402,24 @@ airoha_ethtool_get_rmon_stats(struct net_device *netdev,
> > >  	} while (u64_stats_fetch_retry(&dev->stats.syncp, start));
> > >  }
> > >  
> > > +static int
> > > +airoha_ethtool_get_link_ksettings(struct net_device *netdev,
> > > +				  struct ethtool_link_ksettings *cmd)
> > > +{
> > > +	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> > > +
> > > +	return phylink_ethtool_ksettings_get(dev->phylink, cmd);
> > > +}
> > > +
> > > +static int
> > > +airoha_ethtool_set_link_ksettings(struct net_device *netdev,
> > > +				  const struct ethtool_link_ksettings *cmd)
> > > +{
> > > +	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> > > +
> > > +	return phylink_ethtool_ksettings_set(dev->phylink, cmd);
> > > +}
> > > +
> > >  static int airoha_qdma_set_chan_tx_sched(struct net_device *netdev,
> > >  					 int channel, enum tx_sched_mode mode,
> > >  					 const u16 *weights, u8 n_weights)
> > > @@ -3120,7 +3151,8 @@ static const struct ethtool_ops airoha_ethtool_ops = {
> > >  	.get_drvinfo		= airoha_ethtool_get_drvinfo,
> > >  	.get_eth_mac_stats      = airoha_ethtool_get_mac_stats,
> > >  	.get_rmon_stats		= airoha_ethtool_get_rmon_stats,
> > > -	.get_link_ksettings	= phy_ethtool_get_link_ksettings,
> > > +	.get_link_ksettings	= airoha_ethtool_get_link_ksettings,
> > > +	.set_link_ksettings	= airoha_ethtool_set_link_ksettings,
> > >  	.get_link		= ethtool_op_get_link,
> > >  };
> > >  
> > > @@ -3176,6 +3208,155 @@ bool airoha_is_valid_gdm_dev(struct airoha_eth *eth,
> > >  	return false;
> > >  }
> > >  
> > > +/* Nothing to do in MAC, everything is handled in PCS */
> > > +static void airoha_mac_config(struct phylink_config *config, unsigned int mode,
> > > +			      const struct phylink_link_state *state)
> > > +{
> > > +}
> > > +
> > > +static void airoha_mac_link_up(struct phylink_config *config, struct phy_device *phy,
> > > +			       unsigned int mode, phy_interface_t interface,
> > > +			       int speed, int duplex, bool tx_pause, bool rx_pause)
> > > +{
> > > +	struct airoha_gdm_dev *dev = container_of(config, struct airoha_gdm_dev,
> > > +						  phylink_config);
> > > +	struct airoha_gdm_port *port = dev->port;
> > > +	struct airoha_eth *eth = dev->eth;
> > > +	u32 frag_size_tx, frag_size_rx;
> > > +	u32 mask, val;
> > > +
> > > +	/* TX/RX frag is configured only for GDM4 */
> > > +	if (port->id != AIROHA_GDM4_IDX)
> > > +		return;
> > > +
> > > +	switch (speed) {
> > > +	case SPEED_10000:
> > > +	case SPEED_5000:
> > > +		frag_size_tx = 8;
> > > +		frag_size_rx = 8;
> > > +		break;
> > > +	case SPEED_2500:
> > > +		frag_size_tx = 2;
> > > +		frag_size_rx = 1;
> > > +		break;
> > > +	default:
> > > +		frag_size_tx = 1;
> > > +		frag_size_rx = 0;
> > > +	}
> > > +
> > > +	spin_lock(&port->lock);
> > > +
> > > +	/* Configure TX/RX frag based on speed */
> > > +	if (dev->nbq == 1) {
> > > +		mask = GDM4_SGMII1_TX_FRAG_SIZE_MASK;
> > > +		val = FIELD_PREP(GDM4_SGMII1_TX_FRAG_SIZE_MASK,
> > > +				 frag_size_tx);
> > > +	}  else {
> > > +		mask = GDM4_SGMII0_TX_FRAG_SIZE_MASK;
> > > +		val = FIELD_PREP(GDM4_SGMII0_TX_FRAG_SIZE_MASK,
> > > +				 frag_size_tx);
> > > +	}
> > > +	airoha_fe_rmw(eth, REG_FE_GDM4_TMBI_FRAG, mask, val);
> > > +
> > > +	if (dev->nbq == 1) {
> > > +		mask = GDM4_SGMII1_RX_FRAG_SIZE_MASK;
> > > +		val = FIELD_PREP(GDM4_SGMII1_RX_FRAG_SIZE_MASK,
> > > +				 frag_size_rx);
> > > +	} else {
> > > +		mask = GDM4_SGMII0_RX_FRAG_SIZE_MASK;
> > > +		val = FIELD_PREP(GDM4_SGMII0_RX_FRAG_SIZE_MASK,
> > > +				 frag_size_rx);
> > > +	}
> > > +	airoha_fe_rmw(eth, REG_FE_GDM4_RMBI_FRAG, mask, val);
> > > +
> > > +	spin_unlock(&port->lock);
> > > +}
> > > +
> > > +/* Nothing to do in MAC, everything is handled in PCS */
> > > +static void airoha_mac_link_down(struct phylink_config *config, unsigned int mode,
> > > +				 phy_interface_t interface)
> > > +{
> > > +}
> > > +
> > > +static const struct phylink_mac_ops airoha_phylink_ops = {
> > > +	.mac_config = airoha_mac_config,
> > > +	.mac_link_up = airoha_mac_link_up,
> > > +	.mac_link_down = airoha_mac_link_down,
> > > +};
> > > +
> > > +static int airoha_fill_available_pcs(struct phylink_config *config,
> > > +				     struct phylink_pcs **available_pcs,
> > > +				     unsigned int num_possible_pcs)
> > > +{
> > > +	struct device *dev = config->dev;
> > > +
> > > +	return fwnode_phylink_pcs_parse(dev_fwnode(dev), available_pcs,
> > > +					num_possible_pcs);
> > > +}
> > > +
> > > +static int airoha_setup_phylink(struct net_device *netdev)
> > > +{
> > > +	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> > > +	struct device_node *np = netdev->dev.of_node;
> > > +	struct airoha_gdm_port *port = dev->port;
> > > +	struct phylink_config *config;
> > > +	phy_interface_t phy_mode;
> > > +	struct phylink *phylink;
> > > +	int err;
> > > +
> > > +	err = of_get_phy_mode(np, &phy_mode);
> > > +	if (err) {
> > > +		dev_err(&netdev->dev, "incorrect phy-mode\n");
> > > +		return err;
> > > +	}
> > > +
> > > +	config = &dev->phylink_config;
> > > +	config->dev = &netdev->dev;
> > > +	config->type = PHYLINK_NETDEV;
> > > +
> > > +	/*
> > > +	 * GDM1 only supports internal for Embedded Switch
> > > +	 * and doesn't require a PCS.
> > > +	 */
> > > +	if (port->id == AIROHA_GDM1_IDX) {
> > > +		config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
> > > +					   MAC_10000FD;
> > > +
> > > +		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
> > > +			  config->supported_interfaces);
> > > +	} else {
> > > +		config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
> > > +					   MAC_10 | MAC_100 | MAC_1000 |
> > > +					   MAC_2500FD | MAC_5000FD | MAC_10000FD;
> > > +
> > > +		config->num_possible_pcs = fwnode_phylink_pcs_count(dev_fwnode(config->dev));
> > > +		config->fill_available_pcs = airoha_fill_available_pcs;
> > > +
> > > +		__set_bit(PHY_INTERFACE_MODE_SGMII,
> > > +			  config->supported_interfaces);
> > > +		__set_bit(PHY_INTERFACE_MODE_1000BASEX,
> > > +			  config->supported_interfaces);
> > > +		__set_bit(PHY_INTERFACE_MODE_2500BASEX,
> > > +			  config->supported_interfaces);
> > > +		__set_bit(PHY_INTERFACE_MODE_10GBASER,
> > > +			  config->supported_interfaces);
> > > +		__set_bit(PHY_INTERFACE_MODE_USXGMII,
> > > +			  config->supported_interfaces);
> > > +
> > > +		phy_interface_copy(config->pcs_interfaces,
> > > +				   config->supported_interfaces);
> > > +	}
> > > +
> > > +	phylink = phylink_create(config, of_fwnode_handle(np),
> > > +				 phy_mode, &airoha_phylink_ops);
> > > +	if (IS_ERR(phylink))
> > > +		return PTR_ERR(phylink);
> > > +
> > > +	dev->phylink = phylink;
> > > +
> > > +	return 0;
> > > +}
> > > +
> > >  static int airoha_alloc_gdm_device(struct airoha_eth *eth,
> > >  				   struct airoha_gdm_port *port,
> > >  				   int nbq, struct device_node *np)
> > > @@ -3239,7 +3420,7 @@ static int airoha_alloc_gdm_device(struct airoha_eth *eth,
> > >  	dev->nbq = nbq;
> > >  	port->devs[index] = dev;
> > >  
> > > -	return 0;
> > > +	return airoha_setup_phylink(netdev);
> > >  }
> > >  
> > >  static int airoha_alloc_gdm_port(struct airoha_eth *eth,
> > > @@ -3274,7 +3455,7 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth,
> > >  		return -ENOMEM;
> > >  
> > >  	port->id = id;
> > > -	spin_lock_init(&port->stats_lock);
> > > +	spin_lock_init(&port->lock);
> > >  	eth->ports[p] = port;
> > >  
> > >  	err = airoha_metadata_dst_alloc(port);
> > > @@ -3471,6 +3652,8 @@ static int airoha_probe(struct platform_device *pdev)
> > >  			netdev = netdev_from_priv(dev);
> > >  			if (netdev->reg_state == NETREG_REGISTERED)
> > >  				unregister_netdev(netdev);
> > > +			if (dev->phylink)
> > > +				phylink_destroy(dev->phylink);
> > >  			of_node_put(netdev->dev.of_node);
> > >  		}
> > >  		airoha_metadata_dst_free(port);
> > > @@ -3509,6 +3692,7 @@ static void airoha_remove(struct platform_device *pdev)
> > >  
> > >  			netdev = netdev_from_priv(dev);
> > >  			unregister_netdev(netdev);
> > > +			phylink_destroy(dev->phylink);
> > >  			of_node_put(netdev->dev.of_node);
> > >  		}
> > >  		airoha_metadata_dst_free(port);
> > > diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> > > index f6d01a8e8da1..b49fc5304b3a 100644
> > > --- a/drivers/net/ethernet/airoha/airoha_eth.h
> > > +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> > > @@ -561,6 +561,9 @@ struct airoha_gdm_dev {
> > >  	int nbq;
> > >  
> > >  	struct airoha_hw_stats stats;
> > > +
> > > +	struct phylink *phylink;
> > > +	struct phylink_config phylink_config;
> > >  };
> > >  
> > >  struct airoha_gdm_port {
> > > @@ -568,8 +571,8 @@ struct airoha_gdm_port {
> > >  	int id;
> > >  	int users;
> > >  
> > > -	/* protect concurrent hw_stats accesses */
> > > -	spinlock_t stats_lock;
> > > +	/* protect concurrent hw_stats and frag register accesses */
> > > +	spinlock_t lock;
> > >  
> > >  	struct metadata_dst *dsa_meta[AIROHA_MAX_DSA_PORTS];
> > >  };
> > > diff --git a/drivers/net/ethernet/airoha/airoha_regs.h b/drivers/net/ethernet/airoha/airoha_regs.h
> > > index 6fed63d013b4..8df02f51211c 100644
> > > --- a/drivers/net/ethernet/airoha/airoha_regs.h
> > > +++ b/drivers/net/ethernet/airoha/airoha_regs.h
> > > @@ -357,6 +357,18 @@
> > >  #define IP_FRAGMENT_PORT_MASK		GENMASK(8, 5)
> > >  #define IP_FRAGMENT_NBQ_MASK		GENMASK(4, 0)
> > >  
> > > +#define REG_FE_GDM4_TMBI_FRAG		0x2028
> > > +#define GDM4_SGMII1_TX_WEIGHT_MASK	GENMASK(31, 26)
> > > +#define GDM4_SGMII1_TX_FRAG_SIZE_MASK	GENMASK(25, 16)
> > > +#define GDM4_SGMII0_TX_WEIGHT_MASK	GENMASK(15, 10)
> > > +#define GDM4_SGMII0_TX_FRAG_SIZE_MASK	GENMASK(9, 0)
> > > +
> > > +#define REG_FE_GDM4_RMBI_FRAG		0x202c
> > > +#define GDM4_SGMII1_RX_WEIGHT_MASK	GENMASK(31, 26)
> > > +#define GDM4_SGMII1_RX_FRAG_SIZE_MASK	GENMASK(25, 16)
> > > +#define GDM4_SGMII0_RX_WEIGHT_MASK	GENMASK(15, 10)
> > > +#define GDM4_SGMII0_RX_FRAG_SIZE_MASK	GENMASK(9, 0)
> > > +
> > >  #define REG_MC_VLAN_EN			0x2100
> > >  #define MC_VLAN_EN_MASK			BIT(0)
> > >  
> > > -- 
> > > 2.53.0
> > > 
> 
> 
> 
> -- 
> 	Ansuel

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH net v2 2/2] vsock/test: add test for small packets under pressure
From: Paolo Abeni @ 2026-07-21 10:10 UTC (permalink / raw)
  To: Stefano Garzarella, Michael S. Tsirkin
  Cc: netdev, Jason Wang, Xuan Zhuo, Eric Dumazet, Eugenio Pérez,
	Simon Horman, Stefan Hajnoczi, David S. Miller, linux-kernel, kvm,
	virtualization, Jakub Kicinski, Jason Wang
In-Reply-To: <ak9h1kWcLmpP74PI@sgarzare-redhat>

On 7/9/26 11:17 AM, Stefano Garzarella wrote:
> On Wed, Jul 08, 2026 at 06:59:41AM -0400, Michael S. Tsirkin wrote:
>> On Wed, Jul 08, 2026 at 12:29:04PM +0200, Stefano Garzarella wrote:
>>> From: Stefano Garzarella <sgarzare@redhat.com>
>>>
>>> Add a test that sends 2 MB of data using randomly sized small packets
>>> (129-512 bytes) over a SOCK_STREAM connection. Packets above
>>> GOOD_COPY_LEN (128) bypass the in-place coalescing in recv_enqueue(),
>>> forcing each one into its own skb.
>>>
>>> Without receive queue collapsing, the per-skb overhead eventually
>>> exceeds buf_alloc and the connection is reset. The test verifies
>>> that all data arrives and that content integrity is preserved.
>>>
>>> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>>
>> maybe cut down SO_VM_SOCKETS_BUFFER_SIZE? will make it easier to
>> trigger?
> 
> Currently, with the default value, the trigger is practically immediate 
> for packets between 129 and 512 bytes, but yes, a smaller buffer size 
> certainly makes this effect even more pronounced.
Given that PW is quite in a sorrow status, I think a (net-next)
follow-up is the better option here.

/P


^ permalink raw reply

* [PATCH v2 net] net: hsr: fix memory leak on slave unregistration by removing synced VLANs
From: Eric Dumazet @ 2026-07-21 10:12 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet,
	syzbot+456957213f32970c0762, Felix Maurer,
	Fernando Fernandez Mancera

When an HSR master device is brought UP, it auto-adds VLAN 0 via
vlan_vid0_add(), which propagates VID 0 to its slave devices (slave A and B).

If a slave device is later unregistered while HSR is active (e.g., during
netns cleanup or interface destruction), hsr_del_port() is called to
detach the slave port from the HSR master. However, hsr_del_port() currently
does not delete the VLAN IDs that were synced to the slave device by HSR.

As a result, the slave device retains a refcount on VID 0 (and any other
synced VLANs). When the slave device is destroyed, its vlan_info /
vlan_vid_info structure remains allocated, leading to a memory leak.

Fix this by calling vlan_vids_del_by_dev(port->dev, master->dev) in
hsr_del_port() before unlinking slave A or slave B ports, matching the
propagation logic in hsr_ndo_vlan_rx_add_vid() / hsr_ndo_vlan_rx_kill_vid()
and the cleanup behavior in bonding and team drivers.

Fixes: 1a8a63a5305e ("net: hsr: Add VLAN CTAG filter support")
Reported-by: syzbot+456957213f32970c0762@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6a4cb6ca.57639fcc.86d58.000b.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Felix Maurer <fmaurer@redhat.com>
Cc: Fernando Fernandez Mancera <fmancera@suse.de>
---
v2: incorporated Sashiko's feedback
v1: https://lore.kernel.org/netdev/20260707082327.3238690-1-edumazet@google.com/

 net/hsr/hsr_slave.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index d9af9e65f72f07b1997b80c85db16d812fbda488..01c73b4b50ddd89afa74defa37fa83d40c401cf8 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -242,6 +242,8 @@ void hsr_del_port(struct hsr_port *port)
 		netdev_rx_handler_unregister(port->dev);
 		if (!port->hsr->fwd_offloaded)
 			dev_set_promiscuity(port->dev, -1);
+		if (port->type == HSR_PT_SLAVE_A || port->type == HSR_PT_SLAVE_B)
+			vlan_vids_del_by_dev(port->dev, master->dev);
 		netdev_upper_dev_unlink(port->dev, master->dev);
 		if (hsr->prot_version == PRP_V1 &&
 		    port->type == HSR_PT_SLAVE_B) {
-- 
2.55.0.229.g6434b31f56-goog


^ permalink raw reply related

* Re: [PATCH v5 3/7] mtd: spi-nor: sfdp: expose the SFDP as a read-only NVMEM device
From: Manikandan.M @ 2026-07-21 10:17 UTC (permalink / raw)
  To: mwalle
  Cc: pratyush, takahiro.kuwano, miquel.raynal, richard, vigneshr, robh,
	krzk+dt, conor+dt, srini, Nicolas.Ferre, alexandre.belloni,
	claudiu.beznea, linux, richardcochran, linusw, arnd, linux-mtd,
	devicetree, linux-kernel, linux-arm-kernel, netdev
In-Reply-To: <DK42262TYFG1.NZKF4VGZGSRM@kernel.org>

Hi Michael,

On 7/21/26 12:32 PM, Michael Walle wrote:
> On Tue Jul 21, 2026 at 7:28 AM CEST, Manikandan Muralidharan wrote:
>> The SPI NOR core already reads the SFDP tables during enumeration and
>> caches them in nor->sfdp->dwords (see spi_nor_parse_sfdp()). Re-expose
>> that cached data as a read-only NVMEM device, in on-flash byte order,
>> rooted at the flash's SFDP child node (compatible "jedec,sfdp").
>>
>> This lets NVMEM cells reference any SFDP data: a fixed-layout for
>> parameters at a known offset, or an nvmem-layout parser for vendor data
>> whose location must be discovered at runtime.The device is only registered
>> when an "sfdp" node is present in the device tree.
>>
>> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
>> ---
>>   drivers/mtd/spi-nor/core.c |  8 ++++
>>   drivers/mtd/spi-nor/core.h |  1 +
>>   drivers/mtd/spi-nor/sfdp.c | 86 ++++++++++++++++++++++++++++++++++++++
>>   3 files changed, 95 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
>> index ccf4396cdcd0..b833d8ec2d65 100644
>> --- a/drivers/mtd/spi-nor/core.c
>> +++ b/drivers/mtd/spi-nor/core.c
>> @@ -3204,6 +3204,14 @@ static int spi_nor_init_params(struct spi_nor *nor)
>>   		spi_nor_init_params_deprecated(nor);
>>   	}
>>   
>> +	/*
>> +	 * Expose the SFDP table as an NVMEM device only when
>> +	 * the flash actually provides one
>> +	 */
>> +	ret = spi_nor_register_sfdp_nvmem(nor);
>> +	if (ret)
>> +		return ret;
>> +
>>   	ret = spi_nor_late_init_params(nor);
>>   	if (ret)
>>   		return ret;
>> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
>> index ba2d1a862c9d..0a6484298c5c 100644
>> --- a/drivers/mtd/spi-nor/core.h
>> +++ b/drivers/mtd/spi-nor/core.h
>> @@ -698,6 +698,7 @@ int spi_nor_controller_ops_write_reg(struct spi_nor *nor, u8 opcode,
>>   
>>   int spi_nor_check_sfdp_signature(struct spi_nor *nor);
>>   int spi_nor_parse_sfdp(struct spi_nor *nor);
>> +int spi_nor_register_sfdp_nvmem(struct spi_nor *nor);
> 
> That's probably not needed if..
> 
>>   static inline struct spi_nor *mtd_to_spi_nor(struct mtd_info *mtd)
>>   {
>> diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c
>> index 4600983cb579..704799fe92ae 100644
>> --- a/drivers/mtd/spi-nor/sfdp.c
>> +++ b/drivers/mtd/spi-nor/sfdp.c
>> @@ -6,6 +6,8 @@
>>   
>>   #include <linux/bitfield.h>
>>   #include <linux/mtd/spi-nor.h>
>> +#include <linux/nvmem-provider.h>
>> +#include <linux/of.h>
>>   #include <linux/slab.h>
>>   #include <linux/sort.h>
>>   
>> @@ -1612,3 +1614,87 @@ int spi_nor_parse_sfdp(struct spi_nor *nor)
>>   	kfree(param_headers);
>>   	return err;
>>   }
>> +
>> +static int spi_nor_sfdp_reg_read(void *priv, unsigned int offset,
>> +				 void *val, size_t bytes)
>> +{
>> +	struct spi_nor *nor = priv;
>> +	struct sfdp *sfdp = nor->sfdp;
>> +	size_t sfdp_size = sfdp->num_dwords * sizeof(*sfdp->dwords);
>> +
>> +	if (offset >= sfdp_size || bytes > sfdp_size - offset)
>> +		return -EINVAL;
>> +
>> +	/* The cached SFDP is kept in on-flash (little-endian) byte order. */
>> +	memcpy(val, (u8 *)sfdp->dwords + offset, bytes);
>> +
>> +	return 0;
>> +}
>> +
>> +static void spi_nor_sfdp_nvmem_put_np(void *data)
>> +{
>> +	of_node_put(data);
>> +}
>> +
>> +/**
>> + * spi_nor_register_sfdp_nvmem() - expose the SFDP as a read-only NVMEM device
>> + * @nor:	pointer to a 'struct spi_nor'
>> + *
>> + * Expose the whole SFDP, in on-flash byte order, as a read-only NVMEM device
>> + * rooted at the flash's SFDP child node (compatible "jedec,sfdp"). This lets
>> + * generic (fixed-layout) or vendor (nvmem-layout) cells reference any SFDP
>> + * data. The device is only registered when a child node with the "jedec,sfdp"
>> + * compatible is described in the device tree.
>> + *
>> + * Return: 0 on success or if there is nothing to do, -errno otherwise.
>> + */
>> +int spi_nor_register_sfdp_nvmem(struct spi_nor *nor)
> 
> .. you move all this into the core, as the sfdp.c is just for
> parsing the tables.
> 
>> +{
>> +	struct device *dev = nor->dev;
>> +	struct nvmem_config config = { };
>> +	struct nvmem_device *nvmem;
>> +	struct device_node *np;
>> +	int ret;
>> +
>> +	if (!nor->sfdp)
>> +		return 0;
>> +
>> +	for_each_available_child_of_node(dev_of_node(dev), np)
>> +		if (of_device_is_compatible(np, "jedec,sfdp"))
>> +			break;
> 
> There is already of_get_compatible_child() doing exactly this.
> 
>> +	if (!np)
>> +		return 0;
>> +
>> +	/*
>> +	 * Register the put before devm_nvmem_register() so it runs last on
>> +	 * detach, after the NVMEM device that uses the node is gone.
>> +	 */
>> +	ret = devm_add_action_or_reset(dev, spi_nor_sfdp_nvmem_put_np, np);
>> +	if (ret)
>> +		return ret;
>> +
>> +	config.dev = dev;
>> +	config.of_node = np;
>> +	config.name = "sfdp";
>> +	config.id = NVMEM_DEVID_AUTO;
> 
> Or rather NVEMEM_DEVID_NONE? There will ever be just one SFDP nvmem
> device.
> 
> How does the sysfs path looks like?
Currently the sysfs looks like:

/sys/bus/nvmem/devices/sfdp0

I kept AUTO so that the bare "sfdp" name would clash on a board(if any) 
with a second flash exposing a "jedec,sfdp" node.

> 
> -michael
> 
>> +	config.owner = THIS_MODULE;
>> +	config.read_only = true;
>> +	config.word_size = 1;
>> +	config.stride = 1;
>> +	config.size = (int)(nor->sfdp->num_dwords * sizeof(*nor->sfdp->dwords));
>> +	config.reg_read = spi_nor_sfdp_reg_read;
>> +	config.priv = nor;
>> +
>> +	nvmem = devm_nvmem_register(dev, &config);
>> +	if (IS_ERR(nvmem)) {
>> +		/* NVMEM support is optional. */
>> +		if (PTR_ERR(nvmem) == -EOPNOTSUPP)
>> +			return 0;
>> +		return dev_err_probe(dev, PTR_ERR(nvmem),
>> +				     "failed to register SFDP NVMEM device\n");
>> +	}
>> +
>> +	dev_dbg(dev, "exposed %d-byte SFDP as an NVMEM device\n", config.size);
>> +
>> +	return 0;
>> +}


-- 
Thanks and Regards,
Manikandan M.

^ permalink raw reply

* Re: [PATCH net v2 0/2] vsock/virtio: collapse receive queue under memory pressure
From: patchwork-bot+netdevbpf @ 2026-07-21 10:20 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: netdev, jasowangio, xuanzhuo, edumazet, eperezma, horms, stefanha,
	davem, linux-kernel, mst, kvm, pabeni, virtualization, kuba,
	jasowang
In-Reply-To: <20260708102904.50732-1-sgarzare@redhat.com>

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  8 Jul 2026 12:29:02 +0200 you wrote:
> This series contains a patch (the first one) that is part of work I'm
> doing to improve the tracking of memory used by AF_VSOCK sockets.
> The second patch is a test for our suite that highlights the issue.
> 
> Since Brien reported an issue with his environment (based on Linux 6.12.y)
> related to the work I’m doing, I extracted this patch and tried to make it
> as easy as possible to backport. Brien tested it by backporting it to
> 6.12.y, which now contains the backport of the 059b7dbd20a6
> ("vsock/virtio: fix potential unbounded skb queue").
> 
> [...]

Here is the summary with links:
  - [net,v2,1/2] vsock/virtio: collapse receive queue under memory pressure
    https://git.kernel.org/netdev/net/c/2a12c05aef21
  - [net,v2,2/2] vsock/test: add test for small packets under pressure
    https://git.kernel.org/netdev/net/c/30c82aa0a8b1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH v9 09/14] media: qcom: Switch to generic PAS TZ APIs
From: Sumit Garg @ 2026-07-21 10:23 UTC (permalink / raw)
  To: bod, mchehab
  Cc: Bjorn Andersson, Sumit Garg, konradybcio, linux-arm-msm,
	devicetree, dri-devel, freedreno, linux-media, netdev,
	linux-wireless, ath12k, linux-remoteproc, robh, krzk+dt, conor+dt,
	robin.clark, sean, akhilpo, lumag, abhinav.kumar, jesszhan0024,
	marijn.suijten, airlied, simona, vikash.garodia, elder,
	andrew+netdev, davem, edumazet, kuba, pabeni, jjohnson,
	mathieu.poirier, trilokkumar.soni, mukesh.ojha, pavan.kondeti,
	jorge.ramirez, tonyh, vignesh.viswanathan, srinivas.kandagatla,
	amirreza.zarrabi, jenswi, op-tee, apurupa, skare, linux-kernel,
	Konrad Dybcio
In-Reply-To: <alJpc3nFX9D7_8i1@baldur>

Hi Bryan, Mauro,

On Sat, Jul 11, 2026 at 9:36 PM Bjorn Andersson <andersson@kernel.org> wrote:
>
> On Thu, Jul 02, 2026 at 05:28:25PM +0530, Sumit Garg wrote:
> > From: Sumit Garg <sumit.garg@oss.qualcomm.com>
> >
> > Switch qcom media client drivers over to generic PAS TZ APIs. Generic PAS
> > TZ service allows to support multiple TZ implementation backends like QTEE
> > based SCM PAS service, OP-TEE based PAS service and any further future TZ
> > backend service.
> >
>
> Please find an immutable branch with the dependencies for this patch at:
>   https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git 20260702115835.167602-2-sumit.garg@kernel.org
>
> Alternatively, if you think there will be no conflicting patches in the
> time leading up to next merge window provide an Ack and I can pick this
> through the qcom tree.

Just a gentle reminder for this patch to be picked up as only the Qcom
media client is left in the next branch for migration to the generic
PAS layer.

If there aren't any conflicts then please allow Bjorn to pick this
patch since the cleanup patch dropping the old SCM APIs is blocked on
this.

-Sumit

>
> Thanks,
> Bjorn
>
> > Reviewed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> > Tested-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> # Lemans
> > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> > Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > ---

^ permalink raw reply

* Re: [PATCH net] net: airoha: Fix potential use-after-free in airoha_ppe_deinit()
From: patchwork-bot+netdevbpf @ 2026-07-21 10:30 UTC (permalink / raw)
  To: Wayen Yan
  Cc: netdev, lorenzo, horms, pabeni, kuba, edumazet, andrew+netdev,
	angelogioacchino.delregno, matthias.bgg, linux-arm-kernel,
	linux-mediatek
In-Reply-To: <178351022574.97989.6880403520276841703@gmail.com>

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 8 Jul 2026 19:16:16 +0800 you wrote:
> airoha_ppe_deinit() replaces the NPU pointer with NULL via
> rcu_replace_pointer() but does not wait for existing RCU readers
> to exit before calling ppe_deinit() and airoha_npu_put(). This can
> cause a use-after-free if a reader in an RCU read-side critical
> section still holds a reference to the NPU when it is freed.
> 
> The init path (airoha_ppe_init) already calls synchronize_rcu()
> after rcu_assign_pointer(), but the deinit path introduced in
> commit 6abcf751bc08 ("net: airoha: Fix schedule while atomic in
> airoha_ppe_deinit()") omitted the matching barrier when switching
> from rcu_read_lock()/rcu_dereference() to rcu_replace_pointer().
> 
> [...]

Here is the summary with links:
  - [net] net: airoha: Fix potential use-after-free in airoha_ppe_deinit()
    https://git.kernel.org/netdev/net/c/2484568a335c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH] dpaa2-eth: put MAC endpoint device on disconnect
From: patchwork-bot+netdevbpf @ 2026-07-21 10:30 UTC (permalink / raw)
  To: Guangshuo Li
  Cc: ioana.ciornei, andrew+netdev, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel
In-Reply-To: <20260708111738.750391-1-lgs201920130244@gmail.com>

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  8 Jul 2026 19:17:37 +0800 you wrote:
> fsl_mc_get_endpoint() returns the MAC endpoint device with a reference
> taken through device_find_child(). The Ethernet connect path stores that
> device in mac->mc_dev and keeps it for the lifetime of the connected MAC
> object.
> 
> However, the disconnect path only disconnects and closes the MAC before
> freeing the dpaa2_mac object. It does not drop the endpoint device
> reference stored in mac->mc_dev, so every successful connect leaks that
> device reference when the MAC is later disconnected.
> 
> [...]

Here is the summary with links:
  - dpaa2-eth: put MAC endpoint device on disconnect
    https://git.kernel.org/netdev/net/c/b4b201cc93ff

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ 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