libbpf: Deprecate bpf_prog_test_run_xattr and bpf_prog_test_run
authorDelyan Kratunov <delyank@fb.com>
Wed, 2 Feb 2022 23:54:23 +0000 (15:54 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 3 Feb 2022 06:31:18 +0000 (22:31 -0800)
Deprecate non-extendable bpf_prog_test_run{,_xattr} in favor of
OPTS-based bpf_prog_test_run_opts ([0]).

  [0] Closes: https://github.com/libbpf/libbpf/issues/286

Signed-off-by: Delyan Kratunov <delyank@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220202235423.1097270-5-delyank@fb.com
tools/lib/bpf/bpf.h

index c2e8327010f9bed330c2ce0d496f2156eb7e1198..16b21757b8bff08c4d81afeb8f620c1438fa2809 100644 (file)
@@ -453,12 +453,14 @@ struct bpf_prog_test_run_attr {
                             * out: length of cxt_out */
 };
 
+LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_prog_test_run_opts() instead")
 LIBBPF_API int bpf_prog_test_run_xattr(struct bpf_prog_test_run_attr *test_attr);
 
 /*
  * bpf_prog_test_run does not check that data_out is large enough. Consider
- * using bpf_prog_test_run_xattr instead.
+ * using bpf_prog_test_run_opts instead.
  */
+LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_prog_test_run_opts() instead")
 LIBBPF_API int bpf_prog_test_run(int prog_fd, int repeat, void *data,
                                 __u32 size, void *data_out, __u32 *size_out,
                                 __u32 *retval, __u32 *duration);