From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01B97C47083 for ; Wed, 2 Jun 2021 18:27:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D204F61075 for ; Wed, 2 Jun 2021 18:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbhFBS3h (ORCPT ); Wed, 2 Jun 2021 14:29:37 -0400 Received: from mail-lj1-f169.google.com ([209.85.208.169]:40829 "EHLO mail-lj1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229467AbhFBS3g (ORCPT ); Wed, 2 Jun 2021 14:29:36 -0400 Received: by mail-lj1-f169.google.com with SMTP id u22so3802831ljh.7; Wed, 02 Jun 2021 11:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8UqDhXrXjsAxzr58NBRBsGjtJDHkgQVZ6cKClZ531zY=; b=ViFTnJXh801TRjKKj3i829MHXnMV6NvAvdOMnZKySEmLWpzUvVAKRccfZPdoKAS7AL jn5e8SG6OspXz3H3NRWqdL48aR3uKQoFzDe0T/wY3gg/FHkyNY8yM0B4punMfpTC4VSp rXUBtEQZOg5gSnvCn4CjKIaW69j/HtJe63tRgv7ePAr587hXVGXBUYxyGC+xvg1R9wj0 sTq2XuRmQACXS6mRR0LUhUDPHFStiwmeTyzwPfGTz24qndtn7tE+jjXtJN36OSGwiIv2 WY498QN+W7EZkBRcoY6oPJbFn7vmddfXRDnZ1j5zMMP4Zjtd5C/GbOiw/Billvdk6J36 QgiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8UqDhXrXjsAxzr58NBRBsGjtJDHkgQVZ6cKClZ531zY=; b=kau2KEEJe1FVKLJ3Q9dG650KKdr72ZU2sKnTUrTs/QUveJWqabAXl3lKlzHZ++mEKb EsP1CG1ULiCM2y7lmH9Zo3Bw9gfUnpxesL+9Rk+3ceZwjRShJjFy8//791bRTL8JiLZL zDNIwWpDgxBgI0wlyx/Z1HYYg0e+BhGiPTWvsnUmnT9PqS6omQAQmuZtjQUN9/Hj+bjk a9zotdj+hsmddTJNYwJjGBSKVL77GAVON+vFcOcSj1gNP4ZW+0KXeV6gb+HAx2Bn2cjB 8ZL5nOFtFSglJeF1bJFtGP6J2DoK36Cow1zZAi8Umvq7fk0bJzI6QsjXqnxszD8z2IeG jpaQ== X-Gm-Message-State: AOAM532F4Tvv3ZT2A3q+4EpsB1+J04wQINqZ0zAgNbm0mnc1+JtIBvOX lqUAEGBgeSZ+l9/wXzja16WcD28z9624QUUtmdg= X-Google-Smtp-Source: ABdhPJxsBKRxQpr7tXw+0EuzmckLOWkArujX1A5ryUMwKzLh3yvcX9QyLrKqZyNUCEzvUM0LG3M7e++1C7kAute5220= X-Received: by 2002:a2e:a489:: with SMTP id h9mr26720489lji.21.1622658412355; Wed, 02 Jun 2021 11:26:52 -0700 (PDT) MIME-Version: 1.0 References: <20210520185550.13688-1-alexei.starovoitov@gmail.com> <20210602020030.igrx5jp45tocekvy@ast-mbp.dhcp.thefacebook.com> <874kegbqkd.fsf@toke.dk> <20210602175436.axeoauoxetqxzklp@kafai-mbp> <20210602181333.3m4vz2xqd5klbvyf@apollo> In-Reply-To: <20210602181333.3m4vz2xqd5klbvyf@apollo> From: Alexei Starovoitov Date: Wed, 2 Jun 2021 11:26:40 -0700 Message-ID: Subject: Re: [RFC PATCH bpf-next] bpf: Introduce bpf_timer To: Kumar Kartikeya Dwivedi Cc: Martin KaFai Lau , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Cong Wang , David Miller , Daniel Borkmann , Andrii Nakryiko , John Fastabend , Lorenz Bauer , Linux Kernel Network Developers , bpf , kernel-team Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, Jun 2, 2021 at 11:14 AM Kumar Kartikeya Dwivedi wrote: > > On Wed, Jun 02, 2021 at 11:24:36PM IST, Martin KaFai Lau wrote: > > On Wed, Jun 02, 2021 at 10:48:02AM +0200, Toke H=C3=B8iland-J=C3=B8rgen= sen wrote: > > > Alexei Starovoitov writes: > > > > > > >> > In general the garbage collection in any form doesn't scale. > > > >> > The conntrack logic doesn't need it. The cillium conntrack is a = great > > > >> > example of how to implement a conntrack without GC. > > > >> > > > >> That is simply not a conntrack. We expire connections based on > > > >> its time, not based on the size of the map where it residents. > > > > > > > > Sounds like your goal is to replicate existing kernel conntrack > > > > as bpf program by doing exactly the same algorithm and repeating > > > > the same mistakes. Then add kernel conntrack functions to allow lis= t > > > > of kfuncs (unstable helpers) and call them from your bpf progs. > > > > > > FYI, we're working on exactly this (exposing kernel conntrack to BPF)= . > > > Hoping to have something to show for our efforts before too long, but > > > it's still in a bit of an early stage... > > Just curious, what conntrack functions will be made callable to BPF? > > Initially we're planning to expose the equivalent of nf_conntrack_in and > nf_conntrack_confirm to XDP and TC programs (so XDP one works without an = skb, > and TC one works with an skb), to map these to higher level lookup/insert= . To make sure we're on the same page... I still strongly prefer to avoid exposing conntrack via stable helpers. Pls use kfunc and unstable interface.