Re: [RFC bpf-next 2/5] libbpf: SO_TXTIME support in AF_XDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 3, 2021 at 10:10 AM Kishen Maloor <kishen.maloor@xxxxxxxxx> wrote:
>
> This change adds userspace support for SO_TXTIME in AF_XDP
> to include a specific TXTIME (aka "Launch Time")
> with XDP frames issued from userspace XDP applications.
>
> The userspace API has been expanded with two helper functons:
>
> - int xsk_socket__enable_so_txtime(struct xsk_socket *xsk, bool enable)
>    Sets the SO_TXTIME option on the AF_XDP socket (using setsockopt()).
>
> - void xsk_umem__set_md_txtime(void *umem_area, __u64 chunkAddr,
>                                __s64 txtime)
>    Packages the application supplied TXTIME into struct xdp_user_tx_metadata:
>    struct xdp_user_tx_metadata {
>         __u64 timestamp;
>         __u32 md_valid;
>         __u32 btf_id;
>    };
>    and stores it in the XDP metadata area, which precedes the XDP frame.
>
> Signed-off-by: Kishen Maloor <kishen.maloor@xxxxxxxxx>
> ---

Same comments as in [0] regarding the AF_XDP APIs in libbpf.

  [0] https://lore.kernel.org/bpf/CAEf4BzZ44wc-+r6o7vthddt5BoePdg0cQn83g8qkyPMAca4vvA@xxxxxxxxxxxxxx/

>  tools/include/uapi/linux/if_xdp.h     |  2 ++
>  tools/include/uapi/linux/xdp_md_std.h | 14 ++++++++++++++
>  tools/lib/bpf/xsk.h                   | 27 ++++++++++++++++++++++++++-
>  3 files changed, 42 insertions(+), 1 deletion(-)
>  create mode 100644 tools/include/uapi/linux/xdp_md_std.h
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux