iovisor / iovisor/bcc

[Py] Retrieve External Pinned Maps

Open
#3,517 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hi everyone,

I was wondering if BCC's Python library supports retrieving a BPF map from the file system (AKA a pinned map). I am loading an XDP program in C using [libbpf](https://github.com/libbpf/libbpf/) and pinning maps to the file system.

I am using a higher-level library in Python to retrieve information and trying to update the BPF maps with this information.

I've searched the reference guide [here](https://github.com/iovisor/bcc/blob/master/docs/reference_guide.md#bcc-python) and wasn't able to find any way to do this. It appears to be possible in BCC C according to [here](https://github.com/iovisor/bcc/blob/master/docs/reference_guide.md#pinned-maps), though. I also believe this is similar to the following.

https://github.com/iovisor/bcc/issues/2223

If this is currently not supported, is there any plans to add support in the future?

Any help is highly appreciated and thank you!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the BCC Python and pinned-maps sections of docs/reference_guide.md, then compare the existing C support and related issue #2223. Determine the Python-facing entry point needed to retrieve a filesystem-pinned map and update it; done means the documented API works with maps pinned by an XDP program.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, python
Domain
operating-systems, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.