Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2042348pxf; Sat, 3 Apr 2021 08:57:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIh3XcbXFj1jWZeHYHFqCb8XVCVtAelDlKd/wYIEoA8KvOfWYH495hHjMqI633QP8bhM8S X-Received: by 2002:a5d:9693:: with SMTP id m19mr13849595ion.46.1617465455802; Sat, 03 Apr 2021 08:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617465455; cv=none; d=google.com; s=arc-20160816; b=WO8GvR7l/ekDpIrg7V2j6m77BAmwt71SvZwD2OdRy1A8ppByZH7DcwXgKMoa9T3132 cYsgBRrpOeIXxKCaIDfs22TZwjuodp9wCVtO6WOqu1Zl+VWLjKL+eAwEqWeBrJOtQi8q UA184Zd+OPVhe6WfBrqY3+jtqfT+jW/1So7VR65BQUA8KANhUEQGic2GfKxC/+VjXLx+ KjMfn40FV9mZRjmvqHIJzxPDDSFdX0cm8F9LlROPmZxk/amLjr+00/VcQc1DjWWcAo9B UG0AFKxbdnVxTU2YxBJceBc+QhXjl2IcUGuD3ucE7NuZdx1vmT+yAWc0+YJiGUsNArSK z/gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OfErCopIK0BJqU88sz3SKSqCy8reeHsH6ge4J7+5k7w=; b=P9nGqpAAEYNdPxcsDbS1zAGjsrwicHEzTHhmJEyDdYnTJx70xOkAe8GkfWxEL94X9O 1i7a7h6AI1XC9AFuA/7AO01n8fSsP1LhzUnMN8/hfZmyO7NCf0alcGHBULR4Es/qKf6G xEgZgfG3j+B4xulZTC/o7YLHy7JxYVhzeqEeKnrKDQ1wu5gOA6n/9NmqE3lQZBUs1STc 9Urkd9PUFCH602kjmPHVnPVvDP4GcrWMgqVLL9y0WKPcBcLyiAgs2i/uLH7YRjRldVvv w3cFzheYQxe0VKjXOaKbIihYz6miYtJe/JTq5OujLIO+XC1trYaXfC0zlL5tb9GyH946 NcRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ib5uPpGW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o20si10606216iow.56.2021.04.03.08.56.16; Sat, 03 Apr 2021 08:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ib5uPpGW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236825AbhDCPvd (ORCPT + 99 others); Sat, 3 Apr 2021 11:51:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbhDCPvc (ORCPT ); Sat, 3 Apr 2021 11:51:32 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 745C1C0613E6; Sat, 3 Apr 2021 08:51:28 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id g38so8001448ybi.12; Sat, 03 Apr 2021 08:51:28 -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=OfErCopIK0BJqU88sz3SKSqCy8reeHsH6ge4J7+5k7w=; b=Ib5uPpGWPjL03OJ/5nJeiKTJ54af8RI0wzcFewMsSILhRG5KEDF1ctOUvdbCU/5p8u 6woAGNRb13rVYvCxw8dmcbcmw6yUuLZ1m+E4skYjwifJVxTidpPccDYrQ9F8R9tqbFEo 0QdfRhVk1ueGUSNwOj9DgD2dgTHKTs/iGgfkmd7tN08vTeHgIV3PBVwsEtvTzY9LoK/D 4grzLp5eK3EwLpgdHKnXKOVlIhX943nY3dczWjq5alap+GmY03UmFe6ODocK/C3L01H1 rmSjIiY9jfAlv537uQzekyEyriCos+t91LQLhbTC62ndO9UfYqV1oSr9ige987YAyaIh e2Ng== 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=OfErCopIK0BJqU88sz3SKSqCy8reeHsH6ge4J7+5k7w=; b=CoBaDnjxi06HleT1yawiwOFH1GNLuLj8SuPYsP6/gGv8ZAJiiuDeOmbr374fMsux8U 99ZwJAgr4pRDGKIUOlIo+fiIhhGLJ++W43myvFMGoqQN4yFyHKMcR76L9t1d5eDO+4JV +V6daiOCghUa4cNiZVur/jZQWIi7e4ICWPDAlbVfYwSkPgYyyYefWKnRZ7TWav8yEgft 3EJgeFUuNxI9MpbdhGeppZT1M0HMNQisGU+NVaEOo1Mu6A8eaPthOmMC2VrskyROjWsa VnET2S3MFFyYNRk1H/CG5ZGbNTsL2cxLa7PhwE4SBZctn9x06c4L0+DMHL/Gv7AdDw2G v77Q== X-Gm-Message-State: AOAM530WsRmoG0mukAaJ3C1o1K7/WJFDfJxiEAF8lNLbt1L6AA0zbfuH inrboDOkJHqtyr3oiGldvl2lKZa/B18MLqMCnTEumkIc X-Received: by 2002:a25:c4c5:: with SMTP id u188mr25227703ybf.425.1617465087696; Sat, 03 Apr 2021 08:51:27 -0700 (PDT) MIME-Version: 1.0 References: <20210328161055.257504-1-pctammela@mojatatu.com> In-Reply-To: From: Andrii Nakryiko Date: Sat, 3 Apr 2021 08:51:16 -0700 Message-ID: Subject: Re: [PATCH bpf-next] bpf: add 'BPF_RB_MAY_WAKEUP' flag To: Pedro Tammela Cc: Pedro Tammela , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Shuah Khan , Joe Stringer , Quentin Monnet , Yang Li , Networking , bpf , open list , "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 3, 2021 at 6:34 AM Pedro Tammela wrote: > > Em qua., 31 de mar. de 2021 =C3=A0s 03:54, Andrii Nakryiko > escreveu: > > > > On Sun, Mar 28, 2021 at 9:11 AM Pedro Tammela wro= te: > > > > > > The current way to provide a no-op flag to 'bpf_ringbuf_submit()', > > > 'bpf_ringbuf_discard()' and 'bpf_ringbuf_output()' is to provide a '0= ' > > > value. > > > > > > A '0' value might notify the consumer if it already caught up in proc= essing, > > > so let's provide a more descriptive notation for this value. > > > > > > Signed-off-by: Pedro Tammela > > > --- > > > > flags =3D=3D 0 means "no extra modifiers of behavior". That's default > > adaptive notification. If you want to adjust default behavior, only > > then you specify non-zero flags. I don't think anyone will bother > > typing BPF_RB_MAY_WAKEUP for this, nor I think it's really needed. The > > documentation update is nice (if no flags are specified notification > > will be sent if needed), but the new "pseudo-flag" seems like an > > overkill to me. > > My intention here is to make '0' more descriptive. > But if you think just the documentation update is enough, then I will > remove the flag. flags =3D=3D 0 means "default behavior", I don't think you have to remember which verbose flag you need to specify for that, so I think just expanding documentation is sufficient and better. Thanks! > > > > > > include/uapi/linux/bpf.h | 8 ++++++++ > > > tools/include/uapi/linux/bpf.h | 8 ++++++++ > > > tools/testing/selftests/bpf/progs/ima.c | 2 +- > > > tools/testing/selftests/bpf/progs/ringbuf_bench.c | 2 +- > > > tools/testing/selftests/bpf/progs/test_ringbuf.c | 2 +- > > > tools/testing/selftests/bpf/progs/test_ringbuf_multi.c | 2 +- > > > 6 files changed, 20 insertions(+), 4 deletions(-) > > > > > > > [...]