|
|
7e752c |
From ac8f163e0b2e14afdc8a1a1d449f1e5db07075ba Mon Sep 17 00:00:00 2001
|
|
|
7e752c |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
7e752c |
Date: Thu, 13 Jun 2019 14:37:57 +0200
|
|
|
7e752c |
Subject: [PATCH] lib/bpf: fix build warning if no elf
|
|
|
7e752c |
MIME-Version: 1.0
|
|
|
7e752c |
Content-Type: text/plain; charset=UTF-8
|
|
|
7e752c |
Content-Transfer-Encoding: 8bit
|
|
|
7e752c |
|
|
|
7e752c |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1716361
|
|
|
7e752c |
Upstream Status: iproute2.git commit 33fde2b60081e
|
|
|
7e752c |
|
|
|
7e752c |
commit 33fde2b60081ed9ac16f7dd81c48233803855689
|
|
|
7e752c |
Author: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
7e752c |
Date: Mon Dec 10 13:50:17 2018 -0800
|
|
|
7e752c |
|
|
|
7e752c |
lib/bpf: fix build warning if no elf
|
|
|
7e752c |
|
|
|
7e752c |
Function was not used unlesss HAVE_ELF causing:
|
|
|
7e752c |
|
|
|
7e752c |
bpf.c:105:13: warning: ‘bpf_map_offload_neutral’ defined but not used [-Wunused-function]
|
|
|
7e752c |
|
|
|
7e752c |
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
7e752c |
---
|
|
|
7e752c |
lib/bpf.c | 10 +++++-----
|
|
|
7e752c |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
7e752c |
|
|
|
7e752c |
diff --git a/lib/bpf.c b/lib/bpf.c
|
|
|
7e752c |
index 6aff8f7bad7fb..5e85cfc0bdd5b 100644
|
|
|
7e752c |
--- a/lib/bpf.c
|
|
|
7e752c |
+++ b/lib/bpf.c
|
|
|
7e752c |
@@ -102,11 +102,6 @@ static const struct bpf_prog_meta __bpf_prog_meta[] = {
|
|
|
7e752c |
},
|
|
|
7e752c |
};
|
|
|
7e752c |
|
|
|
7e752c |
-static bool bpf_map_offload_neutral(enum bpf_map_type type)
|
|
|
7e752c |
-{
|
|
|
7e752c |
- return type == BPF_MAP_TYPE_PERF_EVENT_ARRAY;
|
|
|
7e752c |
-}
|
|
|
7e752c |
-
|
|
|
7e752c |
static const char *bpf_prog_to_subdir(enum bpf_prog_type type)
|
|
|
7e752c |
{
|
|
|
7e752c |
assert(type < ARRAY_SIZE(__bpf_prog_meta) &&
|
|
|
7e752c |
@@ -1610,6 +1605,11 @@ static bool bpf_is_map_in_map_type(const struct bpf_elf_map *map)
|
|
|
7e752c |
map->type == BPF_MAP_TYPE_HASH_OF_MAPS;
|
|
|
7e752c |
}
|
|
|
7e752c |
|
|
|
7e752c |
+static bool bpf_map_offload_neutral(enum bpf_map_type type)
|
|
|
7e752c |
+{
|
|
|
7e752c |
+ return type == BPF_MAP_TYPE_PERF_EVENT_ARRAY;
|
|
|
7e752c |
+}
|
|
|
7e752c |
+
|
|
|
7e752c |
static int bpf_map_attach(const char *name, struct bpf_elf_ctx *ctx,
|
|
|
7e752c |
const struct bpf_elf_map *map, struct bpf_map_ext *ext,
|
|
|
7e752c |
int *have_map_in_map)
|
|
|
7e752c |
--
|
|
|
7e752c |
2.20.1
|
|
|
7e752c |
|