[PATCH v2 1/1] ebpf: Added traces back. Changed source set for eBPF to 'system'.

2024-04-22 Thread Andrew Melnychenko
There was an issue with Qemu build with "--disable-system". The traces could be generated and the build fails. The traces were 'cut out' for previous patches, and overall, the 'system' source set should be used like in pre-'eBPF blob' patches. Signed-off-by: Andrew Melnychenko

[PATCH 1/1] ebpf: Added traces back. Changed source set for eBPF to 'system'.

2024-03-29 Thread Andrew Melnychenko
There was an issue with Qemu build with "--disable-system". The traces could be generated and the build fails. The traces were 'cut out' for previous patches, and overall, the 'system' source set should be used like in pre-'eBPF blob' patches. Signed-off-by: Andrew Melnychenko

[PATCH v9 4/5] qmp: Added new command to retrieve eBPF blob.

2024-02-05 Thread Andrew Melnychenko
U. Overall, requesting the eBPF object from QEMU itself solves possible failures with acceptable effort. Links: [PATCH 3/5] qmp: Added the helper stamp check. https://lore.kernel.org/all/20230219162100.174318-4-and...@daynix.com/ Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c

[PATCH v9 2/5] ebpf: Added eBPF initialization by fds.

2024-02-05 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v9 0/5] eBPF RSS through QMP support.

2024-02-05 Thread Andrew Melnychenko
virtio-net Changes since v1: * refactored virtio-net * moved hunks for ebpf mmap() * added qmp enum for eBPF id. Andrew Melnychenko (5): ebpf: Added eBPF map update through mmap. ebpf: Added eBPF initialization by fds. virtio-net: Added property to load eBPF RSS with fds. qmp: Added n

[PATCH v9 5/5] ebpf: Updated eBPF program and skeleton.

2024-02-05 Thread Andrew Melnychenko
- some TCP/UDP packets may be considered fragmented if DF flag is set. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1343 --- meson.build | 10 +- tools/ebpf/rss.bpf.c|7 +- 3 files changed, 687 insertions(+), 673

[PATCH v9 3/5] virtio-net: Added property to load eBPF RSS with fds.

2024-02-05 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 54

[PATCH v9 1/5] ebpf: Added eBPF map update through mmap.

2024-02-05 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

[PATCH v8 2/5] ebpf: Added eBPF initialization by fds.

2024-01-25 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 9 +++-- ebpf/ebpf_rss.c | 27

[PATCH v8 0/5] eBPF RSS through QMP support.

2024-01-25 Thread Andrew Melnychenko
red virtio-net * moved hunks for ebpf mmap() * added qmp enum for eBPF id. Andrew Melnychenko (5): ebpf: Added eBPF map update through mmap. ebpf: Added eBPF initialization by fds. virtio-net: Added property to load eBPF RSS with fds. qmp: Added new command to retrieve eBPF blob. ebp

[PATCH v8 1/5] ebpf: Added eBPF map update through mmap.

2024-01-25 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 120

[PATCH v8 5/5] ebpf: Updated eBPF program and skeleton.

2024-01-25 Thread Andrew Melnychenko
- some TCP/UDP packets may be considered fragmented if DF flag is set. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1343 --- meson.build | 10 +- tools/ebpf/rss.bpf.c|7 +- 3 files changed, 687 insertions(+), 673

[PATCH v8 4/5] qmp: Added new command to retrieve eBPF blob.

2024-01-25 Thread Andrew Melnychenko
U. Overall, requesting the eBPF object from QEMU itself solves possible failures with acceptable effort. Links: [PATCH 3/5] qmp: Added the helper stamp check. https://lore.kernel.org/all/20230219162100.174318-4-and...@daynix.com/ Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c

[PATCH v8 3/5] virtio-net: Added property to load eBPF RSS with fds.

2024-01-25 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 63

[PATCH v7 5/5] ebpf: Updated eBPF program and skeleton.

2023-08-31 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Added check for BPF_F_MMAPABLE flag to meson script and requirements to libbpf version. Signed-off-by: Andrew Melnychenko

[PATCH v7 2/5] ebpf: Added eBPF initialization by fds.

2023-08-31 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v7 3/5] virtio-net: Added property to load eBPF RSS with fds.

2023-08-31 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55

[PATCH v7 0/5] eBPF RSS through QMP support.

