Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10415942ybi; Wed, 24 Jul 2019 22:49:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsJb420mGMV+NZj6svAvRVkmtHcCH2Dg0nbgt9uwvOxkboqFoZDCM01uphVhEIzyX6l8eM X-Received: by 2002:a17:90a:7787:: with SMTP id v7mr91335109pjk.143.1564033784237; Wed, 24 Jul 2019 22:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033784; cv=none; d=google.com; s=arc-20160816; b=NgCKxkdpftuyKjEZeavKAwKWeqnSmI5UukeV2r/yYo0XFsXpNuPZhngpCw4HvuGa1+ DNWs2VZiNC7xxlIWdDhHRXHgTd/sJs3DugJ+vF2W7VJIv9xvN5/g7Nr/xkVObc9jRNso YLKMVHcuQ/1b6Xet2FKT8/esJtRlylfTq0yfLK3986W9aui1+qETynultW7CmD81vCdB 1X+LlBoi5rvSefBmY2boX2myiYfq1xoXhsMAlNnchcuN3wNDs7nlQiiBfNjV7k7Yd6mV c6CLl364dXRHVUMAjp6xOp4GJJa9uk6ltn7zjKcFkox0fbu1Es0Rm1fHh6/a+CvJ6+Gh W2mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NYfu4BBToJkzHCpkGTGdP9uzED79e2Jr1vPy4Ta8WW8=; b=F4nk/9Zf81JUV2Rci/FyZEhkeXmIKtSWdjRZ/m+Z+hCVVc+f88ovOPH/ivTD1OLade 6zA1J99x/g3XTu9K2AItef0w0EM1sniyLBcAd/Uz1fsOoAFNo9LmOaDlksnvMsa79/cm iQJJzqkVmq7mbM463eMX3duwqz0qPxwxwygJ6qvMOtHiMOnCNP2jH0EUttNKPZ3YwpHD vmnGr4FglkvHkb6KWJqPZY/J5zv7sChcyLDXBkHQNxBBBufhn9tzLit51s3yBFND1G6+ KhpZ0ncJPTG0RgC+rIiQyLnpinW0riJ7FK4dObpt/z2PTulFeb2a777lcfDnR7MBsWhw hYAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdz5Esjg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 7si15643370pga.439.2019.07.24.22.49.29; Wed, 24 Jul 2019 22:49:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdz5Esjg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2388603AbfGXXKQ (ORCPT + 99 others); Wed, 24 Jul 2019 19:10:16 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:34822 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387660AbfGXXKQ (ORCPT ); Wed, 24 Jul 2019 19:10:16 -0400 Received: by mail-qk1-f194.google.com with SMTP id r21so35113695qke.2; Wed, 24 Jul 2019 16:10:15 -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=NYfu4BBToJkzHCpkGTGdP9uzED79e2Jr1vPy4Ta8WW8=; b=pdz5Esjgqb/yw/4RlxbxE+BFd5IinIkwR4MdHedDbMV5BHtMvP1WFU/dzS8BHmzJ2e 3byDHT9zDSPZopVRSMnu/NYF2xPfMW9PBwmVo0haJEfFhEIZq5ZzRpQc9K4lzTQDKZ3A l/dlYLNcGSrCRfR0Ooj+5+WmnE9pdnqrHykeUG+jJkTdGiKawTW/iqrnDjsRZ/AYSGY5 I244Tjv8sYE/Nr0n85gzRTkLtjiD1t13m5bHPNlcJupo3wzppOmLv2as4zkJ066TUBHH p5HJJosMEF1jmZqDXjR90447F2gKcy2IzzmYT1M9m8tnGR4Shy+lbl+zgzKwyAVb4JlP Zdug== 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=NYfu4BBToJkzHCpkGTGdP9uzED79e2Jr1vPy4Ta8WW8=; b=aGmqxvOjnfYNIlnpYnrRqFA+i5AQc+ofFLpIh2OdmT2THzaQ9Np/DX6/L5v5Vz4rIG p5/bpXqcua22M6GrvgxnU6VR2+PtNxGz/eUXoI68ITOoIy8w7mCtgizOK4LkqgsiYQzY 9Guc6Wz/JCZGp1ipNRUAqHVtsDHrApdM27UuM1gF5I7mse6LRN5GciY5+cM1eATbNVVY NZ4iv6zB5pdqxcvuH6A7XKXb8Qf8aT+3kOTfrzPFwAsHlbweXgring7a+OkxPrFg0Lrs 5fv/c2Z2cHs/MwhbwF/whf20yt3xdoC7u6ruk/vGNi5mkZjxAn9GQ2WQkDRD0Zd6xdsS Ev5w== X-Gm-Message-State: APjAAAUvoO/2sUK36jKNeRqgFKDprPhhsboTroSZRFk5b33JqSIx6FM+ uumVh6b/okD0qRJHGStt2qFl8ydhj6WzDPyyELE= X-Received: by 2002:a05:620a:16a6:: with SMTP id s6mr55971937qkj.39.1564009815364; Wed, 24 Jul 2019 16:10:15 -0700 (PDT) MIME-Version: 1.0 References: <20190724165803.87470-1-brianvv@google.com> <20190724165803.87470-4-brianvv@google.com> In-Reply-To: <20190724165803.87470-4-brianvv@google.com> From: Andrii Nakryiko Date: Wed, 24 Jul 2019 16:10:04 -0700 Message-ID: Subject: Re: [PATCH bpf-next 3/6] bpf: keep bpf.h in sync with tools/ To: Brian Vazquez Cc: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , Stanislav Fomichev , Willem de Bruijn , Petar Penkov , open list , Networking , bpf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 10:10 AM Brian Vazquez wrote: > > Adds bpf_attr.dump structure to libbpf. > > Suggested-by: Stanislav Fomichev > Signed-off-by: Brian Vazquez > --- > tools/include/uapi/linux/bpf.h | 9 +++++++++ > tools/lib/bpf/libbpf.map | 2 ++ > 2 files changed, 11 insertions(+) > > diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h > index 4e455018da65f..e127f16e4e932 100644 > --- a/tools/include/uapi/linux/bpf.h > +++ b/tools/include/uapi/linux/bpf.h > @@ -106,6 +106,7 @@ enum bpf_cmd { > BPF_TASK_FD_QUERY, > BPF_MAP_LOOKUP_AND_DELETE_ELEM, > BPF_MAP_FREEZE, > + BPF_MAP_DUMP, > }; > > enum bpf_map_type { > @@ -388,6 +389,14 @@ union bpf_attr { > __u64 flags; > }; > > + struct { /* struct used by BPF_MAP_DUMP command */ > + __aligned_u64 prev_key; > + __aligned_u64 buf; > + __aligned_u64 buf_len; /* input/output: len of buf */ > + __u64 flags; > + __u32 map_fd; > + } dump; > + > struct { /* anonymous struct used by BPF_PROG_LOAD command */ > __u32 prog_type; /* one of enum bpf_prog_type */ > __u32 insn_cnt; > diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map > index f9d316e873d8d..cac3723d5c45c 100644 > --- a/tools/lib/bpf/libbpf.map > +++ b/tools/lib/bpf/libbpf.map > @@ -183,4 +183,6 @@ LIBBPF_0.0.4 { LIBBPF_0.0.4 is closed, this needs to go into LIBBPF_0.0.5. > perf_buffer__new; > perf_buffer__new_raw; > perf_buffer__poll; > + bpf_map_dump; > + bpf_map_dump_flags; As the general rule, please keep those lists of functions in alphabetical order. > } LIBBPF_0.0.3; > -- > 2.22.0.657.g960e92d24f-goog >