From ebffb0fc49d4f800af12be55359494a9d3bc5bff Mon Sep 17 00:00:00 2001 From: Jatin <84621253+h0x0er@users.noreply.github.com> Date: Fri, 22 Aug 2025 12:31:12 +0530 Subject: [PATCH] map(generic): fixed placeholders --- snippets/maps.code-snippets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/snippets/maps.code-snippets b/snippets/maps.code-snippets index 58282e7..20b08d5 100644 --- a/snippets/maps.code-snippets +++ b/snippets/maps.code-snippets @@ -36,18 +36,18 @@ "scope": "c", "prefix": "bpf-map-generic", "body": [ - "${9| ,// Refer: https://docs.ebpf.io/linux/map-type/|}", + "${10| ,// Refer: https://docs.ebpf.io/linux/map-type/|}", "struct {", "\t__uint(type, ${1|BPF_MAP_TYPE_HASH,BPF_MAP_TYPE_PERCPU_HASH,BPF_MAP_TYPE_LPM_TRIE,BPF_MAP_TYPE_ARRAY,BPF_MAP_TYPE_PERCPU_ARRAY,BPF_MAP_TYPE_LRU_HASH,BPF_MAP_TYPE_LRU_PERCPU_HASH,BPF_MAP_TYPE_LPM_TRIE,BPF_MAP_TYPE_BLOOM_FILTER,BPF_MAP_TYPE_ARENA,BPF_MAP_TYPE_QUEUE,BPF_MAP_TYPE_STACK,BPF_MAP_TYPE_PERF_EVENT_ARRAY|});", "\t__type(key, ${2:u64});", - "\t__type(value, ${4:u8});", - "\t__uint(max_entries, ${6:100});", + "\t__type(value, ${3:u8});", + "\t__uint(max_entries, ${4:100});", "\t__uint(pinning, LIBBPF_PIN_BY_NAME) // remove if not needed", - "\t__uint(key_size, ${3:sizeof(u64)}); // remove if not needed", - "\t__uint(value_size, ${5:sizeof(u64)}); // remove if not needed", - "\t__array(values, struct my_value); // remove if not needed", - "\t__uint(map_flags, ${7|BPF_F_NO_PREALLOC,BPF_F_NUMA_NODE,BPF_F_RDONLY,BPF_F_RDONLY_PROG,BPF_F_WRONLY_PROG|}); // remove if not needed", - "} ${8:my_map_name} SEC(\".maps\");" + "\t__uint(key_size, ${5:sizeof(u64)}); // remove if not needed", + "\t__uint(value_size, ${6:sizeof(u64)}); // remove if not needed", + "\t__array(values, ${7:struct my_value}); // remove if not needed", + "\t__uint(map_flags, ${8|BPF_F_NO_PREALLOC,BPF_F_NUMA_NODE,BPF_F_RDONLY,BPF_F_RDONLY_PROG,BPF_F_WRONLY_PROG|}); // remove if not needed", + "} ${9:my_map_name} SEC(\".maps\");" ] }, "create generic map-in-map": {