From: Daniel Borkmann Date: Fri, 10 Aug 2018 18:54:08 +0000 (+0200) Subject: Merge branch 'bpf-btf-for-htab-lru' X-Git-Tag: v4.19-rc1~140^2~24^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74b247f4c36315e5c08580700a68e0eb3b72de03;p=thirdparty%2Flinux.git Merge branch 'bpf-btf-for-htab-lru' Yonghong Song says: ==================== Commit a26ca7c982cb ("bpf: btf: Add pretty print support to the basic arraymap") added pretty print support to array map. This patch adds pretty print for hash and lru_hash maps. The following example shows the pretty-print result of a pinned hashmap. Without this patch set, user will get an error instead. struct map_value { int count_a; int count_b; }; cat /sys/fs/bpf/pinned_hash_map: 87907: {87907,87908} 57354: {37354,57355} 76625: {76625,76626} ... Patch #1 fixed a bug in bpffs map_seq_next() function so that all elements in the hash table will be traversed. Patch #2 implemented map_seq_show_elem() and map_check_btf() callback functions for hash and lru hash maps. Patch #3 enhanced tools/testing/selftests/bpf/test_btf.c to test bpffs hash and lru hash map pretty print. ==================== Signed-off-by: Daniel Borkmann --- 74b247f4c36315e5c08580700a68e0eb3b72de03