bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Bo <yyyeer.bo@gmail.com>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, Yang Bo <bo@hyper.sh>
Subject: [PATCH 0/2] Add api to manipulate global varaible
Date: Mon,  5 Jun 2023 16:57:31 +0800	[thread overview]
Message-ID: <20230605085733.1833-1-yb203166@antfin.com> (raw)

From: Yang Bo <bo@hyper.sh>

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

-- 
2.40.0


             reply	other threads:[~2023-06-05  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05  8:57 Yang Bo [this message]
2023-06-05  8:57 ` [PATCH 1/2] Add api to manipulate global variable Yang Bo
2023-06-05 10:12   ` Greg KH
2023-06-05 21:28   ` Andrii Nakryiko
2023-06-05  8:57 ` [PATCH 2/2] mini test case Yang Bo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605085733.1833-1-yb203166@antfin.com \
    --to=yyyeer.bo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bo@hyper.sh \
    --cc=bpf@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).