Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org,
	edumazet@google.com, bpf@vger.kernel.org
Subject: Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync
Date: Fri, 28 Jun 2019 17:59:25 -0700	[thread overview]
Message-ID: <20190628175925.79a763f5@cakuba.netronome.com> (raw)
In-Reply-To: <5d16aec74b6cd_35a32adaec47c5c457@john-XPS-13-9370.notmuch>

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() 😕

  reply	other threads:[~2019-06-29  0:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 17:36 [PATCH 0/2] tls, add unhash callback John Fastabend
2019-06-27 17:36 ` [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync John Fastabend
2019-06-27 23:44   ` Jakub Kicinski
2019-06-28 14:12     ` John Fastabend
2019-06-28 18:31       ` Jakub Kicinski
2019-06-28 19:40         ` John Fastabend
2019-06-28 22:48           ` Jakub Kicinski
2019-06-29  0:20             ` John Fastabend
2019-06-29  0:59               ` Jakub Kicinski [this message]
2019-06-29  3:46                 ` Jakub Kicinski
2019-06-27 17:36 ` [PATCH 2/2] bpf: tls, implement unhash to avoid transition out of ESTABLISHED John Fastabend
2019-06-27 18:16 ` [PATCH 0/2] tls, add unhash callback John Fastabend

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628175925.79a763f5@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox