From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: 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 15:11:31 -0700 [thread overview]
Message-ID: <c55b6309-10ce-4074-a70f-64f58af2591b@gmail.com> (raw)
In-Reply-To: <willemdebruijn.kernel.9e5ac85b024@gmail.com>
On 7/23/26 2:29 PM, Willem de Bruijn wrote:
> 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?
>
So I meant, beyond just exposing the horizon through ethtool, if there
is no reason to touch ring config while updating horizon, a note about
it being non-disruptive would help.
>>> @@ -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
next prev parent reply other threads:[~2026-07-23 22:11 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
2026-07-23 22:11 ` Mohsin Bashir [this message]
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=c55b6309-10ce-4074-a70f-64f58af2591b@gmail.com \
--to=mohsin.bashr@gmail.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=pabeni@redhat.com \
--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