Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Kishen Maloor <kishen.maloor@intel.com>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
	"Jesper Dangaard Brouer" <hawk@kernel.org>,
	"Magnus Karlsson" <magnus.karlsson@intel.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [RFC bpf-next 2/5] libbpf: SO_TXTIME support in AF_XDP
Date: Fri, 6 Aug 2021 16:08:59 -0700	[thread overview]
Message-ID: <CAEf4BzY7kiXhLJktZg5aa2BU9yxZ1qzb925XO1mPW=qnu3qwgw@mail.gmail.com> (raw)
In-Reply-To: <20210803171006.13915-3-kishen.maloor@intel.com>

On Tue, Aug 3, 2021 at 10:10 AM Kishen Maloor <kishen.maloor@intel.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@intel.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
>

[...]

  reply	other threads:[~2021-08-06 23:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 17:10 [RFC bpf-next 0/5] " Kishen Maloor
2021-08-03 17:10 ` [RFC bpf-next 1/5] net: xdp: " Kishen Maloor
2021-08-03 17:10 ` [RFC bpf-next 2/5] libbpf: " Kishen Maloor
2021-08-06 23:08   ` Andrii Nakryiko [this message]
2021-08-18  9:49   ` Jesper Dangaard Brouer
2021-08-19 19:32     ` Kishen Maloor
2021-08-03 17:10 ` [RFC bpf-next 3/5] igc: Launchtime support in XDP Tx ZC path Kishen Maloor
2021-08-05 17:53   ` Kishen Maloor
2021-08-03 17:10 ` [RFC bpf-next 4/5] samples/bpf/xdpsock_user.c: Make get_nsecs() generic Kishen Maloor
2021-08-03 17:10 ` [RFC bpf-next 5/5] samples/bpf/xdpsock_user.c: Launchtime/TXTIME API usage Kishen Maloor
2021-08-18  8:54   ` Jesper Dangaard Brouer
2021-08-19 19:32     ` Kishen Maloor

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='CAEf4BzY7kiXhLJktZg5aa2BU9yxZ1qzb925XO1mPW=qnu3qwgw@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=hawk@kernel.org \
    --cc=kishen.maloor@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=toke@redhat.com \
    --subject='Re: [RFC bpf-next 2/5] libbpf: SO_TXTIME support in AF_XDP' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).