mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
idpf: support pacing offload
If skb->tstamp is in the future, program this future delivery txtime in the transmit descriptor. TCP pacing offload is only offloaded if SK_PACING_FQ is negotiated and the FQ offload_horizon is configured. But device support for pacing offload must be more robust: it can also be reached through SO_TXTIME. Bounds check txtime. Only packets with timestamp between now and the horizon (max_pacing_offload_horizon) are offloaded when pacing offload is enabled on the device via pacing_offload. Negotiate the feature with the device using virtchnl. Support is conditional on - splitq mode, where tx and tx completion queues are separate, so completions can be returned out of order. - flow scheduling mode, where completions can arrive out of order. - PTP to ensure the NIC clock is synced to CLOCK_TAI. These features are negotiated per adapter, but expect all vports to uniformly request splitq (req_[rt]x_splitq) and flow scheduling (flow_sch_en) when available. Packets beyond the horizon are sent immediately with the overflow bit set. On device reset, EDT capabilities are re-negotiated with firmware. If re-negotiation succeeds, dev->max_pacing_offload_horizon is refreshed. If pacing offload is no longer supported, dev->max_pacing_offload_horizon is set to 0. Must not be called from netpoll due to ktime_get. But netpoll does not generate packets with EDT, so no explicit test is needed. Do not fail device initialization on EDT init error. Log an error, but continue without EDT, similar to PTP. Cc: Tony Nguyen <anthony.l.nguyen@intel.com> Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com> Cc: Joshua A Hay <joshua.a.hay@intel.com> Cc: intel-wired-lan@lists.osuosl.org Cc: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260910171131.2532487-5-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e628a85c69
commit
4aa8b5cade
5 changed files with 165 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue