summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@intel.com>2019-04-30 14:45:36 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-05-04 23:26:22 -0700
commit5750902a6e9bc6adb77da8257c0e34db2bfdebb2 (patch)
tree578931a064200ac50725b386d33f451a00c60d5b /tools/bpf
parent0e6741f092979535d159d5a851f12c88bfb7cb9a (diff)
libbpf: proper XSKMAP cleanup
The bpf_map_update_elem() function, when used on an XSKMAP, will fail if not a valid AF_XDP socket is passed as value. Therefore, this is function cannot be used to clear the XSKMAP. Instead, the bpf_map_delete_elem() function should be used for that. This patch also simplifies the code by breaking up xsk_update_bpf_maps() into three smaller functions. Reported-by: William Tu <u9012063@gmail.com> Fixes: 1cad07884239 ("libbpf: add support for using AF_XDP sockets") Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Tested-by: William Tu <u9012063@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions