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
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • bpf
  • btf.c
Find file BlameHistoryPermalink
  • Joanne Koong's avatar
    bpf: Support "sk_buff" and "xdp_buff" as valid kfunc arg types · 2f464393
    Joanne Koong authored Mar 01, 2023
    
    
    The bpf mirror of the in-kernel sk_buff and xdp_buff data structures are
    __sk_buff and xdp_md. Currently, when we pass in the program ctx to a
    kfunc where the program ctx is a skb or xdp buffer, we reject the
    program if the in-kernel definition is sk_buff/xdp_buff instead of
    __sk_buff/xdp_md.
    
    This change allows "sk_buff <--> __sk_buff" and "xdp_buff <--> xdp_md"
    to be recognized as valid matches. The user program may pass in their
    program ctx as a __sk_buff or xdp_md, and the in-kernel definition
    of the kfunc may define this arg as a sk_buff or xdp_buff.
    
    Signed-off-by: default avatarJoanne Koong <joannelkoong@gmail.com>
    Link: https://lore.kernel.org/r/20230301154953.641654-2-joannelkoong@gmail.com
    
    
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    2f464393
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7