qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/6] virtio-net: Added property to load eBPF RSS with fds.


From: Eric Blake
Subject: Re: [PATCH v2 3/6] virtio-net: Added property to load eBPF RSS with fds.
Date: Tue, 16 May 2023 16:21:33 -0500
User-agent: NeoMutt/20230512

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]