From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F815C282C4 for ; Mon, 4 Feb 2019 19:01:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E003E2082E for ; Mon, 4 Feb 2019 19:01:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="G8/3Tm2k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728589AbfBDTBB (ORCPT ); Mon, 4 Feb 2019 14:01:01 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:42484 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfBDTBB (ORCPT ); Mon, 4 Feb 2019 14:01:01 -0500 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x14IuEQ2008926 for ; Mon, 4 Feb 2019 11:01:00 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=OihhtBA22Pb1vni9QLh+QZDk2R6DRCoIbQuy21EdwXU=; b=G8/3Tm2k44yg6uZnfOcpiVZVEgoPW2h+NUu4dJPsnE70Ny0KRnVSwMteek+ASX9udnP/ ms6ipRN3/8Pq/1Ibc/c38g73rLmN7tbx+Enpj1FP0QVZAIpErua7jNueFVdg20cW0bYt jp5bVNqkjJYAhhntkJFYqEN1QMYbmHbhXmo= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2qetung2vm-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 04 Feb 2019 11:01:00 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Mon, 4 Feb 2019 11:00:58 -0800 Received: by devbig003.ftw2.facebook.com (Postfix, from userid 128203) id 7D2C837027B8; Mon, 4 Feb 2019 11:00:57 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig003.ftw2.facebook.com To: CC: Alexei Starovoitov , Daniel Borkmann , , Yonghong Song Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH bpf-next 0/2] tools/bpf: expose several libbpf API functions Date: Mon, 4 Feb 2019 11:00:57 -0800 Message-ID: <20190204190057.3965903-1-yhs@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-04_13:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch set exposed a few functions in libbpf. All these newly added API functions are helpful for JIT based bpf compilation where .BTF and .BTF.ext are available as in-memory data blobs. Patch #1 exposed several btf_ext__* API functions which are used to handle .BTF.ext ELF sections. Patch #2 refactored the function bpf_map_find_btf_info() and exposed API function btf__get_map_kv_tids() to retrieve the map key/value type id's generated by bpf program through BPF_ANNOTATE_KV_PAIR macro. Yonghong Song (2): tools/bpf: expose functions btf_ext__* as API functions tools/bpf: implement libbpf btf__get_map_kv_tids() API function tools/lib/bpf/btf.c | 73 ++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/btf.h | 28 ++++++++------- tools/lib/bpf/libbpf.c | 72 +++++---------------------------------- tools/lib/bpf/libbpf.map | 7 ++++ 4 files changed, 105 insertions(+), 75 deletions(-) -- 2.17.1