Skip to content

pavel-odintsov/udp_server_reuseport_bpf_poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this repo you can find attempt to use SO_ATTACH_REUSEPORT_CBPF to load balance traffic between threads.

This code is not working. It was published just to highlight issue in Linux kernel.

This is example code for my blog article

Example output:

We will listen on :::2055 udp port
Setting reuse port
Loading BPF to implement random UDP traffic distribution over available threads
Successfully loaded reuse port BPF
Successful bind
We will listen on :::2055 udp port
Setting reuse port
Loading BPF to implement random UDP traffic distribution over available threads
Successfully loaded reuse port BPF
Can't bind on port: 2055 on host :: errno:98 error: Address already in use
Cannot create / bind socket
Started capture

Platform:

Ubuntu 22.04, 6.2.0-26-generic

About

In this repo you can find attempt to use SO_ATTACH_REUSEPORT_CBPF to load balance traffic between threads

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published