Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • tools
  • lib
  • bpf
  • libbpf.map
Find file BlameHistoryPermalink
  • Yonghong Song's avatar
    tools/libbpf: Add bpf_iter support · c09add2f
    Yonghong Song authored May 09, 2020
    
    
    Two new libbpf APIs are added to support bpf_iter:
      - bpf_program__attach_iter
        Given a bpf program and additional parameters, which is
        none now, returns a bpf_link.
      - bpf_iter_create
        syscall level API to create a bpf iterator.
    
    The macro BPF_SEQ_PRINTF are also introduced. The format
    looks like:
      BPF_SEQ_PRINTF(seq, "task id %d\n", pid);
    
    This macro can help bpf program writers with
    nicer bpf_seq_printf syntax similar to the kernel one.
    
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
    Link: https://lore.kernel.org/bpf/20200509175917.2476936-1-yhs@fb.com
    c09add2f
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7