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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 DBC07C56202 for ; Wed, 18 Nov 2020 02:55:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 971CD2222B for ; Wed, 18 Nov 2020 02:55:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NDKe/JPt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727159AbgKRCzP (ORCPT ); Tue, 17 Nov 2020 21:55:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgKRCzO (ORCPT ); Tue, 17 Nov 2020 21:55:14 -0500 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 832A8C0613D4; Tue, 17 Nov 2020 18:55:13 -0800 (PST) Received: by mail-oo1-xc43.google.com with SMTP id l10so54980oom.6; Tue, 17 Nov 2020 18:55:13 -0800 (PST) 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=tEwnmHhIEBiF4ip6J2MWPrfZE1yNIQonDIzMaMDdDvM=; b=NDKe/JPt7K5aQAIYsKRW4qi5dUaX6bMle2gk9Xr0l3CC9PCYDXVxUby5N/vQ1ES4Pd oOS843e3Zhi7CH2lACr/vcn2KZ2Oo6g6BR9/1O/logjwpGfUaSz7sPqRiR21DItRH3DG z52oflR7hSbVffXDnNJtLRAFHce28sX2r7lcAZTYv0ixB171H69O8rr8d7xVw3Svd/qx lWwcIcIYbOAe2I+4ZzjBJKfukz7muxT33HFAOjFknju7YVHODHiIgQwsgcWhASorKjNY zeejI37zQbpY38fy8yDDn00KnKEkLBhKtEa80250KZDHt9ewJdub9h8AG117DZzGpuds 0Bpg== 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=tEwnmHhIEBiF4ip6J2MWPrfZE1yNIQonDIzMaMDdDvM=; b=Un2cf/NsOfxKuwCVJAcZ2uHWCDDzLS5W+YXcbERnqx4UBeGsHwhxQcm9NUL0LNc0z0 aBhzLt4nir6obl1H8uKmrMwwTjw228CkTl7oQVpYhDzlgWv9SW7BHfpXOWL9EjtlM8b8 WMdQhVgxHm7PMtLxR6ne558w4GMr+HHXwY9YNhuq5UV7DRgDmaPvIwiVSbDPX86iqWaj Wnqca8Fg9Wr0y/UzktyXYDSzg/HIwaFXbCaraJvfsQ4hfOl3IXiOnBLEXRI2Drmwizhe HhyjJJ6w7LXrSQ7EvsN4FZjlh5xYqr5Z2MRUoORvQF0CL3yk5UBKGHItlnF/xmFLDTMx GWbw== X-Gm-Message-State: AOAM531IaB3kxewuf9sgexJN8zanwgPmEnfnclR/oiJGJ4gn6vVAyquf KAEM0JELZ7oQg+8gljJKy82HY0VyG9Wt/uXMYQ== X-Google-Smtp-Source: ABdhPJzRjuZgyhfgqXMOz7fG3Ka0cwdzRenoNOLT116CNG2LIn0CFNpWW+KaC111Or8HXNF3cx5nETwIX+56qQSDf4w= X-Received: by 2002:a4a:928a:: with SMTP id i10mr5092779ooh.47.1605668112908; Tue, 17 Nov 2020 18:55:12 -0800 (PST) MIME-Version: 1.0 References: <20201117145644.1166255-1-danieltimlee@gmail.com> <20201117145644.1166255-2-danieltimlee@gmail.com> In-Reply-To: From: "Daniel T. Lee" Date: Wed, 18 Nov 2020 11:54:56 +0900 Message-ID: Subject: Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper To: Andrii Nakryiko Cc: Daniel Borkmann , Alexei Starovoitov , Andrii Nakryiko , brakmo , Jesper Dangaard Brouer , Lorenzo Bianconi , David Ahern , Yonghong Song , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Ira Weiny , Thomas Graf , Jakub Kicinski , Martin KaFai Lau , John Fastabend , bpf , Networking , Xdp Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, Nov 18, 2020 at 10:58 AM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > > > Under the samples/bpf directory, similar tracing helpers are > > fragmented around. To keep consistent of tracing programs, this commit > > moves the helper and define locations to increase the reuse of each > > helper function. > > > > Signed-off-by: Daniel T. Lee > > > > --- > > [...] > > -static void read_trace_pipe2(void) > > This is used only in hbm.c, why move it into trace_helpers.c? > I think this function can be made into a helper that can be used in other programs. Which is basically same as 'read_trace_pipe' and also writes the content of that pipe to file either. Well, it's not used anywhere else, but I moved this function for the potential of reuse. Since these 'read_trace_pipe's are helpers that are only used under samples directory, what do you think about moving these helpers to something like samples/bpf/trace_pipe.h? Thanks for your time and effort for the review. -- Best, Daniel T. Lee