On Fri, Sep 6, 2024 at 2:13 AM Daniel P. Berrangé <berra...@redhat.com> wrote:
>
> The eBPF code is currently reporting error messages through trace
> events. Trace events are fine for debugging, but they are not to be
> considered the primary error reporting mechanism, as their output
> is inaccessible to callers.
>
> This adds an "Error **errp" parameter to all methods which have
> important error scenarios to report to the caller.
>
> Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>

This doesn't compile:

[3/84] Compiling C object libcommon.a.p/ebpf_ebpf_rss-stub.c.o
FAILED: libcommon.a.p/ebpf_ebpf_rss-stub.c.o
cc -m64 -Ilibcommon.a.p -Isubprojects/dtc/libfdt
-I../subprojects/dtc/libfdt -Isubprojects/slirp -I../subprojects/slirp
-I../subprojects/slirp/src -Isubprojects/libvduse
-I../subprojects/libvduse -I/usr/include/pixman-1
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid
-I/usr/include/gio-unix-2.0 -fdiagnostics-color=auto -Wall
-Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong
-Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-security
-Wformat-y2k -Wignored-qualifiers -Wimplicit-fallthrough=2 -Winit-self
-Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs
-Wold-style-declaration -Wold-style-definition -Wredundant-decls
-Wshadow=local -Wstrict-prototypes -Wtype-limits -Wundef -Wvla
-Wwrite-strings -Wno-missing-include-dirs -Wno-psabi
-Wno-shift-negative-value -isystem /home/devel/git/qemu/linux-headers
-isystem linux-headers -iquote . -iquote /home/devel/git/qemu -iquote
/home/devel/git/qemu/include -iquote
/home/devel/git/qemu/host/include/x86_64 -iquote
/home/devel/git/qemu/host/include/generic -iquote
/home/devel/git/qemu/tcg/i386 -pthread -mcx16 -msse2 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing
-fno-common -fwrapv -fzero-call-used-regs=used-gpr -fPIE
-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1 -MD -MQ
libcommon.a.p/ebpf_ebpf_rss-stub.c.o -MF
libcommon.a.p/ebpf_ebpf_rss-stub.c.o.d -o
libcommon.a.p/ebpf_ebpf_rss-stub.c.o -c ../ebpf/ebpf_rss-stub.c
../ebpf/ebpf_rss-stub.c:26:6: error: conflicting types for
‘ebpf_rss_load’; have ‘_Bool(struct EBPFRSSContext *)’
   26 | bool ebpf_rss_load(struct EBPFRSSContext *ctx)
      |      ^~~~~~~~~~~~~
In file included from ../ebpf/ebpf_rss-stub.c:14:
/home/devel/git/qemu/ebpf/ebpf_rss.h:46:6: note: previous declaration
of ‘ebpf_rss_load’ with type ‘_Bool(struct EBPFRSSContext *, Error
**)’
   46 | bool ebpf_rss_load(struct EBPFRSSContext *ctx, Error **errp);
      |      ^~~~~~~~~~~~~
../ebpf/ebpf_rss-stub.c:31:6: error: conflicting types for
‘ebpf_rss_load_fds’; have ‘_Bool(struct EBPFRSSContext *, int,  int,
int,  int)’
   31 | bool ebpf_rss_load_fds(struct EBPFRSSContext *ctx, int program_fd,
      |      ^~~~~~~~~~~~~~~~~
In file included from ../ebpf/ebpf_rss-stub.c:14:
/home/devel/git/qemu/ebpf/ebpf_rss.h:48:6: note: previous declaration
of ‘ebpf_rss_load_fds’ with type ‘_Bool(struct EBPFRSSContext *, int,
int,  int,  int,  Error **)’
   48 | bool ebpf_rss_load_fds(struct EBPFRSSContext *ctx, int program_fd,
      |      ^~~~~~~~~~~~~~~~~
../ebpf/ebpf_rss-stub.c:37:6: error: conflicting types for
‘ebpf_rss_set_all’; have ‘_Bool(struct EBPFRSSContext *, struct
EBPFRSSConfig *, uint16_t *, uint8_t *)’ {aka ‘_Bool(struct
EBPFRSSContext *, struct EBPFRSSConfig *, short unsigned int *,
unsigned char *)’}
   37 | bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct
EBPFRSSConfig *config,
      |      ^~~~~~~~~~~~~~~~
In file included from ../ebpf/ebpf_rss-stub.c:14:
/home/devel/git/qemu/ebpf/ebpf_rss.h:52:6: note: previous declaration
of ‘ebpf_rss_set_all’ with type ‘_Bool(struct EBPFRSSContext *, struct
EBPFRSSConfig *, uint16_t *, uint8_t *, Error **)’ {aka ‘_Bool(struct
EBPFRSSContext *, struct EBPFRSSConfig *, short unsigned int *,
unsigned char *, Error **)’}
   52 | bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct
EBPFRSSConfig *config,
      |      ^~~~~~~~~~~~~~~~

Thanks


Reply via email to