diff options
| author | Song Yoong Siang <yoong.siang.song@intel.com> | 2025-02-16 17:34:26 +0800 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2025-02-20 15:13:45 -0800 |
| commit | ca4419f15abd19ba8be1e109661b60f9f5b6c9f0 (patch) | |
| tree | 144ff9485119fcb5a236f8886a2c79846669d56c /net/xdp | |
| parent | 68b92ac494eb767cff5826372328c10e24b2e25a (diff) | |
| download | linux-ca4419f15abd19ba8be1e109661b60f9f5b6c9f0.tar.gz linux-ca4419f15abd19ba8be1e109661b60f9f5b6c9f0.tar.bz2 linux-ca4419f15abd19ba8be1e109661b60f9f5b6c9f0.zip | |
xsk: Add launch time hardware offload support to XDP Tx metadata
Extend the XDP Tx metadata framework so that user can requests launch time
hardware offload, where the Ethernet device will schedule the packet for
transmission at a pre-determined time called launch time. The value of
launch time is communicated from user space to Ethernet driver via
launch_time field of struct xsk_tx_metadata.
Suggested-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250216093430.957880-2-yoong.siang.song@intel.com
Diffstat (limited to 'net/xdp')
| -rw-r--r-- | net/xdp/xsk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 89d2bef96469..41093ea63700 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -742,6 +742,9 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, goto free_err; } } + + if (meta->flags & XDP_TXMD_FLAGS_LAUNCH_TIME) + skb->skb_mstamp_ns = meta->request.launch_time; } } |
