From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [bpf PATCH v2 2/2] bpf: sockmap only allow ESTABLISHED sock state Date: Sat, 9 Jun 2018 14:53:29 -0700 Message-ID: References: <20180608145951.15153.80520.stgit@john-Precision-Tower-5810> <20180608150644.15153.4135.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: edumazet@google.com, weiwan@google.com, netdev@vger.kernel.org To: daniel@iogearbox.net, ast@kernel.org Return-path: Received: from mail-io0-f195.google.com ([209.85.223.195]:38963 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753396AbeFIVxn (ORCPT ); Sat, 9 Jun 2018 17:53:43 -0400 Received: by mail-io0-f195.google.com with SMTP id f1-v6so19781023ioh.6 for ; Sat, 09 Jun 2018 14:53:43 -0700 (PDT) In-Reply-To: <20180608150644.15153.4135.stgit@john-Precision-Tower-5810> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/08/2018 08:06 AM, John Fastabend wrote: > Per the note in the TLS ULP (which is actually a generic statement > regarding ULPs) > > /* 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. > */ > > After this patch we only allow socks that are in ESTABLISHED state or > are being added via a sock_ops event that is transitioning into an > ESTABLISHED state. By allowing sock_ops events we allow users to > manage sockmaps directly from sock ops programs. The two supported > sock_ops ops are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and > BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB. > > Also tested with 'netserver -6' and 'netperf -H [IPv6]' as well as > 'netperf -H [IPv4]'. > > Reported-by: Eric Dumazet > Signed-off-by: John Fastabend > --- Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")