All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	John Fastabend <john.fastabend@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>, bpf <bpf@vger.kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Jussi Maki <joamaki@gmail.com>
Subject: Re: sockmap test is broken
Date: Fri, 19 Nov 2021 10:18:23 -0800	[thread overview]
Message-ID: <6197ea6f350b7_56706208c2@john.notmuch> (raw)
In-Reply-To: <6195e2ae7a82f_2b4cc20884@john.notmuch>

John Fastabend wrote:
> Andrii Nakryiko wrote:
> > On Wed, Nov 17, 2021 at 10:00 AM John Fastabend
> > <john.fastabend@gmail.com> wrote:
> > >
> > > Andrii Nakryiko wrote:
> > > > On Sun, Nov 14, 2021 at 9:21 PM John Fastabend <john.fastabend@gmail.com> wrote:
> > > > >
> > > > > Alexei Starovoitov wrote:
> > > > > > test_maps is failing in bpf tree:
> > > > > >
> > > > > > $ ./test_maps
> > > > > > Failed sockmap recv
> > > > > >
> > > > > > and causing BPF CI to stay red.
> > > > > >
> > > > > > Since bpf-next is fine, I suspect it is one of John's or Jussi's patches.
> > > > > >
> > > > > > Please take a look.
> > > > >
> > > > > I'll look into it thanks.
> > > >
> > > > Any updates, John? Should we just disable test_maps in CI to make it
> > > > useful again?
> > >
> > > I'm debugging this now. Hopefully I'll have a fix shortly (today I hope).
> > > Maybe, it makes sense to wait for EOD and if I still don't have the fix
> > > disable it then. Anyways fixing it is top of list now.
> > 
> > Sounds good, let's hope you find it and fix it today.
> 
> OK got the fix, but its fairly subtle. Whats happening is when socks are
> removed from a map their programs are not actually being removed. They
> continue to live with the sock for the lifetime of the socket or until
> the last reference held from BPF side is lost. At which point all progs
> are dropped and socket returns to normal/preBPF state. We never noticed
> it on our real use cases because once we move sockets into BPF we never
> release them until the socket is free. The fix is to null the set progs
> and then do the update_sk_prot call which will decide based on the
> configured programs what proto ops need to be set to.

Fix posted here,

https://lore.kernel.org/bpf/20211119181418.353932-1-john.fastabend@gmail.com/

Thanks,
John

      reply	other threads:[~2021-11-19 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14 18:43 sockmap test is broken Alexei Starovoitov
2021-11-15  5:21 ` John Fastabend
2021-11-15 19:54   ` sunyucong
2021-11-17 17:48   ` Andrii Nakryiko
2021-11-17 18:00     ` John Fastabend
2021-11-17 18:08       ` Andrii Nakryiko
2021-11-18  5:20         ` John Fastabend
2021-11-19 18:18           ` John Fastabend [this message]

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=6197ea6f350b7_56706208c2@john.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=joamaki@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.