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
  • kernel
  • bpf
  • devmap.c
Find file BlameHistoryPermalink
  • Kumar Kartikeya Dwivedi's avatar
    bpf: devmap: Implement devmap prog execution for generic XDP · 2ea5eaba
    Kumar Kartikeya Dwivedi authored Jul 02, 2021
    
    
    This lifts the restriction on running devmap BPF progs in generic
    redirect mode. To match native XDP behavior, it is invoked right before
    generic_xdp_tx is called, and only supports XDP_PASS/XDP_ABORTED/
    XDP_DROP actions.
    
    We also return 0 even if devmap program drops the packet, as
    semantically redirect has already succeeded and the devmap prog is the
    last point before TX of the packet to device where it can deliver a
    verdict on the packet.
    
    This also means it must take care of freeing the skb, as
    xdp_do_generic_redirect callers only do that in case an error is
    returned.
    
    Since devmap entry prog is supported, remove the check in
    generic_xdp_install entirely.
    
    Signed-off-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Reviewed-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
    Link: https://lore.kernel.org/bpf/20210702111825.491065-5-memxor@gmail.com
    2ea5eaba
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7