From patchwork Tue Dec 14 03:41:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kui-Feng Lee X-Patchwork-Id: 12675401 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6121AC433F5 for ; Tue, 14 Dec 2021 03:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232741AbhLNDnH (ORCPT ); Mon, 13 Dec 2021 22:43:07 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:44192 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230072AbhLNDnH (ORCPT ); Mon, 13 Dec 2021 22:43:07 -0500 Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.16.1.2/8.16.1.2) with ESMTP id 1BDMeL1Y001554 for ; Mon, 13 Dec 2021 19:43:06 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=facebook; bh=JD2PCGky332YeXupqsPf651t+k+QAardVW41h4anoaM=; b=o6JVkeHNPpID4kkRM3sMYof/YzChSsb0DNP+YI9Fv/XLcjNza2hFfHpYFvpvaZUL9FEp boSMczOjn5lJ7cVAKgcnhJYqHuhDrcs5jKLcCc7iTRL+FVmZzS4NDPQgDuctYTKu/1WQ 1u3F2JFai6s4iV+aSYRrboTC7kn2JP0BDyU= Received: from maileast.thefacebook.com ([163.114.130.16]) by m0089730.ppops.net (PPS) with ESMTPS id 3cx9rn4bdx-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 13 Dec 2021 19:43:06 -0800 Received: from intmgw002.06.ash9.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 19:43:01 -0800 Received: by devvm1744.ftw0.facebook.com (Postfix, from userid 460691) id EFB98112FE3E; Mon, 13 Dec 2021 19:42:58 -0800 (PST) From: Kui-Feng Lee To: , , , CC: Kui-Feng Lee Subject: [PATCH v3 bpf-next 4/4] libbpf: Mark bpf_object__find_program_by_title API deprecated. Date: Mon, 13 Dec 2021 19:41:47 -0800 Message-ID: <20211214034147.1071682-5-kuifeng@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211214034147.1071682-1-kuifeng@fb.com> References: <20211214034147.1071682-1-kuifeng@fb.com> X-FB-Internal: Safe X-FB-Source: Intern X-Proofpoint-ORIG-GUID: zwB-dFEHpl767A1gtrBUakmooNZUz0pj X-Proofpoint-GUID: zwB-dFEHpl767A1gtrBUakmooNZUz0pj X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-14_01,2021-12-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=fb_outbound_notspam policy=fb_outbound score=0 phishscore=0 mlxlogscore=825 clxscore=1015 suspectscore=0 mlxscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112140017 X-FB-Internal: deliver Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Deprecate this API since v0.7. All callers should move to bpf_object__find_program_by_name if possible, otherwise use bpf_object__for_each_program to find a program out from a given section. [0] Closes: https://github.com/libbpf/libbpf/issues/292 Signed-off-by: Kui-Feng Lee --- tools/lib/bpf/libbpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 4802c1e736c3..cd9dec4def41 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -187,6 +187,7 @@ struct btf; LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj); LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj); +LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__find_program_by_name() instead") LIBBPF_API struct bpf_program * bpf_object__find_program_by_title(const struct bpf_object *obj, const char *title);