2023-08-31 Thread Andrew Melnychenko
with the build if bpf disabled * rebased to the last master * refactored according to review Changes since v2: * moved/refactored QMP command * refactored virtio-net Changes since v1: * refactored virtio-net * moved hunks for ebpf mmap() * added qmp enum for eBPF id. Andrew Melnychenko (5

[PATCH v7 1/5] ebpf: Added eBPF map update through mmap.

2023-08-31 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

[PATCH v7 4/5] qmp: Added new command to retrieve eBPF blob.

2023-08-31 Thread Andrew Melnychenko
U. Overall, requesting the eBPF object from QEMU itself solves possible failures with acceptable effort. Links: [PATCH 3/5] qmp: Added the helper stamp check. https://lore.kernel.org/all/20230219162100.174318-4-and...@daynix.com/ Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c

[PATCH v6 1/5] ebpf: Added eBPF map update through mmap.

2023-08-08 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

[PATCH v6 5/5] ebpf: Updated eBPF program and skeleton.

2023-08-08 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Which would require kernel 5.5+. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1460

[PATCH v6 4/5] qmp: Added new command to retrieve eBPF blob.

2023-08-08 Thread Andrew Melnychenko
U. Overall, requesting the eBPF object from QEMU itself solves possible failures with acceptable effort. Links: [PATCH 3/5] qmp: Added the helper stamp check. https://lore.kernel.org/all/20230219162100.174318-4-and...@daynix.com/ Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c

[PATCH v6 2/5] ebpf: Added eBPF initialization by fds.

2023-08-08 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v6 0/5] eBPF RSS through QMP support.

2023-08-08 Thread Andrew Melnychenko
command * refactored virtio-net Changes since v1: * refactored virtio-net * moved hunks for ebpf mmap() * added qmp enum for eBPF id. Andrew Melnychenko (5): ebpf: Added eBPF map update through mmap. ebpf: Added eBPF initialization by fds. virtio-net: Added property to load eBPF RSS

[PATCH v6 3/5] virtio-net: Added property to load eBPF RSS with fds.

2023-08-08 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55

[PATCH v5 5/5] ebpf: Updated eBPF program and skeleton.

2023-08-02 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1460 --- tools/ebpf

[PATCH v5 3/5] virtio-net: Added property to load eBPF RSS with fds.

2023-08-02 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55

[PATCH v5 2/5] ebpf: Added eBPF initialization by fds.

2023-08-02 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v5 4/5] qmp: Added new command to retrieve eBPF blob.

2023-08-02 Thread Andrew Melnychenko
U. Overall, requesting the eBPF object from QEMU itself solves possible failures with acceptable effort. Links: [PATCH 3/5] qmp: Added the helper stamp check. https://lore.kernel.org/all/20230219162100.174318-4-and...@daynix.com/ Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c

[PATCH v5 1/5] ebpf: Added eBPF map update through mmap.

2023-08-02 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

[PATCH v5 0/5] eBPF RSS through QMP support.

2023-08-02 Thread Andrew Melnychenko
since v1: * refactored virtio-net * moved hunks for ebpf mmap() * added qmp enum for eBPF id. Andrew Melnychenko (5): ebpf: Added eBPF map update through mmap. ebpf: Added eBPF initialization by fds. virtio-net: Added property to load eBPF RSS with fds. qmp: Added new command to retrieve

[PATCH v4 5/6] qmp: Added new command to retrieve eBPF blob.

2023-07-13 Thread Andrew Melnychenko
g the eBPF object from QEMU itself solves possible failures with very little effort. Links: [PATCH 3/5] qmp: Added the helper stamp check. https://lore.kernel.org/all/20230219162100.174318-4-and...@daynix.com/ Signed-off-by: Andrew Melnychenko --- qapi/ebpf.json

[PATCH v4 4/6] ebpf: Added declaration/initialization routines.

2023-07-13 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id. It would require for future qmp commands that may require specific eBPF blob. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 70 ebpf/ebpf.h | 31 + ebpf

[PATCH v4 2/6] ebpf: Added eBPF initialization by fds.

2023-07-13 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v4 1/6] ebpf: Added eBPF map update through mmap.

2023-07-13 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

[PATCH v4 6/6] ebpf: Updated eBPF program and skeleton.

2023-07-13 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730

[PATCH v4 0/6] eBPF RSS through QMP support.

