#include <net/ip.h>
#include <net/sock_reuseport.h>
#include <linux/bpf.h>
#include <linux/idr.h>
#include <linux/filter.h>
#include <linux/rcupdate.h>
#define INIT_SOCKS …
DEFINE_SPINLOCK(…);
static DEFINE_IDA(reuseport_ida);
static int reuseport_resurrect(struct sock *sk, struct sock_reuseport *old_reuse,
struct sock_reuseport *reuse, bool bind_inany);
void reuseport_has_conns_set(struct sock *sk)
{ … }
EXPORT_SYMBOL(…);
static void __reuseport_get_incoming_cpu(struct sock_reuseport *reuse)
{ … }
static void __reuseport_put_incoming_cpu(struct sock_reuseport *reuse)
{ … }
static void reuseport_get_incoming_cpu(struct sock *sk, struct sock_reuseport *reuse)
{ … }
static void reuseport_put_incoming_cpu(struct sock *sk, struct sock_reuseport *reuse)
{ … }
void reuseport_update_incoming_cpu(struct sock *sk, int val)
{ … }
static int reuseport_sock_index(struct sock *sk,
const struct sock_reuseport *reuse,
bool closed)
{ … }
static void __reuseport_add_sock(struct sock *sk,
struct sock_reuseport *reuse)
{ … }
static bool __reuseport_detach_sock(struct sock *sk,
struct sock_reuseport *reuse)
{ … }
static void __reuseport_add_closed_sock(struct sock *sk,
struct sock_reuseport *reuse)
{ … }
static bool __reuseport_detach_closed_sock(struct sock *sk,
struct sock_reuseport *reuse)
{ … }
static struct sock_reuseport *__reuseport_alloc(unsigned int max_socks)
{ … }
int reuseport_alloc(struct sock *sk, bool bind_inany)
{ … }
EXPORT_SYMBOL(…);
static struct sock_reuseport *reuseport_grow(struct sock_reuseport *reuse)
{ … }
static void reuseport_free_rcu(struct rcu_head *head)
{ … }
int reuseport_add_sock(struct sock *sk, struct sock *sk2, bool bind_inany)
{ … }
EXPORT_SYMBOL(…);
static int reuseport_resurrect(struct sock *sk, struct sock_reuseport *old_reuse,
struct sock_reuseport *reuse, bool bind_inany)
{ … }
void reuseport_detach_sock(struct sock *sk)
{ … }
EXPORT_SYMBOL(…);
void reuseport_stop_listen_sock(struct sock *sk)
{ … }
EXPORT_SYMBOL(…);
static struct sock *run_bpf_filter(struct sock_reuseport *reuse, u16 socks,
struct bpf_prog *prog, struct sk_buff *skb,
int hdr_len)
{ … }
static struct sock *reuseport_select_sock_by_hash(struct sock_reuseport *reuse,
u32 hash, u16 num_socks)
{ … }
struct sock *reuseport_select_sock(struct sock *sk,
u32 hash,
struct sk_buff *skb,
int hdr_len)
{ … }
EXPORT_SYMBOL(…);
struct sock *reuseport_migrate_sock(struct sock *sk,
struct sock *migrating_sk,
struct sk_buff *skb)
{ … }
EXPORT_SYMBOL(…);
int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog)
{ … }
EXPORT_SYMBOL(…);
int reuseport_detach_prog(struct sock *sk)
{ … }
EXPORT_SYMBOL(…);