From 02f7e3434d8ab8e536eaadd4b0e01b9b293e902f Mon Sep 17 00:00:00 2001 From: Abhishek Vijeev Date: Sat, 12 Sep 2020 17:31:40 +0530 Subject: [PATCH] images: adding support for BPF map file name and ifindex This commit adds a BPF map's name and ifindex to its protobuf image. ifindex is the index of the network interface to which the BPF map is attached and can be specified via a parameter while creating the BPF map (BPF_MAP_CREATE). This commit also provides a default value of false to the field 'frozen'. Source files modified: * images/bpfmap-file.proto Signed-off-by: Abhishek Vijeev --- images/bpfmap-file.proto | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/images/bpfmap-file.proto b/images/bpfmap-file.proto index ae789aa72..6560bb646 100644 --- a/images/bpfmap-file.proto +++ b/images/bpfmap-file.proto @@ -15,6 +15,8 @@ message bpfmap_file_entry { required uint32 max_entries = 9; required uint32 map_flags = 10; required uint64 memlock = 11; - required bool frozen = 12; - optional sint32 mnt_id = 13 [default = -1]; + required bool frozen = 12 [default = false]; + required string map_name = 13; + required uint32 ifindex = 14 [default = 0]; + optional sint32 mnt_id = 15 [default = -1]; }