SlideShare a Scribd company logo
Receive side scaling (RSS) with
eBPF in QEMU and virtio-net
Yan Vugenfirer - CEO, Daynix
Agenda
• What is RSS?


• History: RSS and virtio-net


• What is eBPF?


• Using eBPF for packet steering (RSS) in
virtio-net
What is RSS?
• Receive side scaling - distribution of packets’ processing
among CPUs


• A NIC uses a hashing function to compute a hash value
over a defined area


• Hash value is used to index an indirection table


• The values in the indirection table are used to assign the
received data to a CPU


• With MSI support, a NIC can also interrupt the associated
CPU
CPU1 CPU2 CPU3
CPU0
What is RSS?
NIC
RX	handling RX	handling RX	handling RX	handling
NIC	Driver
HW	
queue
HW	
queue
HW	
queue
HW	
queue
Packet	classification
What is RSS?
Packet	
header
Hash	
function	
(Toeplitz)
QueueCPU	
number
Redirection	table	(up	to	128	entries)
History: RSS and virtio-net
• Let’s use RSS with virtio-net!


• Utilisation CPUs for packet processing


• Cash locality for network applications


• Microsoft WHQL requirement for high speed
devices
History: RSS and virtio-net
• No multi-queue in virtio


• SW implementation in Windows guest driver (similar to RFS in Linux)
CPU1 CPU2 CPU3
CPU0
virtio-net
RX	
handling
RX	
handling
RX	
handling
NetKVM	
RX	virt-queue
Packet	classification
RX	handling
History: RSS and virtio-net
• virtio-net became multi queue device


• Due to Windows requirements - hybrid
model. Interrupt received on specific CPU
core, but could be rescheduled to another


• Works good for TCP


• Might not work for UDP


• Support legacy interrupts for old OSes
History: RSS and virtio-net
CPU1
CPU0
virtio-net
NetKVM	
RX	virt-queue
Packet	classification
RX	handling
RX	virt-queue
Packet	classification
RX	handling
History: RSS and virtio-net
• virtio spec changes


• Set steering mode


• Pass the device redirection tables


• Set hash value in virtio-net-hdr


• No inter-processor interrupts due to re-scheduling


• Vision: HW will do all the heavy work


• Implementations


• SW only POC in QEMU


• eBPF
virtio spec changes - capabilities
• VIRTIO_NET_F_RSS


• VIRTIO_NET_F_MQ must be set
virtio spec changes - device configuration
• virtio_net_config
struct virtio_net_con
fi
g
{

u8 mac[6]
;

le16 status
;

le16 max_virtqueue_pairs
;

le16 mtu
;

le32 speed
;

u8 duplex
;

u8 rss_max_key_size
;

le16 rss_max_indirection_table_length
;

le32 supported_hash_types
;

};
virtio spec changes - setting RSS parameters
• VIRTIO_NET_CTRL_MQ_RSS_CONFIG
struct virtio_net_rss_con
fi
g
{

le32 hash_types
;

le16 indirection_table_mask
;

le16 unclassi
fi
ed_queue
;

le16 indirection_table[indirection_table_length]
;

le16 max_tx_vq
;

u8 hash_key_length
;

u8 hash_key_data[hash_key_length]
;

};
virtio spec changes - virtio-net-hdr
struct virtio_net_hdr
{

u8
fl
ags
;

u8 gso_type
;

le16 hdr_len
;

le16 gso_size
;

le16 csum_start
;

le16 csum_offset
;

le16 num_buffers
;

le32 hash_value; (Only if
VIRTIO_NET_F_HASH_REPORT negotiated
)

le16 hash_report; (Only if
VIRTIO_NET_F_HASH_REPORT negotiated
)

le16 padding_reserved; (Only if
VIRTIO_NET_F_HASH_REPORT negotiated
)

};
What is eBPF?
• Enable running sandboxed code in Linux
kernel


• The code can be loaded at run time


