[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZmoEn+ARbW+mt4k=68+YJqkUELAFPMAjHN893YL3B9OA@mail.gmail.com>
Date: Mon, 8 Aug 2022 17:28:40 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Kurt Kanzenbach <kurt@...utronix.de>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Jesper Dangaard Brouer <jbrouer@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Joanne Koong <joannelkoong@...il.com>,
Jiri Olsa <jolsa@...nel.org>,
Dave Marchevsky <davemarchevsky@...com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Geliang Tang <geliang.tang@...e.com>,
Jakub Sitnicki <jakub@...udflare.com>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Add BPF-helper for accessing CLOCK_TAI
On Wed, Aug 3, 2022 at 11:40 PM Kurt Kanzenbach <kurt@...utronix.de> wrote:
>
> On Wed Aug 03 2022, Andrii Nakryiko wrote:
> >> +void test_tai(void)
> >> +{
> >> + struct __sk_buff skb = {
> >> + .tstamp = 0,
> >> + .hwtstamp = 0,
> >> + };
> >> + LIBBPF_OPTS(bpf_test_run_opts, topts,
> >> + .data_in = &pkt_v4,
> >> + .data_size_in = sizeof(pkt_v4),
> >> + .ctx_in = &skb,
> >> + .ctx_size_in = sizeof(skb),
> >> + .ctx_out = &skb,
> >> + .ctx_size_out = sizeof(skb),
> >> + );
> >> + struct timespec now_tai;
> >> + struct bpf_object *obj;
> >> + int ret, prog_fd;
> >> +
> >> + ret = bpf_prog_test_load("./test_tai.o",
> >> + BPF_PROG_TYPE_SCHED_CLS, &obj, &prog_fd);
> >
> > it would be best to rely on BPF skeleton, please see other tests
> > including *.skel.h, thanks
> >
>
> Ah, nice. Adjusted the test case accordingly. Will post v2 after the
> merge window. Thanks!
We don't close bpf-next during the merge window, so feel free to send v2 early.
Powered by blists - more mailing lists