From nobody Sun Feb 8 17:42:05 2026 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 757BF3385B9 for ; Thu, 30 Oct 2025 07:52:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761810771; cv=none; b=r7pPuRtFEhkUwDr74IvwRH1SwAhogUVWJUKZa85wCjIOgfsEvV7YHw71GhCXRYk0pXu2qYKx/8Zo529aDSFguL2xB10LNRCszuaQWZHYKqNXHpZM0KSroYLh7ekt4KG2zq29dV172eE6vtrETNaHPk9BMtlrNxPR46oxWzstN6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761810771; c=relaxed/simple; bh=jCnVFmhEiH0CWgQ9Wkjj1WRdWmTVSADaUfBtR70yHBo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DoT6VbzLDnED/eDIUMXYIvv9+8+vcNz/JnpjRxGsjtW7phQHxK5h/XqlufsSQf/HsFToS+GL7iC3P0p3YWEzjXSAYgBJlOGvtJgsG3IUF7tY3LFeR4R8J0PONyf/T5KO/HdyrB+wfvv83z4Ky3ml7MILbaU5xudR7cyjftD7+9E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kTGxVqYT; arc=none smtp.client-ip=209.85.210.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kTGxVqYT" Received: by mail-pf1-f196.google.com with SMTP id d2e1a72fcca58-78125ed4052so1216162b3a.0 for ; Thu, 30 Oct 2025 00:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761810766; x=1762415566; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=es//t3hYUc1h16tXpqwms9mTk2LcY28iDx1fAoGPlsk=; b=kTGxVqYTvFJ5shJnWM3q3sKxg8rOMk7IhvWXxMcHGytdLv80gwpeR5xzvkEKZTDDaS QB4c4KrCwB8hh8Oa0hPeZomuD3LFbcfA9m9d+ExQiaL0DieGJwxD1ftT5LqoFyQ3fRpd 6z6GDuzN7703DXOLwJFrK+F70mTDHD6a20xSPxcVc1GUnYeShcC9V1sh1BhQ5azpmO0z hKV/wEZmEXsC0Xz6rAUNxqtBu84+3bv5ninz9tsTVV9PLA+hW97C8u8s4pPkol3olO58 yi5q6fL3keE3oRLNp4ySrpaSymVy62vX+Gj27owQl+Xbi9MzDZ0oLQ/NSaeudZqvz2Gv UpEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761810766; x=1762415566; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=es//t3hYUc1h16tXpqwms9mTk2LcY28iDx1fAoGPlsk=; b=cwVdLzFYBrbg1Uy4je1krSr8hqMUeuayX5iF2GE8N8Mj0JLe/a+hj0gdB917/T8jn7 /1TVE4et9IDhuWmGYV7LHJ1HhEfVUGl1u8IxKfNTkSgwc27bZW5oLFMYGGmGE39TRbta ba2WY3zluun8mE8c7n7cHJ2ccxcpLtGmuRTA6q/qPfouvmwjxY328dvXEkMI2mbp9avJ R+nFanB6sSvfPzFP83iYDQRkLhgqEEGI+4LeRZKrP7mLbszqq3M7HZ43cK85V42bbOH4 Y8NO4pGQ/2O5Z5mgMzlUgmHW4jlPSH0RVwWcXdor1SbupTV8OGCEt1wJ5HtWb9J2SyTQ 3jBw== X-Gm-Message-State: AOJu0YymlowX74LudbiJQpdY000GIyvcFWU5K1oQsGcc+tHAuQE6M+tA ZKpvxE79xtn+ccf00ot8DbvYPvk1jR//X8CPBxWE8rxxWQSl15bwgnIGRxPIl+kY X-Gm-Gg: ASbGncuI971z5hOuDr1aZ7MTKgZTlCPdb+WdmOg1//yds8KnDl8kM3MAw3ZwuFFqrzs HpSjZQwwLiNnEwqRUqFh9beTDXlgpJSOKoEyLp7tzbfhVVv27Heh63reOj4L6ZBWS85Dak60x/Q YieCj15rLKDhkgk/kCXmEht+9rt6mq9PRhtY/kiHEerW2O4UPtBD+ULi9b6do/BkugDQ/UDgNVn aNt7XFOkHLnFIBvFH9ap3zVGaH0Z1TXq5T6o0cNEcUE+hNt3QrsrQ+dKIRRUedDzDR/0urOAb5h 9gPb4LAqxbXs0Li2yM79XIcbOw6oBsnyQz1vKaxXIQVo64akC1TwuB5LkURIu3AW8r72sgAvkX/ WqmypcnLlext1QQ5zJrp/HjyiFOmsZdkVjS7TCZDAL2GwGee2eg+vDsYcaT9UfeN1vjgM3LiohJ PBGgcmq9g/De3Gr/e6ZQ== X-Google-Smtp-Source: AGHT+IHZ8ksUbK5gXKZSid7wPAY7piPOvChEgdLcJImb7iQbWhTr5ZvKB9Bn7kp1zwGLCz13KWhebA== X-Received: by 2002:a05:6a00:22ce:b0:7a2:75a9:b2b7 with SMTP id d2e1a72fcca58-7a62a3624d0mr2758460b3a.1.1761810766150; Thu, 30 Oct 2025 00:52:46 -0700 (PDT) Received: from E07P150077.ecarx.com.cn ([103.52.189.24]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7a414065418sm17955236b3a.41.2025.10.30.00.52.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 00:52:45 -0700 (PDT) From: Jianyun Gao To: linux-kernel@vger.kernel.org Cc: Jianyun Gao , Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org (open list:BPF [LIBRARY] (libbpf)) Subject: [PATCH] libbpf: fix some mismatched @param tags in Doxygen comment of libbpf.h Date: Thu, 30 Oct 2025 15:52:37 +0800 Message-Id: <20251030075237.1213902-1-jianyungao89@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There are some mismatched @param tags in Doxygen comment of libbpf.h. The following is a case: /** * @brief **bpf_link__unpin()** unpins the BPF link from a file * in the BPFFS specified by a path. This decrements the links * reference count. * * The file pinning the BPF link can also be unlinked by a different * process in which case this function will return an error. * * @param prog BPF program to unpin * @param path file path to the pin in a BPF file system * @return 0, on success; negative error code, otherwise */ LIBBPF_API int bpf_link__unpin(struct bpf_link *link); In the parameters of the bpf_link__unpin() function, there are no 'prog' and 'path' parameters. This patch fixes the issues present in the Doxygen comments in the libbpf.h file. Signed-off-by: Jianyun Gao --- tools/lib/bpf/libbpf.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 5118d0a90e24..8ca7957c8dd4 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -481,14 +481,12 @@ LIBBPF_API int bpf_link__pin(struct bpf_link *link, c= onst char *path); =20 /** * @brief **bpf_link__unpin()** unpins the BPF link from a file - * in the BPFFS specified by a path. This decrements the links - * reference count. + * in the BPFFS. This decrements the links reference count. * * The file pinning the BPF link can also be unlinked by a different * process in which case this function will return an error. * - * @param prog BPF program to unpin - * @param path file path to the pin in a BPF file system + * @param link BPF link to unpin * @return 0, on success; negative error code, otherwise */ LIBBPF_API int bpf_link__unpin(struct bpf_link *link); @@ -995,8 +993,13 @@ LIBBPF_API __u32 bpf_program__line_info_cnt(const stru= ct bpf_program *prog); * - fentry/fexit/fmod_ret; * - lsm; * - freplace. - * @param prog BPF program to set the attach type for - * @param type attach type to set the BPF map to have + * @param prog BPF program to configure; must be not yet loaded. + * @param attach_prog_fd FD of target BPF program (for freplace/extension). + * If >0 and func name omitted, defers BTF ID resolution. + * @param attach_func_name Target function name. Used either with + * attach_prog_fd to find its BTF ID in that program, or alone + * (no attach_prog_fd) to resolve kernel (vmlinux/module) BTF ID. Must be + * provided if attach_prog_fd is 0. * @return error code; or 0 if no error occurred. */ LIBBPF_API int @@ -1098,6 +1101,7 @@ LIBBPF_API __u32 bpf_map__value_size(const struct bpf= _map *map); /** * @brief **bpf_map__set_value_size()** sets map value size. * @param map the BPF map instance + * @param size the new value size * @return 0, on success; negative error, otherwise * * There is a special case for maps with associated memory-mapped regions,= like @@ -1202,7 +1206,7 @@ LIBBPF_API struct bpf_map *bpf_map__inner_map(struct = bpf_map *map); * per-CPU values value size has to be aligned up to closest 8 bytes for * alignment reasons, so expected size is: `round_up(value_size, 8) * * libbpf_num_possible_cpus()`. - * @flags extra flags passed to kernel for this operation + * @param flags extra flags passed to kernel for this operation * @return 0, on success; negative error, otherwise * * **bpf_map__lookup_elem()** is high-level equivalent of @@ -1226,7 +1230,7 @@ LIBBPF_API int bpf_map__lookup_elem(const struct bpf_= map *map, * per-CPU values value size has to be aligned up to closest 8 bytes for * alignment reasons, so expected size is: `round_up(value_size, 8) * * libbpf_num_possible_cpus()`. - * @flags extra flags passed to kernel for this operation + * @param flags extra flags passed to kernel for this operation * @return 0, on success; negative error, otherwise * * **bpf_map__update_elem()** is high-level equivalent of @@ -1242,7 +1246,7 @@ LIBBPF_API int bpf_map__update_elem(const struct bpf_= map *map, * @param map BPF map to delete element from * @param key pointer to memory containing bytes of the key * @param key_sz size in bytes of key data, needs to match BPF map definit= ion's **key_size** - * @flags extra flags passed to kernel for this operation + * @param flags extra flags passed to kernel for this operation * @return 0, on success; negative error, otherwise * * **bpf_map__delete_elem()** is high-level equivalent of @@ -1265,7 +1269,7 @@ LIBBPF_API int bpf_map__delete_elem(const struct bpf_= map *map, * per-CPU values value size has to be aligned up to closest 8 bytes for * alignment reasons, so expected size is: `round_up(value_size, 8) * * libbpf_num_possible_cpus()`. - * @flags extra flags passed to kernel for this operation + * @param flags extra flags passed to kernel for this operation * @return 0, on success; negative error, otherwise * * **bpf_map__lookup_and_delete_elem()** is high-level equivalent of @@ -1637,6 +1641,7 @@ struct perf_buffer_opts { * @param sample_cb function called on each received data record * @param lost_cb function called when record loss has occurred * @param ctx user-provided extra context passed into *sample_cb* and *los= t_cb* + * @param opts optional parameters for the perf buffer, mainly *sample_per= iod* * @return a new instance of struct perf_buffer on success, NULL on error = with * *errno* containing an error code */ --=20 2.34.1