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 14B5DC2B9F7 for ; Tue, 25 May 2021 03:16:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCB9F6141B for ; Tue, 25 May 2021 03:16:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230191AbhEYDS0 (ORCPT ); Mon, 24 May 2021 23:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbhEYDSZ (ORCPT ); Mon, 24 May 2021 23:18:25 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C880C061756; Mon, 24 May 2021 20:16:55 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id u7so7077649plq.4; Mon, 24 May 2021 20:16:55 -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; bh=5D5lClmoiHDN8GJXbRYmv5T/hyaUQszt2yF2BpoRw84=; b=InUw0wx5KGLBzZXNtPZp9BEWAAwiVXzycBuWcX9DWd71iNgh2OUuQo0mqIiX73A+VG hzcKlc2IKNwhppDVphDqTuzUzBXvhbxF94/D+SMLcpvgrVZU2dJuE6NOPPtvyvB+ZaLL XWNFLdmGIM63Xpqk+8H9wZFyTYW0t/cG0fv4/IGb6wXalOys2OAmdHSdvdEQ0en4zxPL 6Pcxxxmm4rHu7CD2EbeGolEHZxHIgCSvsIpPhZg+K35eXIVCOQqTEYyI8NliD9EbvKvn OmEhFErzBV79eC4m/q1EjKKQ794XucE+F4MKbI60DiUzO9TYUJZifCxzj1ZzVKIAA1SM 4eWw== 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; bh=5D5lClmoiHDN8GJXbRYmv5T/hyaUQszt2yF2BpoRw84=; b=YNaZW4/pTANkBUso/CYs0OPHL4bwaWuEfHSuPntNNs05fyctsff5jlpfmfvsRmnFdy xcBK11Ou9OY2Tsw38wvg0GtKjngnT1RZEaF1NJuf1cSV8gbWAkQuDQ5zRM9NCYJ0FpDM 3gRue5QQTH5BTSeyYdhA32czPtzm5gehBJRspzQJyVr57/kMQXl9yNP6YVrCwnm59gy7 008GYaaEJCrQckAWnouNu3xpMFEzUZjxGv7sv+3BSrZtRkokwvVxfaJZ5aKwtTTnaEfo /x7r/RC0vkbwRp+ZAWHwSkkgnhwA+K00Lz8bGt2LHfS5lnPnDpL79EbUt/t/25mmd6/u jr6w== X-Gm-Message-State: AOAM532J69oenRwpnQ8E4uY7zDSqAvbHRKQEA6sfqHTYsSLCu3dmFF42 y9CPvD3Jf9s6kbNcOC941e2JKWwc47H8hM2uPkM= X-Google-Smtp-Source: ABdhPJxhV+/3jzN7SsR524ngafVuzLP4MjKZyjdL1CcMh3i9shkNs7Ce+C9LW8SaKXJqAWZjal6uXQaKT2v9nmquYaY= X-Received: by 2002:a17:90a:c38c:: with SMTP id h12mr2530177pjt.145.1621912615031; Mon, 24 May 2021 20:16:55 -0700 (PDT) MIME-Version: 1.0 References: <20210520185550.13688-1-alexei.starovoitov@gmail.com> In-Reply-To: From: Cong Wang Date: Mon, 24 May 2021 20:16:44 -0700 Message-ID: Subject: Re: [RFC PATCH bpf-next] bpf: Introduce bpf_timer To: Alexei Starovoitov Cc: David Miller , Daniel Borkmann , Andrii Nakryiko , John Fastabend , Lorenz Bauer , Linux Kernel Network Developers , bpf , kernel-team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, May 23, 2021 at 9:01 AM Alexei Starovoitov wrote: > > On Fri, May 21, 2021 at 2:37 PM Cong Wang wrote: > > > > Hi, Alexei > > > > On Thu, May 20, 2021 at 11:52 PM Alexei Starovoitov > > wrote: > > > > > > From: Alexei Starovoitov > > > > Why do you intentionally keep people in the original discussion > > out of your CC? Remember you are the one who objected the > > idea by questioning its usefulness no matter how I hard I tried > > to explain? I am glad you changed your mind, but it does not > > mean you should forget to credit other people. > > I didn't change my mind and I still object to your stated > _reasons_ for timers. What is _your reason_ to introduce timers? Clearly you provide absolutely nothing here. ;) > > > > > > > Introduce 'struct bpf_timer' that can be embedded in most BPF map types > > > and helpers to operate on it: > > > long bpf_timer_init(struct bpf_timer *timer, void *callback, int flags) > > > long bpf_timer_mod(struct bpf_timer *timer, u64 msecs) > > > long bpf_timer_del(struct bpf_timer *timer) > > > > Like we discussed, this approach would make the timer harder > > to be independent of other eBPF programs, which is a must-have > > for both of our use cases (mine and Jamal's). Like you explained, > > this requires at least another program array, a tail call, a mandatory > > prog pinning to work. > > That is simply not true. Which part is not true? The above is what I got from your explanation. Thanks.