2023-07-13 Thread Andrew Melnychenko
for eBPF id. Andrew Melnychenko (6): ebpf: Added eBPF map update through mmap. ebpf: Added eBPF initialization by fds. virtio-net: Added property to load eBPF RSS with fds. ebpf: Added declaration/initialization routines. qmp: Added new command to retrieve eBPF blob. ebpf: Updated eBPF

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

2023-07-13 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55

[PATCH v3 2/6] ebpf: Added eBPF initialization by fds.

2023-06-14 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v3 1/6] ebpf: Added eBPF map update through mmap.

2023-06-14 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

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

2023-06-14 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55

[PATCH v3 4/6] ebpf: Added declaration/initialization routines.

2023-06-14 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id. It would require for future qmp commands that may require specific eBPF blob. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 70 ebpf/ebpf.h | 31 + ebpf

[PATCH v3 6/6] ebpf: Updated eBPF program and skeleton.

2023-06-14 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730

[PATCH v3 5/6] qmp: Added new command to retrieve eBPF blob.

2023-06-14 Thread Andrew Melnychenko
Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in the future with libbpf. Signed-off-by: Andrew Melnychenko --- qapi/ebpf.json

[PATCH v3 0/6] eBPF RSS through QMP support.

2023-06-14 Thread Andrew Melnychenko
) Changes since v2: * moved/refactored QMP command * refactored virtio-net Changes since v1: * refactored virtio-net * moved hunks for ebpf mmap() * added qmp enum for eBPF id. Andrew Melnychenko (6): ebpf: Added eBPF map update through mmap. ebpf: Added eBPF initialization by fds. virtio-net

[PATCH v2 1/6] ebpf: Added eBPF map update through mmap.

2023-05-12 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117

[PATCH v2 6/6] ebpf: Updated eBPF program and skeleton.

2023-05-12 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730

[PATCH v2 4/6] ebpf: Added declaration/initialization routines.

2023-05-12 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id. It would require for future qmp commands that may require specific eBPF blob. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 54 ebpf/ebpf.h | 31 +++ ebpf

[PATCH v2 0/6] eBPF RSS through QMP support.

2023-05-12 Thread Andrew Melnychenko
through mmap() call, so it should not require additional capabilities to bpf* calls. eBPF file descriptors can be passed to QEMU from parent process or by unix socket with sendfd() qmp command. Changes since v1: * refactored code. * eBPF program ids implemented as enums Andrew Melnychenko (6): ebpf

[PATCH v2 5/6] qmp: Added new command to retrieve eBPF blob.

2023-05-12 Thread Andrew Melnychenko
Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in the future with libbpf. Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 16 qapi

[PATCH v2 2/6] ebpf: Added eBPF initialization by fds.

2023-05-12 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

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

2023-05-12 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55

[PATCH 3/5] ebpf: Added declaration/initialization routines.

2023-05-01 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id/name. It would require for future qmp commands that may require specific eBPF blob. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 54 ebpf/ebpf.h | 31

[PATCH 4/5] qmp: Added new command to retrieve eBPF blob.

2023-05-01 Thread Andrew Melnychenko
Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in the future with libbpf. Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 16 qapi

[PATCH 5/5] ebpf: Updated eBPF program and skeleton.

2023-05-01 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730

[PATCH 1/5] ebpf: Added eBPF initialization by fds and map update.

2023-05-01 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 +++ ebpf/ebpf_rss.c | 120

[PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2023-05-01 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 96

[PATCH 0/5] eBPF RSS through QMP support.

2023-05-01 Thread Andrew Melnychenko
) Andrew Melnychenko (5): ebpf: Added eBPF initialization by fds and map update. virtio-net: Added property to load eBPF RSS with fds. ebpf: Added declaration/initialization routines. qmp: Added new command to retrieve eBPF blob. ebpf: Updated eBPF program and skeleton. ebpf/ebpf.c

[RFC PATCH 3/5] ebpf: Added declaration/initialization routines.

2023-03-29 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id/name. It would require for future qmp commands that may require specific eBPF blob. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 48 ebpf/ebpf.h | 25 + ebpf