• Used for security, tracing, networking,
observability
How can eBPF help us?
• Calculate the RSS hash and return the
queue index for incoming packets


• Populate the hash value in virtio_net_hdr
(work in progress)
The “magic”
• Loading eBPF program using IOCTL
TUNSETSTEERINGEBPF


• tun_struct has steering_prog field


• If eBPF program for steering is loaded,
tun_select_queue will call it with
bpf_prog_run_clear_cb
Hash population (work in progress)
• Population from eBPF program


• virtio_net_hdr with additional fields


• Work in progress in kernel


• Enlarge virtio_net_hdr in all kernel
modules


• Keep calculated hash in SKB and copy
it to virtio_net_hdr
eBPF program source in QEMU
• tun_rss_steering_prog


• tools/ebpf/rss.bpf.c


• Use clang to compile


• tools/ebpf/Makefile.ebpf
eBPF program skeleton
• During QEMU compilation include file is populated
with the compiled binary


• bpftool gen skeleton rss.bpf.o > rss.bpf.skeleton.h


• Helpers to initialise maps (mechanism to share data
between eBPF program and kerneluserspace)


• Some changes to support libvirt - mmapping the
shared data structure to user space (3 maps in
current main branch without mmaping, 1 map in
pending patches)
Configuration map
• The configuration map is BPF array map that
contains everything required for RSS:


• Supported hash flows: IPv4, TCPv4, UDPv4,
IPv6, IPv6ex, TCPv6, UDPv6


• Indirections table size (max 128)


• Default queue


• Toeplitz hash key - 40 bytes


• Indirections table - 128 entries
Loading eBPF program
• Two mechanisms


• QEMU using function in skeleton file.
Calling bpf syscall


• eBPF helper program (with libvirt) -
QEMU gets file descriptors from libvirt
with already loaded ebpf program and
mapping of the ebpf map (patches under
review)
Loading eBPF program
• Possible load failures


• Kernel support. Current solution requires 5.8+


• Without helper


• QEMU process capabilities: CAP_BPF,
CAP_NET_ADMIN


• sysctl kernel.unprivileged_bpf_disabled=1


• libbpf not present


• In case of helper usage - mismatch between helper and
QEMU


• Stamp is a hash of skeleton include file
Fallback
• Built it QEMU RSS steering


• Can be triggered also by live migration


• Hash population is enabled in QEMU
command line, because there is still not
hash population from eBPF program
Live migration
• Known issue: migrating to old kernel


• eBPF load failure


• Fallback to in-QEMU RSS steering
QEMU command line
• Multi-queue should be enabled


• -smp with vCPU for each queue-pair


• -device virtio-net-pci,
rss=on,hash=on,ebpf_rss_fds=<fd0,fd1>
QEMU command line
• rss=on


• Try to load eBPF from skeleton or by using
provided file descriptors


• Fallback to “built-in” RSS steering in QEMU if
cannot load eBPF program


• hash=on


• Populate hash in virtio_net_hdr


• ebpf_rss_fds - optional, provide file descriptors for
eBPF program and map
libvirt integration
• QEMU should run with least possible privileges


• eBPF helper


• Stamping the helper during compilation time


• Redirection table mapping


• Additional command line options to provide file
descriptors to QEMU


• Patches under review
Current status
• Initial support was merged to QEMU


• libvirt integration patches in QEMU and
libvirt are under discussion on mailing lists


• Hash population by eBPF program -
pending additional work for next set of
patches
Pending patches
• QEMU libvirt integration: https://lists.nongnu.org/
archive/html/qemu-devel/2021-07/msg03535.html


• libvirt patches: https://listman.redhat.com/archives/
libvir-list/2021-July/msg00836.html


• RSS support in Linux virtio-net driver: https://
lists.linuxfoundation.org/pipermail/virtualization/
2021-August/055940.html


• In kernel hash calculation reporting to guest driver:
https://lkml.org/lkml/2021/1/12/1329
virtio-net and eBPF future
• Packet filtering with vhost


