On Mon, May 15, 2023 at 10:38:44AM +0100, Daniel P. Berrangé wrote:
>
> > -static bool virtio_net_load_ebpf(VirtIONet *n)
> > +static bool virtio_net_load_ebpf_fds(VirtIONet *n, Error **errp)
> > {
> > - if (!virtio_net_attach_ebpf_to_backend(n->nic, -1)) {
> > - /* backend does't support steering ebpf */
> > - return false;
> > + int fds[EBPF_RSS_MAX_FDS] = { [0 ... EBPF_RSS_MAX_FDS - 1] = -1};
>
> Interesting, I didn't realize this initialization syntax was possible !
It's not standard, but if both gcc and clang support it, it would not
be the first time we've relied on useful compiler extensions.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org