Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1203126ybi; Fri, 21 Jun 2019 16:17:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDsXxU8tHySOUtam+78GHb79iHBuxppmcEXsdO7hS5RBSYuHXt1sPn5JEj6CyDOenQaa8R X-Received: by 2002:a17:90a:af8e:: with SMTP id w14mr9897703pjq.89.1561159061851; Fri, 21 Jun 2019 16:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561159061; cv=none; d=google.com; s=arc-20160816; b=ure5bWWpIOAkRs7g6rWBZSGkDyULrzUvn154QFbPYzQA+T3rRdfYMTPxdSEiTjvZVT vFS0YOr+qxeiRqQ2W3YwFZCK7ec8QjdeInQ2DMhMS0zRYf79rC3JCaY2XJjQWLVqe/2N XqcKm0dWVHWlcX9lc57mtjx6z7UwAFRsT1Ik/y5Hmr8F4wana+WUUYTOx5qwOyZzc6zE QNDeDo7VvJUXvBcosTTI9ZAoTK63ycYcUCQmse+kNcy+Wo1fHePIO8SjhdsG167rfRKh kQg8AzDsJNa7V3UyE9gizE3ISB8hAB3NNkSYrhGl4O+4e8SMPTe/aPBeODDAAQbcYttr Z7KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=ZJbz/C3e+sb5O/hI+5UE82UL50nEjTNC67t2N91YPtY=; b=WLb3Dmv4ZsKIzykAf6s12/nny4R+hQfW182mVEATKKhcFQMDTZNejWUSmSXugApK4P fJPnLML90mmgx8ZF6k+tAjsQHdLupopFBw4YKi1gHLxxQV6uI7d1Rh9m2frNMwmuKtcl EA74kz6ka8yUrrWQW4su59OzoydFYpOCOvK8MeYLvDFjQD9k0pYnO0KlyKVuDT9WKjIR nhwNNBGroLQBir8sp96Ibx+pI9cdnb7WQOgWx8s1gXn4j7nr8ZgkochQjbUpFRfbhy07 HMME5XIQcmUB5E1B5yiVcJf/O4HjuULTWUJGPi6Tdr8ntvQw7UArSCGjj6r/dyyLx3tb eL/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b4QVZJcm; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si3922385pjc.42.2019.06.21.16.17.26; Fri, 21 Jun 2019 16:17:41 -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=@google.com header.s=20161025 header.b=b4QVZJcm; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726237AbfFUXRL (ORCPT + 99 others); Fri, 21 Jun 2019 19:17:11 -0400 Received: from mail-qt1-f202.google.com ([209.85.160.202]:53632 "EHLO mail-qt1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbfFUXRH (ORCPT ); Fri, 21 Jun 2019 19:17:07 -0400 Received: by mail-qt1-f202.google.com with SMTP id h47so9631136qtc.20 for ; Fri, 21 Jun 2019 16:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=ZJbz/C3e+sb5O/hI+5UE82UL50nEjTNC67t2N91YPtY=; b=b4QVZJcm4rzj68pH617zJHeAgNJm1LfNtYh0VU7Q9sMs7IbDt7O3+gLB9i+TQRnn8R isezYD5TuX4HIILEoC+ZDjgwi2NfSx4Bsde50eNKR2G1RNbKE/2O2GTEiK9QW/tGpKGI lO7QYYUcdoJuA1++3R/My85hSzs84tepI/ghmjcNszmGUxyMBBmFCXgeUsJtjss/BeRs Ku72dI/5CSMZ9R7lofjFbXZSIFwifeRdmfrwxvfEO2g5PQCdX3mZNilglita4A9ADGJV DryJY4lfbugkC26ZIDq1rerUemGvBbfqr8T6BtgAl7J2Rcd8XuoHcDnD+HJNZI9C1/EP b3/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ZJbz/C3e+sb5O/hI+5UE82UL50nEjTNC67t2N91YPtY=; b=B2HpUZuEnz8Z+49m4icoesRjZVgk2EPTZ29cxys+HLN7IBkuOIUsKElig5YpgjoPxp C9yxQbMmGtonr1oMuN7XI/5ts0UhhUDFwuRQpu3j7HmiDbw0Ve11FPXWxZVa3oKfhThV IyI/+Th/xKukFXWpUx0yml0wqugUJWJ2W+8BcwTAPI5TXZuKW+keZsY5as3Va8ouFi5G 1XjK/7D/ffNQurgLwdLwig5erUH+csSAIliXgaCSLG/EKx8FrlIJwdfoAdoqvc9mTsVW lzDeMalf+9zizonVrZzBqrd8l3x2Z/gWv0r3BP57u08a4AG6B7Tg/NdL/oMzuOjLL4St atqQ== X-Gm-Message-State: APjAAAVbeFoTllEau70CvCvZHZEOTiG8dz2FJ0TV3XjiQ8tWYenxCKus gccXs/PXLqSAt4rGSLIgBNGuwah0FvCp X-Received: by 2002:ae9:ebd0:: with SMTP id b199mr19266600qkg.56.1561159025911; Fri, 21 Jun 2019 16:17:05 -0700 (PDT) Date: Fri, 21 Jun 2019 16:16:47 -0700 In-Reply-To: <20190621231650.32073-1-brianvv@google.com> Message-Id: <20190621231650.32073-4-brianvv@google.com> Mime-Version: 1.0 References: <20190621231650.32073-1-brianvv@google.com> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [RFC PATCH 3/6] bpf: keep bpf.h in sync with tools/ From: Brian Vazquez To: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" Cc: Stanislav Fomichev , Willem de Bruijn , Petar Penkov , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Brian Vazquez 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 Adds bpf_attr.dump structure to libbpf. Suggested-by: Stanislav Fomichev Signed-off-by: Brian Vazquez --- tools/include/uapi/linux/bpf.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index b077507efa3f3..1d753958874df 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 { @@ -385,6 +386,14 @@ union bpf_attr { __u64 flags; }; + struct { /* struct used by BPF_MAP_DUMP command */ + __u32 map_fd; + __aligned_u64 prev_key; + __aligned_u64 buf; + __aligned_u64 buf_len; /* input/output: len of buf */ + __u64 flags; + } dump; + struct { /* anonymous struct used by BPF_PROG_LOAD command */ __u32 prog_type; /* one of enum bpf_prog_type */ __u32 insn_cnt; -- 2.22.0.410.gd8fdbe21b5-goog