From: Paolo Abeni <pabeni@redhat.com>
To: wei.fang@oss.nxp.com, xiaoning.wang@nxp.com, andrew@lunn.ch,
olteanv@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, horms@kernel.org,
richardcochran@gmail.com, linusw@kernel.org,
linux@armlinux.org.uk
Cc: wei.fang@nxp.com, imx@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v8 net-next 8/9] net: dsa: netc: add PTP two-step timestamping support
Date: Fri, 27 Nov 2026 12:04:58 +0100 [thread overview]
Message-ID: <fa61e083-d6c0-40d2-b25a-f83cad368397@redhat.com> (raw)
In-Reply-To: <20261119030534.1892935-9-wei.fang@oss.nxp.com>
On 11/19/26 04:05, wei.fang@oss.nxp.com wrote:
> +static void netc_port_tstamp_timeout_work(struct work_struct *work)
> +{
> + struct netc_port *np = container_of(work, struct netc_port,
> + tstamp_timeout_work.work);
> + struct sk_buff_head free_list;
> + struct sk_buff *skb, *skb_tmp;
> +
> + __skb_queue_head_init(&free_list);
> +
> + spin_lock_bh(&np->tstamp_lock);
> + skb_queue_walk_safe(&np->tstamp_queue, skb, skb_tmp) {
> + if (time_is_after_jiffies64(NETC_SKB_CB(skb)->ptp_tx_time +
> + NETC_TSTAMP_TIMEOUT))
> + continue;
Not a blocker, but I think that starting from the tail would be better:
the loop can be stop as soon as non expired skb is seen.
In the hopefully common scenario of no timeouts, the worker will peek
a single skb, instead of traversing a possibly long list.
Can be a follow-up.
/P
next prev parent reply other threads:[~2026-11-27 11:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 3:05 [PATCH v8 net-next 0/9] net: dsa: netc: add PTP support for NETC switch wei.fang
2026-11-19 3:05 ` [PATCH v8 net-next 1/9] ptp: netc: use ioread64_lo_hi/iowrite64_lo_hi for 64-bit register access wei.fang
2026-11-19 3:05 ` [PATCH v8 net-next 2/9] ptp: netc: remove unnecessary pcie_flr() call in probe wei.fang
2026-11-19 3:05 ` [PATCH v8 net-next 3/9] ptp: netc: export netc_timer_get_current_time() for cross-driver use wei.fang
2026-11-19 3:05 ` [PATCH v8 net-next 4/9] net: dsa: netc: tie setup resources and reset to DSA setup/teardown wei.fang
2026-11-23 5:05 ` netdev-bot+sashiko
2026-11-23 6:00 ` Wei Fang
2026-11-19 3:05 ` [PATCH v8 net-next 5/9] net: dsa: netc: use entry ID instead of pointer to track host flood rule wei.fang
2026-11-19 3:05 ` [PATCH v8 net-next 6/9] net: dsa: netc: check return value of ntmp_ipft_delete_entry() wei.fang
2026-11-23 5:05 ` netdev-bot+sashiko
2026-11-23 6:27 ` Wei Fang
2026-11-19 3:05 ` [PATCH v8 net-next 7/9] net: dsa: netc: enable ingress port filtering lookup by default wei.fang
2026-11-19 3:05 ` [PATCH v8 net-next 8/9] net: dsa: netc: add PTP two-step timestamping support wei.fang
2026-11-23 5:05 ` netdev-bot+sashiko
2026-11-23 6:30 ` Wei Fang
2026-11-27 11:04 ` Paolo Abeni [this message]
2026-11-19 3:05 ` [PATCH v8 net-next 9/9] net: dsa: netc: add PTP one-step " wei.fang
2026-11-23 5:05 ` netdev-bot+sashiko
2026-11-23 6:38 ` Wei Fang
2026-11-27 11:20 ` [PATCH v8 net-next 0/9] net: dsa: netc: add PTP support for NETC switch patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa61e083-d6c0-40d2-b25a-f83cad368397@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=richardcochran@gmail.com \
--cc=wei.fang@nxp.com \
--cc=wei.fang@oss.nxp.com \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox