From: Paolo Abeni <pabeni@redhat.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
horms@kernel.org, andrew@lunn.ch,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next 7/7] net: pktgen: add support for SO_TXTIME
Date: Fri, 10 Jul 2026 17:20:03 +0200 [thread overview]
Message-ID: <aa56a163-7333-4559-86be-ac40a806fa07@redhat.com> (raw)
In-Reply-To: <20260706133433.3142805-8-willemdebruijn.kernel@gmail.com>
On 7/6/26 3:34 PM, Willem de Bruijn wrote:
> @@ -1141,6 +1157,49 @@ static ssize_t pktgen_if_write(struct file *file,
> (unsigned long long) pkt_dev->delay);
> return count;
> }
> + if (!strcmp(name, "txtime_delay")) {
> + max = min(10, count - i);
> + len = num_arg(&user_buffer[i], max, &value);
> + if (len < 0)
> + return len;
> +
> + /* in queue_xmit mode fq may clear tstamp, do not reuse skb */
> + if (value > 0 && pkt_dev->clone_skb > 0)
> + return -EINVAL;
> +
> + pkt_dev->txtime_delay = (u64)value;
It looks like `pkt_dev->txtime_delay` access pattern is the same way as
`pkt_dev->txtime_clockid,`. I think WRITE_ONCE() is needed here, and
READ_ONCE() in pktgen_xmit().
> @@ -3557,6 +3633,14 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
> }
> pkt_dev->last_pkt_size = pkt_dev->skb->len;
> pkt_dev->clone_count = 0; /* reset counter */
> +
> + if (pkt_dev->flags & F_TXTIME && pkt_dev->txtime_delay) {
`pkt_dev->flags` is accessed at the beginning of this function with a
READ_ONCE. I think it should be better to consolidate the two reads.
/P
prev parent reply other threads:[~2026-07-10 15:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 13:34 [PATCH net-next 0/7] hardware pacing offload Willem de Bruijn
2026-07-06 13:34 ` [PATCH net-next 1/7] net: ethtool: add hardware pacing offload support to rings Willem de Bruijn
2026-07-06 13:34 ` [PATCH net-next 2/7] net_sched: sch_fq: clear past skb->tstamp if offloading pacing Willem de Bruijn
2026-07-06 13:34 ` [PATCH net-next 3/7] idpf: support pacing offload Willem de Bruijn
2026-07-10 15:04 ` Paolo Abeni
2026-07-10 21:37 ` Tony Nguyen
2026-07-11 20:13 ` Willem de Bruijn
2026-07-06 13:34 ` [PATCH net-next 4/7] selftests: drv-net: refactor so_txtime errqueue handling Willem de Bruijn
2026-07-06 13:34 ` [PATCH net-next 5/7] selftests: drv-net: in so_txtime tell apart sw from hw pacing Willem de Bruijn
2026-07-06 13:34 ` [PATCH net-next 6/7] selftests: drv-net: extend so_txtime with hw offload Willem de Bruijn
2026-07-10 15:26 ` Paolo Abeni
2026-07-06 13:34 ` [PATCH net-next 7/7] net: pktgen: add support for SO_TXTIME Willem de Bruijn
2026-07-10 15:20 ` Paolo Abeni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa56a163-7333-4559-86be-ac40a806fa07@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.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