From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH bpf-next v2 1/2] trace_helpers.c: Add helpers to poll multiple perf FDs for events Date: Mon, 4 Jun 2018 15:26:02 -0700 Message-ID: <20180604152324.6e1115a2@cakuba.netronome.com> References: <152813003609.3465.618891361534945522.stgit@alrua-kau> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: netdev@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov To: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Return-path: Received: from mx3.wp.pl ([212.77.101.9]:53551 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbeFDW0M (ORCPT ); Mon, 4 Jun 2018 18:26:12 -0400 In-Reply-To: <152813003609.3465.618891361534945522.stgit@alrua-kau> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 04 Jun 2018 18:33:56 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wrote: > This adds two new helper functions to trace_helpers that supports polling > multiple perf file descriptors for events. These are used to the XDP > perf_event_output example, which needs to work with one perf fd per CPU. >=20 > Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen Did you take a look at tools/bpf/bpftool/map_perf_ring.c ? I think the ability to poll multiple FDs could be generally useful and therefore better add it to libbpf.c than tools/testing/selftests/bpf/trace_helpers.c? I'm not 100% sure myself...