diff --git a/include/bpftune/bpftune.bpf.h b/include/bpftune/bpftune.bpf.h index 2d3a1b7..988bd2f 100644 --- a/include/bpftune/bpftune.bpf.h +++ b/include/bpftune/bpftune.bpf.h @@ -205,7 +205,7 @@ unsigned int tuner_id; unsigned int strategy_id; unsigned int bpftune_pid; /* init_net value used for older kernels since __ksym does not work */ -unsigned long bpftune_init_net; +unsigned long long bpftune_init_net; /* TCP buffer tuning */ #ifndef SO_SNDBUF diff --git a/src/tcp_buffer_tuner.bpf.c b/src/tcp_buffer_tuner.bpf.c index 2c0202f..62c535a 100644 --- a/src/tcp_buffer_tuner.bpf.c +++ b/src/tcp_buffer_tuner.bpf.c @@ -37,7 +37,7 @@ int kernel_page_size; int kernel_page_shift; int sk_mem_quantum; int sk_mem_quantum_shift; -unsigned long nr_free_buffer_pages; +unsigned long long nr_free_buffer_pages; #define tcp_tunable_corr(__id, __cookie, __newval, __tp, __field_type, __field)\ { \ diff --git a/src/tcp_buffer_tuner.c b/src/tcp_buffer_tuner.c index a1feb14..580f32d 100644 --- a/src/tcp_buffer_tuner.c +++ b/src/tcp_buffer_tuner.c @@ -89,7 +89,7 @@ int get_from_file(FILE *fp, const char *fmt, ...) return ret; } -long nr_free_buffer_pages(bool initial) +long long nr_free_buffer_pages(bool initial) { unsigned long nr_pages = 0; char *mzone = "Normal";