Thread (2 messages) flat view 2 messages, 2 authors, 2020-08-28

Re: [PATCH bpf-next] bpf: make bpf_link_info.iter similar to bpf_iter_link_info

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2020-08-28 12:37:05
Also in: bpf

On 8/28/20 7:19 AM, Yonghong Song wrote:
bpf_link_info.iter is used by link_query to return
bpf_iter_link_info to user space. Fields may be different
,e.g., map_fd vs. map_id, so we cannot reuse
the exact structure. But make them similar, e.g.,
   struct bpf_link_info {
      /* common fields */
      union {
	struct { ... } raw_tracepoint;
	struct { ... } tracing;
	...
	struct {
	    /* common fields for iter */
	    union {
		struct {
		    __u32 map_id;
		} map;
		/* other structs for other targets */
	    };
	};
     };
  };
so the structure is extensible the same way as
bpf_iter_link_info.

Fixes: 6b0a249a301e ("bpf: Implement link_query for bpf iterators")
Acked-by: Andrii Nakryiko <redacted>
Signed-off-by: Yonghong Song <redacted>
Applied, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help