[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k07o1pfw.fsf@kurt>
Date: Thu, 04 Aug 2022 08:40:51 +0200
From: Kurt Kanzenbach <kurt@...utronix.de>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
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 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!
Download attachment "signature.asc" of type "application/pgp-signature" (862 bytes)
Powered by blists - more mailing lists