Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1134634ybi; Wed, 3 Jul 2019 10:04:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1bohrPHb9z7gFviGVmW25ZZC/woVP5OBpAXzZKHMtVv2SwE6innNSvqjmfeA3OngfF0Ov X-Received: by 2002:a63:30c6:: with SMTP id w189mr9532839pgw.398.1562173493758; Wed, 03 Jul 2019 10:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562173493; cv=none; d=google.com; s=arc-20160816; b=c9dTSP7Wkn20a7exI0QM0eIaQ2hpahyeCu31TQI7EtupoyOsEFbyZNsK7odfpKv/2q VgyZDHNdxReGx3yt30SDJzbmtrOi5NbDZthMK93A2Ka92j6LTNRb4T6TfIBxuMhXQAFV u9RJAsr5FwQTKJpR44jS9UMhdACjzY3zrk2zOqkxNENG9/7zk8+SfeQmlmowzfBT+dkJ iVDFGzC+sFAUA+SmAZ6fd75O62o5OSaUvZNya5N7X0y0qSoyZDC6eurJmjUNankbDG8C Gnf5FgVHTFzFCd8KW8LoBCRJ+scqe3XKG9+DBEK7qVB05zSyX6AxXnmeuf6IlbK0NrD6 vA1g== 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=FObiLyW+7s29VatAFwxKLbXFDiZhgbEOFEz5IaW9X1w=; b=OTFW7ivrtDFi+kMZ10mshMs2FJv0PBwsHfVhT4DGJmr2JI/cBlRjyJSrehS6Q6p69G mBsirF++1/N6zL809si2/S16G+oPksFtO7RNJSC7oByKRlVw4vGuh+f5dkV/VMUfxI6p reZoNi1BRSEtsEWWRFh1pSyXXPgT8XZGwIaukhU1QKozc0f/ypBuTC0w00zsUmj7xNs1 7tfW59lVvmv8rtRGg3M1lNsQmiVYN574dzJ8HoFgUx+G7ytgdGnsodDl5l9k9C+PDi/7 IGVW3ZxQsGiSUF3latVbiMNDNsPGla8awoxXiTZMxX39gSqUd0RBXGcdyrGD3JmUo2NE QDOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=V8AEOwvA; 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 f23si2884754pga.449.2019.07.03.10.04.38; Wed, 03 Jul 2019 10:04:53 -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=V8AEOwvA; 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 S1727383AbfGCRCb (ORCPT + 99 others); Wed, 3 Jul 2019 13:02:31 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:37420 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727278AbfGCRCJ (ORCPT ); Wed, 3 Jul 2019 13:02:09 -0400 Received: by mail-pg1-f202.google.com with SMTP id s5so1964435pgr.4 for ; Wed, 03 Jul 2019 10:02:09 -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=FObiLyW+7s29VatAFwxKLbXFDiZhgbEOFEz5IaW9X1w=; b=V8AEOwvALDT/8NX2//x05tIUvrGs+LLBWkkMt4Tq6pHW5f/PnuvfcIZjTjc2BO2qFL JzOszIwOXb2TEHCqDOZHt3yk7Sww+2v0Qg51V6t89xo8bESuZULcPxU+qWppWnpTXqmW t/VkkDo2pHH9td/cwUYFPhRGyO1M87HJwUi73lzhh5J5nmfwkk3BqUmFwBT+hSL913EE Z2vioVchf92XkkxlQeVoRdmTUlub1rbCM4uwTGWNDOa9/PDwhR+d1E/Cye6T0Vn9ROsd INc57Xeyj4ktrB6g6cVBCjCH84VKHEY5EPa2WP11gFKSLRL+KGGH2j3/rk4ddsgHyaD9 zDpQ== 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=FObiLyW+7s29VatAFwxKLbXFDiZhgbEOFEz5IaW9X1w=; b=j50mV49RXY0jf7PKXTNbhjiSUDQsYEcZRB1NVW3PstD+58mzcjP8YpL8sGXMzgblBW DFruwIiI5rlrKWqR93F3BRjRkwt9BsV6i7ehHT5ORR9CenjjoU6rVg1mMuiBN1IQbLvi MQjPWgKxjjK44ueAwCpb0ak8mAlFg4PeiIUNDGIeWRUCKsI57ImPrbXmfHcV96VbNbtF Ni+TxxMIpYCIRg6LBquVdXifUBTz09pNUrQU3MeBIl4teO6cOQODi+K1emJPQ20nnFzm tFZbCjDrkbOyMbl2fsgIa8czZTiTkipbCZszqx7Yyx40DGUrAuxLZy3DAHPn7FdFR2zj 6M7g== X-Gm-Message-State: APjAAAVK4Xb6y5EPmf7qm46M9G1GTYUyaUDMN9jzGqx3HqKLhoMApLMH 2YDdHs6xZzK/5jK2Ff7JECiMKNLve8rP X-Received: by 2002:a65:420c:: with SMTP id c12mr18547310pgq.125.1562173328926; Wed, 03 Jul 2019 10:02:08 -0700 (PDT) Date: Wed, 3 Jul 2019 10:01:15 -0700 In-Reply-To: <20190703170118.196552-1-brianvv@google.com> Message-Id: <20190703170118.196552-4-brianvv@google.com> Mime-Version: 1.0 References: <20190703170118.196552-1-brianvv@google.com> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH bpf-next RFC v3 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 a396b516a2b2..db6785a03538 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 */ + __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