Thread (20 messages) 20 messages, 4 authors, 2020-03-04

Re: [PATCH bpf-next v2 1/9] bpf: sockmap: only check ULP for TCP sockets

From: Lorenz Bauer <hidden>
Date: 2020-03-04 08:39:32
Also in: bpf, lkml

On Tue, 3 Mar 2020 at 18:35, John Fastabend [off-list ref] wrote:
quoted
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 112765bd146d..54a9a3e36b29 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -360,7 +360,13 @@ static inline void sk_psock_restore_proto(struct sock *sk,
                                        struct sk_psock *psock)
 {
      sk->sk_prot->unhash = psock->saved_unhash;
-     tcp_update_ulp(sk, psock->sk_proto, psock->saved_write_space);
+     if (inet_sk(sk)->is_icsk) {
use sock_map_sk_has_ulp() here as well and then drop the !icsk->icsk_ulp_ops
case in tcp_update_ulp()?
This requires moving sock_map_sk_has_ulp to the header, which seemed like the
incorrect place. How about adding bool inet_csk_has_ulp(sk) to
inet_connection_sock.h?

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help