On Fri, 28 Jun 2019 17:20:23 -0700, John Fastabend wrote: > > Why can't tls sockets exist outside of established state? If shutdown > > doesn't call close, perhaps we can add a shutdown callback? It doesn't > > seem to be called from BH? > > > > Because the ulp would be shared in this case, > > /* The TLS ulp is currently supported only for TCP sockets > * in ESTABLISHED state. > * Supporting sockets in LISTEN state will require us > * to modify the accept implementation to clone rather then > * share the ulp context. > */ > if (sk->sk_state != TCP_ESTABLISHED) > return -ENOTSUPP; > > In general I was trying to avoid modifying core TCP layer to fix > this corner case in tls. I see, thanks for clarifying! I was wondering if there's anything wrong in being in CLOSE/SYN/FIN states. > > Sorry for all the questions, I'm not really able to fully wrap my head > > around this. I also feel like I'm missing the sockmap piece that may > > be why you prefer unhash over disconnect. > > Yep, if we try to support listening sockets we need a some more > core infrastructure to push around ulp and user_data portions of > sockets. Its not going to be nice for stable. Also at least in TLS > and sockmap case its not really needed for any use case I know > of. IIUC we can't go from ESTABLISHED to LISTEN without calling close() or disconnect() so I'm not clear on why are we hooking into unhash() 😕