Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / qapi / ebpf.json
blobe500b5a744e1a41b646f24559e192ca8fdc1a630
1 # -*- Mode: Python -*-
2 # vim: filetype=python
4 # This work is licensed under the terms of the GNU GPL, version 2 or later.
5 # See the COPYING file in the top-level directory.
7 ##
8 # = eBPF Objects
10 # eBPF object is an ELF binary that contains the eBPF program and eBPF
11 # map description(BTF). Overall, eBPF object should contain the
12 # program and enough metadata to create/load eBPF with libbpf.  As the
13 # eBPF maps/program should correspond to QEMU, the eBPF can't be used
14 # from different QEMU build.
16 # Currently, there is a possible eBPF for receive-side scaling (RSS).
20 # @EbpfObject:
22 # An eBPF ELF object.
24 # @object: the eBPF object encoded in base64
26 # Since: 9.0
28 { 'struct': 'EbpfObject',
29   'data': {'object': 'str'},
30   'if': 'CONFIG_EBPF' }
33 # @EbpfProgramID:
35 # The eBPF programs that can be gotten with request-ebpf.
37 # @rss: Receive side scaling, technology that allows steering traffic
38 #     between queues by calculation hash.  Users may set up
39 #     indirection table and hash/packet types configurations.  Used
40 #     with virtio-net.
42 # Since: 9.0
44 { 'enum': 'EbpfProgramID',
45   'if': 'CONFIG_EBPF',
46   'data': [ { 'name': 'rss' } ] }
49 # @request-ebpf:
51 # Retrieve an eBPF object that can be loaded with libbpf.  Management
52 # applications (e.g. libvirt) may load it and pass file descriptors to
53 # QEMU, so they can run running QEMU without BPF capabilities.
55 # @id: The ID of the program to return.
57 # Returns: eBPF object encoded in base64.
59 # Since: 9.0
61 { 'command': 'request-ebpf',
62   'data': { 'id': 'EbpfProgramID' },
63   'returns': 'EbpfObject',
64   'if': 'CONFIG_EBPF' }