summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdpsock_kern.c
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2018-08-31 03:00:49 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2018-09-01 01:36:08 +0200
commit11c3f5113600c40cc8789f9a7023e02b73cb0ca7 (patch)
treedb25a98797cdf9ed1175c8dc435c6d90632ce1b0 /samples/bpf/xdpsock_kern.c
parentxsk: remove unnecessary assignment (diff)
downloadlinux-11c3f5113600c40cc8789f9a7023e02b73cb0ca7.tar.xz
linux-11c3f5113600c40cc8789f9a7023e02b73cb0ca7.zip
samples/bpf: xdpsock, minor fixes
- xsks_map size was fixed to 4, changed it MAX_SOCKS - Remove redundant definition of MAX_SOCKS in xdpsock_user.c - In dump_stats(), add NULL check for xsks[i] Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Acked-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples/bpf/xdpsock_kern.c')
-rw-r--r--samples/bpf/xdpsock_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdpsock_kern.c b/samples/bpf/xdpsock_kern.c
index d8806c41362e..b8ccd0802b3f 100644
--- a/samples/bpf/xdpsock_kern.c
+++ b/samples/bpf/xdpsock_kern.c
@@ -16,7 +16,7 @@ struct bpf_map_def SEC("maps") xsks_map = {
.type = BPF_MAP_TYPE_XSKMAP,
.key_size = sizeof(int),
.value_size = sizeof(int),
- .max_entries = 4,
+ .max_entries = MAX_SOCKS,
};
struct bpf_map_def SEC("maps") rr_map = {