[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzY7kiXhLJktZg5aa2BU9yxZ1qzb925XO1mPW=qnu3qwgw@mail.gmail.com>
Date: Fri, 6 Aug 2021 16:08:59 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Kishen Maloor <kishen.maloor@...el.com>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [RFC bpf-next 2/5] libbpf: SO_TXTIME support in AF_XDP
On Tue, Aug 3, 2021 at 10:10 AM Kishen Maloor <kishen.maloor@...el.com> 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@...el.com>
> ---
Same comments as in [0] regarding the AF_XDP APIs in libbpf.
[0] https://lore.kernel.org/bpf/CAEf4BzZ44wc-+r6o7vthddt5BoePdg0cQn83g8qkyPMAca4vvA@mail.gmail.com/
> 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
>
[...]
Powered by blists - more mailing lists