• Security?
yan@daynix.com
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Links
• https://www.kernel.org/doc/Documentation/networking/scaling.txt


• https://docs.microsoft.com/en-us/windows-hardware/drivers/network/
introduction-to-receive-side-scaling


• https://ebpf.io


• https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss-
with-a-single-hardware-receive-queue


• https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss-
with-hardware-queuing


• https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss-
with-message-signaled-interrupts


• https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss-
hashing-functions

More Related Content

PDF
How to use KASAN to debug memory corruption in OpenStack environment- (2)
PPTX
コンテナネットワーキング(CNI)最前線
PDF
Performance Wins with eBPF: Getting Started (2021)
PDF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
PDF
Linux kernel tracing
PDF
SRv6 study
PDF
20111015 勉強会 (PCIe / SR-IOV)
PDF
"SRv6の現状と展望" ENOG53@上越
How to use KASAN to debug memory corruption in OpenStack environment- (2)
コンテナネットワーキング(CNI)最前線
Performance Wins with eBPF: Getting Started (2021)
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux kernel tracing
SRv6 study
20111015 勉強会 (PCIe / SR-IOV)
"SRv6の現状と展望" ENOG53@上越

What's hot (20)

PDF
Pod Security AdmissionによるKubernetesのポリシー制御(Kubernetes Novice Tokyo #21 発表資料)
PDF
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
PDF
NEDIA_SNIA_CXL_講演資料.pdf
PPTX
Tutorial: Using GoBGP as an IXP connecting router
PDF
DockerとKubernetesをかけめぐる
PDF
Linux BPF Superpowers
PDF
DPDK QoS
PPTX
cluster-monitoringで困ったこと学んだこと
PDF
Accelerating Envoy and Istio with Cilium and the Linux Kernel
PDF
5G時代のアプリケーション開発とは - 5G+MECを活用した低遅延アプリの実現へ
PDF
Linux Performance Profiling and Monitoring
PDF
レガシーフリーOSに必要な要素技術 legacy free os
PDF
【ジュニパーサロン】データセンタに特化した新しい経路制御技術 RIFTの紹介
PPTX
Dockerからcontainerdへの移行
PDF
Patroni - HA PostgreSQL made easy
PDF
IoT時代におけるストリームデータ処理と急成長の Apache Flink
PPTX
急速に進化を続けるCNIプラグイン Antrea
PDF
re:Invent 2019 BPF Performance Analysis at Netflix
PDF
Linux 4.x Tracing Tools: Using BPF Superpowers
PDF
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
Pod Security AdmissionによるKubernetesのポリシー制御(Kubernetes Novice Tokyo #21 発表資料)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
NEDIA_SNIA_CXL_講演資料.pdf
Tutorial: Using GoBGP as an IXP connecting router
DockerとKubernetesをかけめぐる
Linux BPF Superpowers
DPDK QoS
cluster-monitoringで困ったこと学んだこと
Accelerating Envoy and Istio with Cilium and the Linux Kernel
5G時代のアプリケーション開発とは - 5G+MECを活用した低遅延アプリの実現へ
Linux Performance Profiling and Monitoring
レガシーフリーOSに必要な要素技術 legacy free os
【ジュニパーサロン】データセンタに特化した新しい経路制御技術 RIFTの紹介
Dockerからcontainerdへの移行
Patroni - HA PostgreSQL made easy
IoT時代におけるストリームデータ処理と急成長の Apache Flink
急速に進化を続けるCNIプラグイン Antrea
re:Invent 2019 BPF Performance Analysis at Netflix
Linux 4.x Tracing Tools: Using BPF Superpowers
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
Ad

Similar to Receive side scaling (RSS) with eBPF in QEMU and virtio-net (20)

PDF
Fastsocket Linxiaofeng
PPTX
eBPF Basics
PDF
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
PDF
BPF - in-kernel virtual machine
PPTX
Project Slides for Website 2020-22.pptx
PDF
Linux Kernel Live Patching
PDF
CETH for XDP [Linux Meetup Santa Clara | July 2016]
PPTX
VMworld 2016: vSphere 6.x Host Resource Deep Dive
PDF
Assisting User’s Transition to Titan’s Accelerated Architecture
PPT
15 ia64
PPTX
ch2.pptx
PDF
Ebpf ovsconf-2016
PDF
BKK16-103 OpenCSD - Open for Business!
PPTX
Load Balancing
PPTX
Building a Router
PPTX
Spy hard, challenges of 100G deep packet inspection on x86 platform
PDF
Scaling ingest pipelines with high performance computing principles - Rajiv K...
PDF
Introduction to ARM big.LITTLE technology
PDF
Revisão: Forwarding Metamorphosis: Fast Programmable Match-Action Processing ...
PDF
DPDK Summit 2015 - Aspera - Charles Shiflett
Fastsocket Linxiaofeng
eBPF Basics
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
BPF - in-kernel virtual machine
Project Slides for Website 2020-22.pptx
Linux Kernel Live Patching
CETH for XDP [Linux Meetup Santa Clara | July 2016]
VMworld 2016: vSphere 6.x Host Resource Deep Dive
Assisting User’s Transition to Titan’s Accelerated Architecture
15 ia64
ch2.pptx
Ebpf ovsconf-2016
BKK16-103 OpenCSD - Open for Business!
Load Balancing
Building a Router
Spy hard, challenges of 100G deep packet inspection on x86 platform
Scaling ingest pipelines with high performance computing principles - Rajiv K...
Introduction to ARM big.LITTLE technology
Revisão: Forwarding Metamorphosis: Fast Programmable Match-Action Processing ...
DPDK Summit 2015 - Aspera - Charles Shiflett
Ad

More from Yan Vugenfirer (14)

PDF
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
PDF
Implementing SR-IOv failover for Windows guests during live migration
PDF
Qemu device prototyping
PDF
Windows network teaming
PDF
Rebuild presentation - IoT Israel MeetUp
PDF
Rebuild presentation during Docker's Birthday party
PDF
Contributing to open source using Git
PDF
Introduction to Git
PDF
Microsoft Hardware Certification Kit (HCK) setup
PDF
UsbDk at a Glance 
PDF
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
PPTX
Advanced NDISTest options
PDF
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
PDF
Windows guest debugging presentation from KVM Forum 2012
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
Implementing SR-IOv failover for Windows guests during live migration
Qemu device prototyping
Windows network teaming
Rebuild presentation - IoT Israel MeetUp
Rebuild presentation during Docker's Birthday party
Contributing to open source using Git
Introduction to Git
Microsoft Hardware Certification Kit (HCK) setup
UsbDk at a Glance 
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Advanced NDISTest options
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
Windows guest debugging presentation from KVM Forum 2012

Recently uploaded (20)

PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administration Chapter 2
PPTX
L1 - Introduction to python Backend.pptx
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Digital Strategies for Manufacturing Companies
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
assetexplorer- product-overview - presentation
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
System and Network Administraation Chapter 3
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administration Chapter 2
L1 - Introduction to python Backend.pptx
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Digital Strategies for Manufacturing Companies
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Navsoft: AI-Powered Business Solutions & Custom Software Development
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Digital Systems & Binary Numbers (comprehensive )
assetexplorer- product-overview - presentation
Operating system designcfffgfgggggggvggggggggg
Computer Software and OS of computer science of grade 11.pptx
PTS Company Brochure 2025 (1).pdf.......
Internet Downloader Manager (IDM) Crack 6.42 Build 41
System and Network Administraation Chapter 3
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free

Receive side scaling (RSS) with eBPF in QEMU and virtio-net

  • 1. Receive side scaling (RSS) with eBPF in QEMU and virtio-net Yan Vugenfirer - CEO, Daynix
  • 2. Agenda • What is RSS? • History: RSS and virtio-net • What is eBPF? • Using eBPF for packet steering (RSS) in virtio-net
  • 3. What is RSS? • Receive side scaling - distribution of packets’ processing among CPUs • A NIC uses a hashing function to compute a hash value over a defined area • Hash value is used to index an indirection table • The values in the indirection table are used to assign the received data to a CPU • With MSI support, a NIC can also interrupt the associated CPU
  • 4. CPU1 CPU2 CPU3 CPU0 What is RSS? NIC RX handling RX handling RX handling RX handling NIC Driver HW queue HW queue HW queue HW queue Packet classification
  • 6. History: RSS and virtio-net • Let’s use RSS with virtio-net! • Utilisation CPUs for packet processing • Cash locality for network applications • Microsoft WHQL requirement for high speed devices
  • 7. History: RSS and virtio-net • No multi-queue in virtio • SW implementation in Windows guest driver (similar to RFS in Linux) CPU1 CPU2 CPU3 CPU0 virtio-net RX handling RX handling RX handling NetKVM RX virt-queue Packet classification RX handling
  • 8. History: RSS and virtio-net • virtio-net became multi queue device • Due to Windows requirements - hybrid model. Interrupt received on specific CPU core, but could be rescheduled to another • Works good for TCP • Might not work for UDP • Support legacy interrupts for old OSes
  • 9. History: RSS and virtio-net CPU1 CPU0 virtio-net NetKVM RX virt-queue Packet classification RX handling RX virt-queue Packet classification RX handling
  • 10. History: RSS and virtio-net • virtio spec changes • Set steering mode • Pass the device redirection tables • Set hash value in virtio-net-hdr • No inter-processor interrupts due to re-scheduling • Vision: HW will do all the heavy work • Implementations • SW only POC in QEMU • eBPF
  • 11. virtio spec changes - capabilities • VIRTIO_NET_F_RSS • VIRTIO_NET_F_MQ must be set
  • 12. virtio spec changes - device configuration • virtio_net_config struct virtio_net_con fi g { u8 mac[6] ; le16 status ; le16 max_virtqueue_pairs ; le16 mtu ; le32 speed ; u8 duplex ; u8 rss_max_key_size ; le16 rss_max_indirection_table_length ; le32 supported_hash_types ; };
  • 13. virtio spec changes - setting RSS parameters • VIRTIO_NET_CTRL_MQ_RSS_CONFIG struct virtio_net_rss_con fi g { le32 hash_types ; le16 indirection_table_mask ; le16 unclassi fi ed_queue ; le16 indirection_table[indirection_table_length] ; le16 max_tx_vq ; u8 hash_key_length ; u8 hash_key_data[hash_key_length] ; };
  • 14. virtio spec changes - virtio-net-hdr struct virtio_net_hdr { u8 fl ags ; u8 gso_type ; le16 hdr_len ; le16 gso_size ; le16 csum_start ; le16 csum_offset ; le16 num_buffers ; le32 hash_value; (Only if VIRTIO_NET_F_HASH_REPORT negotiated ) le16 hash_report; (Only if VIRTIO_NET_F_HASH_REPORT negotiated ) le16 padding_reserved; (Only if VIRTIO_NET_F_HASH_REPORT negotiated ) };
  • 15. What is eBPF? • Enable running sandboxed code in Linux kernel • The code can be loaded at run time • Used for security, tracing, networking, observability
  • 16. How can eBPF help us? • Calculate the RSS hash and return the queue index for incoming packets • Populate the hash value in virtio_net_hdr (work in progress)
  • 17. The “magic” • Loading eBPF program using IOCTL TUNSETSTEERINGEBPF • tun_struct has steering_prog field • If eBPF program for steering is loaded, tun_select_queue will call it with bpf_prog_run_clear_cb
  • 18. Hash population (work in progress) • Population from eBPF program • virtio_net_hdr with additional fields • Work in progress in kernel • Enlarge virtio_net_hdr in all kernel modules • Keep calculated hash in SKB and copy it to virtio_net_hdr
  • 19. eBPF program source in QEMU • tun_rss_steering_prog • tools/ebpf/rss.bpf.c • Use clang to compile • tools/ebpf/Makefile.ebpf
  • 20. eBPF program skeleton • During QEMU compilation include file is populated with the compiled binary • bpftool gen skeleton rss.bpf.o > rss.bpf.skeleton.h • Helpers to initialise maps (mechanism to share data between eBPF program and kerneluserspace) • Some changes to support libvirt - mmapping the shared data structure to user space (3 maps in current main branch without mmaping, 1 map in pending patches)
  • 21. Configuration map • The configuration map is BPF array map that contains everything required for RSS: • Supported hash flows: IPv4, TCPv4, UDPv4, IPv6, IPv6ex, TCPv6, UDPv6 • Indirections table size (max 128) • Default queue • Toeplitz hash key - 40 bytes • Indirections table - 128 entries
  • 22. Loading eBPF program • Two mechanisms • QEMU using function in skeleton file. Calling bpf syscall • eBPF helper program (with libvirt) - QEMU gets file descriptors from libvirt with already loaded ebpf program and mapping of the ebpf map (patches under review)
  • 23. Loading eBPF program • Possible load failures • Kernel support. Current solution requires 5.8+ • Without helper • QEMU process capabilities: CAP_BPF, CAP_NET_ADMIN • sysctl kernel.unprivileged_bpf_disabled=1 • libbpf not present • In case of helper usage - mismatch between helper and QEMU • Stamp is a hash of skeleton include file
  • 24. Fallback • Built it QEMU RSS steering • Can be triggered also by live migration • Hash population is enabled in QEMU command line, because there is still not hash population from eBPF program
  • 25. Live migration • Known issue: migrating to old kernel • eBPF load failure • Fallback to in-QEMU RSS steering
  • 26. QEMU command line • Multi-queue should be enabled • -smp with vCPU for each queue-pair • -device virtio-net-pci, rss=on,hash=on,ebpf_rss_fds=<fd0,fd1>
  • 27. QEMU command line • rss=on • Try to load eBPF from skeleton or by using provided file descriptors • Fallback to “built-in” RSS steering in QEMU if cannot load eBPF program • hash=on • Populate hash in virtio_net_hdr • ebpf_rss_fds - optional, provide file descriptors for eBPF program and map
  • 28. libvirt integration • QEMU should run with least possible privileges • eBPF helper • Stamping the helper during compilation time • Redirection table mapping • Additional command line options to provide file descriptors to QEMU • Patches under review
  • 29. Current status • Initial support was merged to QEMU • libvirt integration patches in QEMU and libvirt are under discussion on mailing lists • Hash population by eBPF program - pending additional work for next set of patches
  • 30. Pending patches • QEMU libvirt integration: https://lists.nongnu.org/ archive/html/qemu-devel/2021-07/msg03535.html • libvirt patches: https://listman.redhat.com/archives/ libvir-list/2021-July/msg00836.html • RSS support in Linux virtio-net driver: https:// lists.linuxfoundation.org/pipermail/virtualization/ 2021-August/055940.html • In kernel hash calculation reporting to guest driver: https://lkml.org/lkml/2021/1/12/1329
  • 31. virtio-net and eBPF future • Packet filtering with vhost • Security?
  • 34. Links • https://www.kernel.org/doc/Documentation/networking/scaling.txt • https://docs.microsoft.com/en-us/windows-hardware/drivers/network/ introduction-to-receive-side-scaling • https://ebpf.io • https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss- with-a-single-hardware-receive-queue • https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss- with-hardware-queuing • https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss- with-message-signaled-interrupts • https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss- hashing-functions