|
|
0fb47c |
From 6516fb0d00208f05b29f320176204957b02b23e3 Mon Sep 17 00:00:00 2001
|
|
|
0fb47c |
From: Jerome Marchand <jmarchan@redhat.com>
|
|
|
0fb47c |
Date: Mon, 26 Jul 2021 12:05:57 +0200
|
|
|
0fb47c |
Subject: [PATCH] Define KERNEL_VERSION
|
|
|
0fb47c |
|
|
|
0fb47c |
The libbpf version on RHEL9 doesn't define it.
|
|
|
0fb47c |
---
|
|
|
0fb47c |
libbpf-tools/biolatency.bpf.c | 2 ++
|
|
|
0fb47c |
libbpf-tools/biosnoop.bpf.c | 2 ++
|
|
|
0fb47c |
libbpf-tools/bitesize.bpf.c | 2 ++
|
|
|
0fb47c |
3 files changed, 6 insertions(+)
|
|
|
0fb47c |
|
|
|
0fb47c |
diff --git a/libbpf-tools/biolatency.bpf.c b/libbpf-tools/biolatency.bpf.c
|
|
|
0fb47c |
index 8d8fe584..8e6e81e2 100644
|
|
|
0fb47c |
--- a/libbpf-tools/biolatency.bpf.c
|
|
|
0fb47c |
+++ b/libbpf-tools/biolatency.bpf.c
|
|
|
0fb47c |
@@ -9,6 +9,8 @@
|
|
|
0fb47c |
|
|
|
0fb47c |
#define MAX_ENTRIES 10240
|
|
|
0fb47c |
|
|
|
0fb47c |
+#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
|
|
|
0fb47c |
+
|
|
|
0fb47c |
extern int LINUX_KERNEL_VERSION __kconfig;
|
|
|
0fb47c |
|
|
|
0fb47c |
const volatile bool targ_per_disk = false;
|
|
|
0fb47c |
diff --git a/libbpf-tools/biosnoop.bpf.c b/libbpf-tools/biosnoop.bpf.c
|
|
|
0fb47c |
index 76697967..7b7cb1a4 100644
|
|
|
0fb47c |
--- a/libbpf-tools/biosnoop.bpf.c
|
|
|
0fb47c |
+++ b/libbpf-tools/biosnoop.bpf.c
|
|
|
0fb47c |
@@ -11,6 +11,8 @@
|
|
|
0fb47c |
const volatile bool targ_queued = false;
|
|
|
0fb47c |
const volatile dev_t targ_dev = -1;
|
|
|
0fb47c |
|
|
|
0fb47c |
+#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
|
|
|
0fb47c |
+
|
|
|
0fb47c |
extern __u32 LINUX_KERNEL_VERSION __kconfig;
|
|
|
0fb47c |
|
|
|
0fb47c |
struct piddata {
|
|
|
0fb47c |
diff --git a/libbpf-tools/bitesize.bpf.c b/libbpf-tools/bitesize.bpf.c
|
|
|
0fb47c |
index 7b4d3f9d..5e7d9d97 100644
|
|
|
0fb47c |
--- a/libbpf-tools/bitesize.bpf.c
|
|
|
0fb47c |
+++ b/libbpf-tools/bitesize.bpf.c
|
|
|
0fb47c |
@@ -10,6 +10,8 @@
|
|
|
0fb47c |
const volatile char targ_comm[TASK_COMM_LEN] = {};
|
|
|
0fb47c |
const volatile dev_t targ_dev = -1;
|
|
|
0fb47c |
|
|
|
0fb47c |
+#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
|
|
|
0fb47c |
+
|
|
|
0fb47c |
extern __u32 LINUX_KERNEL_VERSION __kconfig;
|
|
|
0fb47c |
|
|
|
0fb47c |
struct {
|
|
|
0fb47c |
--
|
|
|
0fb47c |
2.31.1
|
|
|
0fb47c |
|