mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 00:57:24 +07:00
8f51dfc73b
Add new helper bpf_sk_storage_clone which optionally clones sk storage and call it from sk_clone_lock. Cc: Martin KaFai Lau <kafai@fb.com> Cc: Yonghong Song <yhs@fb.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
24 lines
558 B
C
24 lines
558 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2019 Facebook */
|
|
#ifndef _BPF_SK_STORAGE_H
|
|
#define _BPF_SK_STORAGE_H
|
|
|
|
struct sock;
|
|
|
|
void bpf_sk_storage_free(struct sock *sk);
|
|
|
|
extern const struct bpf_func_proto bpf_sk_storage_get_proto;
|
|
extern const struct bpf_func_proto bpf_sk_storage_delete_proto;
|
|
|
|
#ifdef CONFIG_BPF_SYSCALL
|
|
int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk);
|
|
#else
|
|
static inline int bpf_sk_storage_clone(const struct sock *sk,
|
|
struct sock *newsk)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#endif /* _BPF_SK_STORAGE_H */
|