From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH bpf-next v3 0/7] Implement queue/stack maps Date: Fri, 19 Oct 2018 13:30:49 -0700 Message-ID: <20181019203047.lidhetlby7qbpywf@ast-mbp.dhcp.thefacebook.com> References: <153986856416.9127.9618539079636149043.stgit@kernel> <831d49fa-c131-b66a-80d2-65f8172467d5@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mauricio Vasquez B , Alexei Starovoitov , netdev@vger.kernel.org, Song Liu To: Daniel Borkmann Return-path: Received: from mail-pf1-f193.google.com ([209.85.210.193]:34397 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbeJTEia (ORCPT ); Sat, 20 Oct 2018 00:38:30 -0400 Received: by mail-pf1-f193.google.com with SMTP id f78-v6so11205262pfe.1 for ; Fri, 19 Oct 2018 13:30:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <831d49fa-c131-b66a-80d2-65f8172467d5@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Oct 19, 2018 at 10:08:08PM +0200, Daniel Borkmann wrote: > On 10/18/2018 03:16 PM, Mauricio Vasquez B wrote: > > In some applications this is needed have a pool of free elements, for > > example the list of free L4 ports in a SNAT. None of the current maps allow > > to do it as it is not possible to get any element without having they key > > it is associated to, even if it were possible, the lack of locking mecanishms in > > eBPF would do it almost impossible to be implemented without data races. > > > > This patchset implements two new kind of eBPF maps: queue and stack. > > Those maps provide to eBPF programs the peek, push and pop operations, and for > > userspace applications a new bpf_map_lookup_and_delete_elem() is added. > > > > Signed-off-by: Mauricio Vasquez B > Acked-by: Daniel Borkmann Applied, Thanks