]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/net/sock_reuseport.h
soreuseport: fast reuseport UDP socket selection
[mirror_ubuntu-bionic-kernel.git] / include / net / sock_reuseport.h
CommitLineData
ef456144
CG
1#ifndef _SOCK_REUSEPORT_H
2#define _SOCK_REUSEPORT_H
3
4#include <linux/types.h>
5#include <net/sock.h>
6
7struct sock_reuseport {
8 struct rcu_head rcu;
9
10 u16 max_socks; /* length of socks */
11 u16 num_socks; /* elements in socks */
12 struct sock *socks[0]; /* array of sock pointers */
13};
14
15extern int reuseport_alloc(struct sock *sk);
16extern int reuseport_add_sock(struct sock *sk, const struct sock *sk2);
17extern void reuseport_detach_sock(struct sock *sk);
18extern struct sock *reuseport_select_sock(struct sock *sk, u32 hash);
19
20#endif /* _SOCK_REUSEPORT_H */