aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2019-03-11 15:37:55 -0400
committerDan Williams <dan.j.williams@intel.com>2019-03-11 15:37:55 -0400
commit4083014e32699af04a8e6eaa4855b08dba36a47a (patch)
treefa37f9f9691fe64ca8a3c0cdc0315dc12462e6e4 /tools/bpf/bpftool/prog.c
parent6fd96ff557963de8e62842a0dc360a6e3610d2bb (diff)
parent78153dd45e7e0596ba32b15d02bda08e1513111e (diff)
Merge branch 'for-5.1/nfit/ars' into libnvdimm-for-next
Merge several updates to the ARS implementation. Highlights include: * Support retrieval of short-ARS results if the ARS state is "requires continuation", and even if the "no_init_ars" module parameter is specified. * Allow busy-polling of the kernel ARS state by allowing root to reset the exponential back-off timer. * Filter potentially stale ARS results by tracking query-ARS relative to the previous start-ARS.
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 2d1bb7d6ff51..b54ed82b9589 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -78,13 +78,14 @@ static void print_boot_time(__u64 nsecs, char *buf, unsigned int size)
78 78
79static int prog_fd_by_tag(unsigned char *tag) 79static int prog_fd_by_tag(unsigned char *tag)
80{ 80{
81 struct bpf_prog_info info = {};
82 __u32 len = sizeof(info);
83 unsigned int id = 0; 81 unsigned int id = 0;
84 int err; 82 int err;
85 int fd; 83 int fd;
86 84
87 while (true) { 85 while (true) {
86 struct bpf_prog_info info = {};
87 __u32 len = sizeof(info);
88
88 err = bpf_prog_get_next_id(id, &id); 89 err = bpf_prog_get_next_id(id, &id);
89 if (err) { 90 if (err) {
90 p_err("%s", strerror(errno)); 91 p_err("%s", strerror(errno));