Skip to content

Add api to manipulate global varaible

Yang Bo bpf 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Add api to manipulate global variabletools/lib/bpf/bpf.c tools/lib/bpf/bpf.h tools/lib/bpf/libbpf.map+819 -02 replies
2/2mini test case.tools/lib/bpf/mini/Makefile tools/lib/bpf/mini/main.c+132 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Add api to manipulate global varaible

From: Yang Bo <[email protected]>

We (the antgroup) has a requirement to manipulate global variables. The platform to manage bpf bytecode has no idea about varaibles' type/size/address. It only has some strings (like key = value) passed from admin. We find a way to parse BTF and then query/update the variables. There may be better ways to do it. This approach is what we can find for now.

Yang Bo (2):
Add api to manipulate global variable
mini test case.

 tools/lib/bpf/bpf.c         | 808 ++++++++++++++++++++++++++++++++++++
 tools/lib/bpf/bpf.h         |   9 +
 tools/lib/bpf/libbpf.map    |   2 +
 tools/lib/bpf/mini/Makefile |   2 +
 tools/lib/bpf/mini/main.c   | 130 ++++++
 5 files changed, 951 insertions(+)
 create mode 100644 tools/lib/bpf/mini/Makefile
 create mode 100644 tools/lib/bpf/mini/main.c
Signature · 1 line
2.40.0