All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Mohsin Bashir <mohsin.bashr@gmail.com>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	 netdev@vger.kernel.org
Cc: davem@davemloft.net,  kuba@kernel.org,  edumazet@google.com,
	 pabeni@redhat.com,  horms@kernel.org,  andrew@lunn.ch,
	 Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next v2 1/7] net: ethtool: add hardware pacing offload support to rings
Date: Thu, 23 Jul 2026 17:29:14 -0400	[thread overview]
Message-ID: <willemdebruijn.kernel.9e5ac85b024@gmail.com> (raw)
In-Reply-To: <9c0a0bb5-737b-41b7-828c-1953d885fb1c@gmail.com>

Mohsin Bashir wrote:
> 
> 
> On 7/22/26 1:43 PM, Willem de Bruijn wrote:
> > From: Willem de Bruijn <willemb@google.com>
> > 
> > Add two ethtool rings operations:
> > 
> > - get pacing offload horizon: active and max
> > - set pacing offload horizon: active
> > 
> > Replace u64 max_pacing_offload_horizon with u32 active and max fields.
> > This occupies the same original 8 bytes. Reduce precision from nsec to
> > usec, which is sufficient.
> > 
> > Update the FQ scheduler to test against the active limit instead of
> > max. It is the administrator responsibility to set the active limit
> > before installing FQ.
> > 
> > Assisted-by: Gemini:gemini-3
> > Signed-off-by: Willem de Bruijn <willemb@google.com>
> > 
> 
> If I understand it correctly, the horizon lives in dev and is read at Tx 
> time, so it shouldn't require touching ring config. But some drivers 
> reallocate rings unconditionally in set_ringparam. Can we highlight 
> somewhere (maybe in commit message) that a horizon-only change is meant 
> to be non-disruptive? I may be missing the underlying reason though.

What do you mean by underlying reason? 

> > @@ -281,6 +301,9 @@ ethnl_set_rings(struct ethnl_req_info *req_info, struct genl_info *info)
> >   		err_attr = tb[ETHTOOL_A_RINGS_TX];
> >   	else if (kernel_ringparam.hds_thresh > kernel_ringparam.hds_thresh_max)
> >   		err_attr = tb[ETHTOOL_A_RINGS_HDS_THRESH];
> > +	else if (kernel_ringparam.pacing_offload_horizon >
> > +		 kernel_ringparam.max_pacing_offload_horizon)
> > +		err_attr = tb[ETHTOOL_A_RINGS_PACING_OFFLOAD_HORIZON];
> >   	else
> >   		err_attr = NULL;
> >   	if (err_attr) {
> > @@ -302,6 +325,9 @@ ethnl_set_rings(struct ethnl_req_info *req_info, struct genl_info *info)
> >   
> >   	ret = dev->ethtool_ops->set_ringparam(dev, &ringparam,
> >   					      &kernel_ringparam, info->extack);
> > +	if (!ret)
> > +		dev->pacing_offload_horizon = kernel_ringparam.pacing_offload_horizon;
> 
> Since a driver may be reading dev->pacing_offload_horizon on the hotpath 
> without a lock, should we use WRITE_ONCE() here? and have the driver use 
> READ_ONCE()?

Will fix in v3

  reply	other threads:[~2026-07-23 21:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 20:43 [PATCH net-next v2 0/7] hardware pacing offload Willem de Bruijn
2026-07-22 20:43 ` [PATCH net-next v2 1/7] net: ethtool: add hardware pacing offload support to rings Willem de Bruijn
2026-07-23 14:16   ` Mohsin Bashir
2026-07-23 21:29     ` Willem de Bruijn [this message]
2026-07-23 22:11       ` Mohsin Bashir
2026-07-22 20:43 ` [PATCH net-next v2 2/7] net_sched: sch_fq: clear past skb->tstamp if offloading pacing Willem de Bruijn
2026-07-22 20:43 ` [PATCH net-next v2 3/7] idpf: support pacing offload Willem de Bruijn
2026-07-23 14:32   ` Mohsin Bashir
2026-07-23 21:27     ` Willem de Bruijn
2026-07-22 20:43 ` [PATCH net-next v2 4/7] selftests: drv-net: refactor so_txtime errqueue handling Willem de Bruijn
2026-07-23 14:40   ` Mohsin Bashir
2026-07-22 20:43 ` [PATCH net-next v2 5/7] selftests: drv-net: in so_txtime tell apart sw from hw pacing Willem de Bruijn
2026-07-22 20:43 ` [PATCH net-next v2 6/7] selftests: drv-net: extend so_txtime with hw offload Willem de Bruijn
2026-07-22 20:43 ` [PATCH net-next v2 7/7] net: pktgen: add support for SO_TXTIME Willem de Bruijn
2026-07-23 14:12 ` [PATCH net-next v2 0/7] hardware pacing offload Mohsin Bashir

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=willemdebruijn.kernel.9e5ac85b024@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.