Thread (20 messages) read the whole thread 20 messages, 6 authors, 2020-03-28

Re: [PATCHv3 bpf-next 3/5] bpf: Don't refcount LISTEN sockets in sk_assign()

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2020-03-27 14:26:19
Also in: bpf

On 2020-03-27 12:25 a.m., Joe Stringer wrote:
BPF_CALL_1(bpf_sk_release, struct sock *, sk)
  {
-	/* Only full sockets have sk->sk_flags. */
-	if (!sk_fullsock(sk) || !sock_flag(sk, SOCK_RCU_FREE))
+	if (sk_is_refcounted(sk))
  		sock_gen_put(sk);
  	return 0;
  }

Would it make sense to have both the bpf_sk_release and bpf_sk_assign()
centralized so we dont replicate the functionality in tc? Reduces
maintainance overhead.

Thanks for working on this!

cheers,
jamal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help