[RFC PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2023-03-29 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 77

[RFC PATCH 5/5] ebpf: Updated eBPF program and skeleton.

2023-03-29 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730

[RFC PATCH 4/5] qmp: Added new command to retrieve eBPF blob.

2023-03-29 Thread Andrew Melnychenko
Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in the future with libbpf. Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 17 + qapi

[RFC PATCH 1/5] ebpf: Added eBPF initialization by fds and map update.

2023-03-29 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 +++ ebpf/ebpf_rss.c | 120

[RFC PATCH 0/4] eBPF RSS through QMP support.

2023-03-29 Thread Andrew Melnychenko
. * Libvirt requests eBPF blob through QMP. * Libvirt loads blob for virtio-net. * Libvirt launches the QEMU with eBPF fds passed. Andrew Melnychenko (4): ebpf: Added eBPF initialization by fds and map update. virtio-net: Added property to load eBPF RSS with fds. ebpf: Added declaration

[PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2023-02-19 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 77

[PATCH 1/5] ebpf: Added eBPF initialization by fds and map update.

2023-02-19 Thread Andrew Melnychenko
by libvirt. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 +++ ebpf/ebpf_rss.c | 120 ++- ebpf/ebpf_rss.h | 10 3 files changed, 113 insertions(+), 23 deletions(-) diff --git a/ebpf/ebpf_rss-stub.c b/ebpf/ebpf_rss-stub.c

[PATCH 5/5] qmp: Added find-ebpf-rss-helper command.

2023-02-19 Thread Andrew Melnychenko
the stamp of the helper to make sure that eBPF program is valid. Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 28 qapi/misc.json | 42 ++ 2 files changed, 70 insertions(+) diff --git a/monitor/qmp-cmds.c b/monitor/

[PATCH 0/5] eBPF RSS Helper support.

2023-02-19 Thread Andrew Melnychenko
helper. Andrew Melnychenko (5): ebpf: Added eBPF initialization by fds and map update. virtio-net: Added property to load eBPF RSS with fds. qmp: Added the helper stamp check. ebpf_rss_helper: Added helper for eBPF RSS. qmp: Added find-ebpf-rss-helper command. ebpf/ebpf_rss-stub.c

[PATCH 3/5] qmp: Added the helper stamp check.

2023-02-19 Thread Andrew Melnychenko
Added a function to check the stamp in the helper. eBPF helper should have a special symbol that generates during the build. QEMU checks the helper and determines that it fits, so the helper will produce proper output. Signed-off-by: Andrew Melnychenko --- meson.build

[PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2023-02-19 Thread Andrew Melnychenko
. There is no reason yet to build eBPF loader and helper for non-Linux systems, even if libbpf is present. Signed-off-by: Andrew Melnychenko --- ebpf/qemu-ebpf-rss-helper.c | 132 meson.build | 37 ++ 2 files changed, 156 insertions(+), 13

[PATCH] e1000e: Added ICR clearing by corresponding IMS bit.

2021-08-18 Thread Andrew Melnychenko
ll, mostly because of different interrupt routines(ICR clears during register write). So, added ICR clearing during reading, according to the note by section 13.3.27 of the 8257X developers manual. Signed-off-by: Andrew Melnychenko --- hw/net/e1000e_core.c | 10 ++ hw/net/trace-events

[PATCH 1/5] ebpf: Added eBPF initialization by fds and map update.

2021-07-13 Thread Andrew Melnychenko
RSS maps are combined into one array map. Changed eBPF map updates through mmaped array. eBPF RSS context may be initialized by program fd and map fd. virtio-net may provide fds passed by libvirt. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c| 6 + ebpf/ebpf_rss.c

[PATCH 5/5] qmp: Added qemu-ebpf-rss-path command.

2021-07-13 Thread Andrew Melnychenko
Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 32 qapi/misc.json | 33 + 2 files changed, 65 insertions(+) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index f7d64a6457..c042ab5466 100644 --- a/monitor/

[PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-07-13 Thread Andrew Melnychenko
. There is no reason yet to build eBPF loader and helper for non Linux systems, even if libbpf is present. Signed-off-by: Andrew Melnychenko --- ebpf/qemu-ebpf-rss-helper.c | 130 meson.build | 37 ++ 2 files changed, 154 insertions(+), 13 deletions

[PATCH 3/5] qmp: Added the helper stamp check.

2021-07-13 Thread Andrew Melnychenko
Added function to check the stamp in the helper. eBPF helper should have a special symbol that generates during build. QEMU checks the helper and determinates that it fits, so the helper will produce proper output. Signed-off-by: Andrew Melnychenko --- meson.build | 10

[PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2021-07-13 Thread Andrew Melnychenko
eBPF RSS program and maps now may be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 77 -- include/hw/virtio/virtio-net.h | 1 + 2

[PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-07-13 Thread Andrew Melnychenko
use "that" helper for "that" emulator. qmp sample: C: { "execute": "query-helper-paths" } S: { "return": [ { "name": "qemu-ebpf-rss-helper", "path": "/usr/local/libexec/qemu-ebpf-rss

[RFC PATCH 4/5] qmp: Added qemu-ebpf-rss-path command.

2021-06-09 Thread Andrew Melnychenko
Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 78 ++ qapi/misc.json | 29 + 2 files changed, 107 insertions(+) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index f7d64a6457..5dd2a58ea2 100644 --- a/monitor/qmp-cm

[RFC PATCH 1/5] ebpf: Added eBPF initialization by fds.

2021-06-09 Thread Andrew Melnychenko
eBPF RSS context may be initialized by program fd and map fds. virtio-net may provide fds passed by libvirt. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 31 --- ebpf/ebpf_rss.h | 5 + 3 files changed, 39

[RFC PATCH 5/5] meson: libbpf dependency now exclusively for Linux.

2021-06-09 Thread Andrew Melnychenko
Libbpf is used for eBPF RSS steering, which is supported only by Linux TAP. There is no reason yet to build eBPF loader and helper for non Linux systems, even if libbpf is present. Signed-off-by: Andrew Melnychenko --- meson.build | 29 - 1 file changed, 16

[PATCH 1/3] virtio-pci: Added check for virtio device presence in mm callbacks.

2021-06-09 Thread Andrew Melnychenko
During unplug the virtio device is unplugged from virtio-bus on pci. In some cases, requests to virtio-pci mm may acquire during/after unplug. Added check that virtio device is on the bus, for "common" memory region. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 8 +

[PATCH 3/3] virtio-pci: Changed return values for "notify", "device" and "isr" read.

2021-06-09 Thread Andrew Melnychenko
Added check for "notify" memory region. Now reads will return "-1" if a virtio device is not present on a virtio bus. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virt

[RFC PATCH 3/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-06-09 Thread Andrew Melnychenko
Helper program. Loads eBPF RSS program and maps and passes them through unix socket. Libvirt may launch this helper and pass eBPF fds to qemu virtio-net. Signed-off-by: Andrew Melnychenko --- ebpf/qemu-ebpf-rss-helper.c | 130 meson.build

[RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-09 Thread Andrew Melnychenko
uot; } S: { "return": [ { "name": "qemu-ebpf-rss-helper", "path": "/usr/local/libexec/qemu-ebpf-rss-helper" } ] } Andrew Melnychenko (5): ebpf: Added eBPF initialization by fds. virtio-net: Added property to load eB

[RFC PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2021-06-09 Thread Andrew Melnychenko
eBPF RSS program and maps now may be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 77 -- include/hw/virtio/virtio-net.h | 1 + 2

[PATCH 2/3] virtio-pci: Added check for virtio device in PCI config cbs.

2021-06-09 Thread Andrew Melnychenko
Now, if virtio device is not present on virtio-bus - pci config callbacks will not lead to possible crush. The read will return "-1" which should be interpreted by a driver that pci device may be unplugged. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 10

[PATCH 0/3] virtio-pci: Checks for virtio device presence on the bus.

2021-06-09 Thread Andrew Melnychenko
start_routine = 0x560b513faeb0 arg = 0x560b522738d0 r = Andrew Melnychenko (3): virtio-pci: Added check for virtio device presence in mm callbacks. virtio-pci: Added check for virtio device in PCI config cbs. virtio-pci: Changed return values for "notify", &qu

[PATCH v8 4/7] ebpf: Added eBPF RSS loader.

2021-05-14 Thread Andrew Melnychenko
Signed-off-by: Andrew Melnychenko --- configure | 8 +- ebpf/ebpf_rss-stub.c| 40 ebpf/ebpf_rss.c | 165 +++ ebpf/ebpf_rss.h | 44 ebpf/meson.build| 1 + ebpf/rss.bpf.skeleton.h | 431

[PATCH v8 7/7] MAINTAINERS: Added eBPF maintainers information.

2021-05-14 Thread Andrew Melnychenko
Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 36055f14c5..c7e9a57cd9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3312,6 +3312,14 @@ F: include/hw/remote/proxy

[PATCH v8 5/7] virtio-net: Added eBPF RSS to virtio-net.

2021-05-14 Thread Andrew Melnychenko
requested by the guest. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 3 + hw/net/virtio-net.c| 116 - include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c | 2 + 4 files changed

[PATCH v8 3/7] ebpf: Added eBPF RSS program.

2021-05-14 Thread Andrew Melnychenko
-by: Andrew Melnychenko --- tools/ebpf/Makefile.ebpf | 22 ++ tools/ebpf/rss.bpf.c | 571 +++ 2 files changed, 593 insertions(+) create mode 100755 tools/ebpf/Makefile.ebpf create mode 100644 tools/ebpf/rss.bpf.c diff --git a/tools/ebpf/Makefile.ebpf b/tools/ebpf

[PATCH v8 2/7] net: Added SetSteeringEBPF method for NetClientState.

2021-05-14 Thread Andrew Melnychenko
For now, that method supported only by Linux TAP. Linux TAP uses TUNSETSTEERINGEBPF ioctl. Signed-off-by: Andrew Melnychenko --- include/net/net.h | 2 ++ net/tap-bsd.c | 5 + net/tap-linux.c | 13 + net/tap-solaris.c | 5 + net/tap-stub.c| 5 + net/tap.c

[PATCH v8 6/7] docs: Added eBPF documentation.

2021-05-14 Thread Andrew Melnychenko
Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- docs/devel/ebpf_rss.rst | 125 docs/devel/index.rst| 1 + 2 files changed, 126 insertions(+) create mode 100644 docs/devel/ebpf_rss.rst diff --git a/docs/devel/ebpf_rss.rst b

[PATCH v8 1/7] net/tap: Added TUNSETSTEERINGEBPF code.

2021-05-14 Thread Andrew Melnychenko
Additional code that will be used for eBPF setting steering routine. Signed-off-by: Andrew Melnychenko --- net/tap-linux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tap-linux.h b/net/tap-linux.h index 2f36d100fc..1d06fe0de6 100644 --- a/net/tap-linux.h +++ b/net/tap-linux.h

[PATCH v8 0/7] eBPF RSS support for virtio-net.

2021-05-14 Thread Andrew Melnychenko
packet parsing to skip L4. Changes since v6: * Added eBPF skeleton check to the meson.build file. Changes since v7: * Refactored code style and fixed warnings. * Added explicit pkg-config method for libbpf dependency. Andrew Melnychenko (7): net/tap: Added TUNSETSTEERINGEBPF code. net: Added

[PATCH v7 4/7] ebpf: Added eBPF RSS loader.

2021-04-28 Thread Andrew Melnychenko
Signed-off-by: Andrew Melnychenko --- configure | 8 +- ebpf/ebpf_rss-stub.c| 40 ebpf/ebpf_rss.c | 165 +++ ebpf/ebpf_rss.h | 44 ebpf/meson.build| 1 + ebpf/rss.bpf.skeleton.h | 431

[PATCH v7 7/7] MAINTAINERS: Added eBPF maintainers information.

2021-04-28 Thread Andrew Melnychenko
Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 36055f14c5..c7e9a57cd9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3312,6 +3312,14 @@ F: include/hw/remote/proxy

[PATCH v7 6/7] docs: Added eBPF documentation.

2021-04-28 Thread Andrew Melnychenko
Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- docs/devel/ebpf_rss.rst | 125 docs/devel/index.rst| 1 + 2 files changed, 126 insertions(+) create mode 100644 docs/devel/ebpf_rss.rst diff --git a/docs/devel/ebpf_rss.rst b

[PATCH v7 3/7] ebpf: Added eBPF RSS program.

2021-04-28 Thread Andrew Melnychenko
-by: Andrew Melnychenko --- tools/ebpf/Makefile.ebpf | 22 ++ tools/ebpf/rss.bpf.c | 569 +++ 2 files changed, 591 insertions(+) create mode 100755 tools/ebpf/Makefile.ebpf create mode 100644 tools/ebpf/rss.bpf.c diff --git a/tools/ebpf/Makefile.ebpf b/tools/ebpf

  1   2   >