Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2495982ybd; Thu, 27 Jun 2019 13:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiImfMWaeQj3XzUQazDIli73Bwh6wkMuFalz3HtOA5t9DiTTEmmhvYxzqnyQsfAIUZdTaN X-Received: by 2002:a63:dc11:: with SMTP id s17mr5680715pgg.47.1561667181678; Thu, 27 Jun 2019 13:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561667181; cv=none; d=google.com; s=arc-20160816; b=feRt6sNPMunbUOeoZ+Nsip4iBCdOZu31pwpCAlRl6k/MxAT2yt6nLnzOkqdyTUggX6 tRjuzy7vOUa/RjCjaDJwRCUcxPoGwwJdC6m6lPlNhGBHELtvLm/EuftQwXi3aBGNOgMG X/mGop9vED2X7VxwGELKKD9M0olKbMi0pM4G+9lSNMFYS9bgeai3/7q6NfoRqXJAqe09 BAQkEURQJshAg2IGlikasG9anYy3FTS7gYDUaN/qT2rWbRDI2qKyBlEmJNzYY8qcjEEP yS9SZoK6XH2J/TVfop+oJvphKuf9NKI8HIlqGuPU6+Jyju4mvE9mlvM/Rrzs3HIPE7n/ nK8Q== 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=VCoYUl9mNMFQ/dt5UHA5Hu3M+dVu04Iz/ES0gqVqBL5ZGaDbZ54I0YL0LW8EygzkAQ tx/QZcg6qhntMMmFDEdurZe3r35GYfGgI9oGSkHVlkcoDK5eUSyuja26tHWXEZEOVPMn Yd2EgBqJVIu/TMRhuynVRI3iI0BI4yTi2iTYYSbVHcNZar2DIW9Yp+ajVw/FJX5O63Uk DapBbgv4is2DoebbqLSH/FcypljRDxTAn+7aDE5OD1WgUl+0fMUSZWs2YL+dvrfeHV3E YFqR0X0xsyFNuPHES4OocyJHXUwXHBPkxmvIJmtWtzNynhhy2Dl/uqKrt5j4Wk6KWbzl bQmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lCTvipls; 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 a21si13086pfl.167.2019.06.27.13.26.05; Thu, 27 Jun 2019 13:26:21 -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=lCTvipls; 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 S1726739AbfF0UZH (ORCPT + 99 others); Thu, 27 Jun 2019 16:25:07 -0400 Received: from mail-pl1-f202.google.com ([209.85.214.202]:55669 "EHLO mail-pl1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726616AbfF0UYl (ORCPT ); Thu, 27 Jun 2019 16:24:41 -0400 Received: by mail-pl1-f202.google.com with SMTP id q11so2044430pll.22 for ; Thu, 27 Jun 2019 13:24:41 -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=lCTviplsuxpS22jrClW1mL6aRTLXQXF+1uQJl4GrP6ELiwrIM8+E29QIF7dhjFLGfi L6OYMLcLR2eAiHqKQuu83jwzMnjqC5d8Apw/sEF4B89WA6KsBhICw+c7ZFjW194I2AKo vxPW6ly4lbZGqGoPxV6yi0G/Vr/JY/b2bQILBmVoE2LEgToG3BoC8Bms2fPRezw3FAs6 rs55e9Cxo/7e9nAqAkEepnKDI9q6NhBx6QmhfqaQ900R2wEifq7T8W4DPfu6MGZT+Khf btHFXN3aHvhR6hYd745qdaYxuXS86cfNwyWHwJRzvRmhaRolW+lpmW328cecxh0/DACC ucIQ== 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=YC7M11fXq+xGELN2sjutJZ0lgYGk7rFu7/2gzx1QnSNnSKL6Ny9CONW4tF8Lkbuvq0 buxZDziUo0L9/K57WxM0eMt+yiu/1SxZdgOhcB0pqRWzvUHtaIuYtnicSyJh2slgj5j1 CIumR5IT55lEn1Q0L4wsFzyl1mJQzGubvUI+IaJYIgnjF9yhTA/ZXV5tt0axWbuEezuD CcBLdaGjMFbVRKdde3oaGCN88YFRJT/aLX3pjH9Am4/SCoF/8BsK44EoH7KdYywpsK2B UbQMlfTX4nuMgVApjQF2zx/HPYCvZh3aUcRnpvmGZXiLsJOMY2MvVhMmZTn8YiPp69uu BBSA== X-Gm-Message-State: APjAAAU62j8xQMeSbssSgDA2zO3+F/2sHj+fKwsI/g9/zDzy2NXXXmsv L2d4wzJsdQkSee1rC26/hydOYlcbD+7D X-Received: by 2002:a63:5c1c:: with SMTP id q28mr5467792pgb.288.1561667080410; Thu, 27 Jun 2019 13:24:40 -0700 (PDT) Date: Thu, 27 Jun 2019 13:24:14 -0700 In-Reply-To: <20190627202417.33370-1-brianvv@google.com> Message-Id: <20190627202417.33370-4-brianvv@google.com> Mime-Version: 1.0 References: <20190627202417.33370-1-brianvv@google.com> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [RFC PATCH bpf-next v2 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