[DTrace-devel] [PATCH 08/12] Remove libbpf dependency

Eugene Loh eugene.loh at oracle.com
Sat Jul 16 20:52:15 UTC 2022


Again, sorry for the weirdly formatted replies:  this is another patch 
that never appeared in my inbox.

Reviewed-by: Eugene Loh <eugene.loh at oracle.com>

A few comments:

*)  In file CODING-STYLE, the last three lines can be removed.
     They are (including a blank line):

         Code in libbpf/ need not conform to the guidelines in this 
document, since
         we expect not to retain that code in the long term.

*)  In libdtrace/dt_bpf.c, you comment out

         /* #include <bpf.h> */

     That line can be removed entirely.

*)  In libdtrace/dt_bpf.c, in dt_bpf_prog_load(), you have

         do {
                 fd = bpf(BPF_PROG_LOAD, &attr);
         } while (fd < 0 && errno == EAGAIN);

     I do not see the EAGAIN case documented in the bpf() man page.
     Where is this behavior described?

     Also, do we really want an endless loop here?  Maybe there should
     be a time-out or a limited number of retries?

*)  Finally, it's a little confusing to have both dt_bpf_load_prog() and
     dt_bpf_prog_load(), but perhaps the confusion is worth the hassle of
     coming up with different names and changing stuff.  I don't know.
     It looks funny, but can stay the way it is.




More information about the DTrace-devel mailing list