Re: [PATCH bpf-next] bpf: Add BPF-helper for accessing CLOCK_TAI

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

 



On Wed, Aug 3, 2022 at 11:40 PM Kurt Kanzenbach <kurt@xxxxxxxxxxxxx> 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.



[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