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

2021-04-28 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 v7 5/7] virtio-net: Added eBPF RSS to virtio-net.

2021-04-28 Thread Andrew Melnychenko
ation 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| 115 - include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c | 2 + 4 files ch

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

2021-04-28 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

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

2021-04-28 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 v6 7/7] MAINTAINERS: Added eBPF maintainers information.

2021-04-12 Thread Andrew Melnychenko
From: Andrew Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 58f342108e..e05a9fd9f6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3311,6 +3311,14 @@ F: include/hw

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

2021-04-12 Thread Andrew Melnychenko
enditovich Signed-off-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/

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

2021-04-12 Thread Andrew Melnychenko
: Yuri Benditovich 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 v6 6/7] docs: Added eBPF documentation.

2021-04-12 Thread Andrew Melnychenko
From: Andrew 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

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

2021-04-12 Thread Andrew Melnychenko
hash population 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| 115 - include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c

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

2021-04-12 Thread Andrew Melnychenko
From: Andrew 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

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

2021-04-12 Thread Andrew Melnychenko
From: Andrew 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

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

2021-04-12 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

[PATCH 0/1] libbpf dependecy for docker containers.

2021-04-06 Thread Andrew Melnychenko
ebian, libbpf is pressent but doesn't resolved as dependency by meson(may be pkg-config issues?). On those systems qemu will be build without eBPF RSS steering. The patch privedes changes for containers that able to build qemu with libbpf: Alpine, Centos8 and Fedora. Andrew Melnychenko (1): Ad

[PATCH 1/1] tests/docker: Added libbpf library to the docker files.

2021-04-06 Thread Andrew Melnychenko
The series of patches for eBPF RSS adds libbpf dependency for qemu. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html With this patch, libbpf added: Alpine - added libbpf-dev Centos 8 - added libbpf-devel Fedora - added libbpf-devel Signed-off-by: Andrew Melnychenko

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

2021-03-25 Thread Andrew Melnychenko
: Yuri Benditovich 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 | 423

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

2021-03-25 Thread Andrew Melnychenko
From: Andrew 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

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

2021-03-25 Thread Andrew Melnychenko
From: Andrew 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

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

2021-03-25 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

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

2021-03-25 Thread Andrew Melnychenko
From: Andrew Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5e4be6b667..0f74778ed7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3304,6 +3304,14 @@ F: include/hw

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

2021-03-25 Thread Andrew Melnychenko
hash population 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| 115 - include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c

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

2021-03-25 Thread Andrew Melnychenko
enditovich Signed-off-by: Andrew Melnychenko --- tools/ebpf/Makefile.ebpf | 22 ++ tools/ebpf/rss.bpf.c | 552 +++ 2 files changed, 574 insertions(+) create mode 100755 tools/ebpf/Makefile.ebpf create mode 100644 tools/ebpf/rss.bpf.c diff --git a/

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

2021-03-25 Thread Andrew Melnychenko
From: Andrew 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

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

2021-02-04 Thread Andrew Melnychenko
enditovich Signed-off-by: Andrew Melnychenko --- tools/ebpf/Makefile.ebpf | 33 +++ tools/ebpf/rss.bpf.c | 505 +++ 2 files changed, 538 insertions(+) create mode 100755 tools/ebpf/Makefile.ebpf create mode 100644 tools/ebpf/rss.bpf.c diff --git a/

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

2021-02-04 Thread Andrew Melnychenko
: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- configure | 30 +++ 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 | 397

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

2021-02-04 Thread Andrew Melnychenko
From: Andrew 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

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

2021-02-04 Thread Andrew Melnychenko
From: Andrew Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- docs/ebpf_rss.rst | 125 ++ 1 file changed, 125 insertions(+) create mode 100644 docs/ebpf_rss.rst diff --git a/docs/ebpf_rss.rst b/docs/ebpf_rss.rst new file mode

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

2021-02-04 Thread Andrew Melnychenko
From: Andrew Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 00626941f1..5ca9e8f304 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3194,6 +3194,14 @@ S: Maintained F

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

2021-02-04 Thread Andrew Melnychenko
hash population requested by the guest. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 2 + hw/net/virtio-net.c| 129 - include/hw/virtio/virtio-net.h | 4 + net/vhost-vdpa.c | 2

[RFC PATCH v4 0/7] eBPF RSS support for virtio-net

2021-02-04 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

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

2021-02-04 Thread Andrew Melnychenko
From: Andrew 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

[RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-14 Thread Andrew Melnychenko
hash population requested by the guest. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 2 + hw/net/virtio-net.c| 125 +++-- include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c

[RFC PATCH v3 4/6] ebpf: Added eBPF RSS loader.

2021-01-14 Thread Andrew Melnychenko
: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- configure | 33 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 | 397

[RFC PATCH v3 0/6] eBPF RSS support for virtio-net

2021-01-14 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

[RFC PATCH v3 3/6] ebpf: Added eBPF RSS program.

2021-01-14 Thread Andrew Melnychenko
enditovich Signed-off-by: Andrew Melnychenko --- tools/ebpf/Makefile.ebpf | 33 +++ tools/ebpf/rss.bpf.c | 505 +++ 2 files changed, 538 insertions(+) create mode 100755 tools/ebpf/Makefile.ebpf create mode 100644 tools/ebpf/rss.bpf.c diff --git a/

[RFC PATCH v3 6/6] docs: Added eBPF documentation.

2021-01-14 Thread Andrew Melnychenko
From: Andrew Also, added maintainers information. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 +++ docs/ebpf_rss.rst | 125 ++ 2 files changed, 133 insertions(+) create mode 100644 docs

[RFC PATCH v3 2/6] net: Added SetSteeringEBPF method for NetClientState.

2021-01-14 Thread Andrew Melnychenko
From: Andrew 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

[RFC PATCH v3 1/6] net/tap: Added TUNSETSTEERINGEBPF code.

2021-01-14 Thread Andrew Melnychenko
From: Andrew 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

[PATCH v4 2/2] hw/virtio-pci Added AER capability.

2020-12-03 Thread Andrew Melnychenko
From: Andrew Added AER capability for virtio-pci devices. Also added property for devices, by default AER is disabled. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 16 hw/virtio/virtio-pci.h | 4 2 files changed, 20 insertions(+) diff --git a/hw

[PATCH v4 0/2] hw/virtio-pci: AER capability

2020-12-03 Thread Andrew Melnychenko
Main motivation: According to Microsoft driver\device certification requirements for next version of Window Server, PCIe device must support AER. "Windows Server PCI Express devices are required to support Advanced Error Reporting [AER] as defined in PCI Express Base Specification version 2.1." AE

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

2020-12-03 Thread Andrew Melnychenko
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441 Added ICR clearing if there is IMS bit - 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 | 1 + 2 files changed

[PATCH v4 1/2] hw/virtio-pci Added counter for pcie capabilities offsets.

2020-12-03 Thread Andrew Melnychenko
From: Andrew Removed hardcoded offset for ats. Added cap offset counter for future capabilities like AER. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[RFC PATCH v2 5/5] docs: Added eBPF documentation.

2020-11-19 Thread Andrew Melnychenko
From: Andrew Also, added maintainers information. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 7 +++ docs/ebpf_rss.rst | 133 ++ 2 files changed, 140 insertions(+) create mode 100644 docs

[RFC PATCH v2 3/5] ebpf: Added eBPF RSS loader.

2020-11-19 Thread Andrew Melnychenko
: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- configure| 33 ebpf/ebpf_rss-stub.c | 40 + ebpf/ebpf_rss.c | 187 +++ ebpf/ebpf_rss.h | 44 ++ ebpf/meson.build | 1 + ebpf/trace-events| 4

[RFC PATCH v2 4/5] virtio-net: Added eBPF RSS to virtio-net.

2020-11-19 Thread Andrew Melnychenko
hash population requested by the guest. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 2 + hw/net/virtio-net.c| 120 +++-- include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c

[RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-11-19 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

[RFC PATCH v2 1/5] net: Added SetSteeringEBPF method for NetClientState.

2020-11-19 Thread Andrew Melnychenko
From: Andrew 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-linux.h | 1 + net/tap-solaris.c | 5

[RFC PATCH 2/6] ebpf: Added basic eBPF API.

2020-11-02 Thread Andrew Melnychenko
work. It's similar to ELF's relocation table section routine. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 107 ++ ebpf/ebpf.h | 35 +++ ebpf/trace-events | 4 ++ ebpf/trace.h

[RFC PATCH 4/6] ebpf: Added eBPF RSS loader.

2020-11-02 Thread Andrew Melnychenko
From: Andrew Added function that loads RSS eBPF program. Added stub functions for RSS eBPF. Added meson and configuration options. Signed-off-by: Sameeh Jubran Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- configure| 36 ++ ebpf/ebpf-stub.c | 28

[RFC PATCH 6/6] docs: Added eBPF documentation.

2020-11-02 Thread Andrew Melnychenko
From: Andrew Also, added maintainers information. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 6 +++ docs/ebpf.rst | 29 +++ docs/ebpf_rss.rst | 129 ++ 3 files changed, 164 insertions

[RFC PATCH 3/6] ebpf: Added eBPF RSS program.

2020-11-02 Thread Andrew Melnychenko
ned-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- ebpf/EbpfElf_to_C.py| 67 + ebpf/Makefile.ebpf | 38 +++ ebpf/rss.bpf.c | 470 + ebpf/tun_rss_steering.h | 556 4 files changed, 1131

[RFC PATCH 1/6] net: Added SetSteeringEBPF method for NetClientState.

2020-11-02 Thread Andrew Melnychenko
From: Andrew For now, that method supported only by Linux TAP. Linux TAP uses TUNSETSTEERINGEBPF ioctl. TUNSETSTEERINGBPF was added 3 years ago. Qemu checks if it was defined before using. Signed-off-by: Andrew Melnychenko --- include/net/net.h | 2 ++ net/tap-bsd.c | 5 + net/tap

[RFC PATCH 5/6] virtio-net: Added eBPF RSS to virtio-net.

2020-11-02 Thread Andrew Melnychenko
hash population requested by the guest. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 2 + hw/net/virtio-net.c| 120 +++-- include/hw/virtio/virtio-net.h | 4 ++ net/vhost-vdpa.c

[RFC PATCH 0/6] eBPF RSS support for virtio-net

2020-11-02 Thread Andrew Melnychenko
Basic idea is to use eBPF to calculate and steer packets in TAP. RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash. eBPF RSS allows us to use RSS with vhost TAP. This set of patches introduces the usage of eBPF for packet steering and R

<    1   2