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
  • arraymap.c
Find file BlameHistoryPermalink
  • Andrii Nakryiko's avatar
    bpf: make uniform use of array->elem_size everywhere in arraymap.c · d937bc34
    Andrii Nakryiko authored Jul 14, 2022
    
    
    BPF_MAP_TYPE_ARRAY is rounding value_size to closest multiple of 8 and
    stores that as array->elem_size for various memory allocations and
    accesses.
    
    But the code tends to re-calculate round_up(map->value_size, 8) in
    multiple places instead of using array->elem_size. Cleaning this up and
    making sure we always use array->size to avoid duplication of this
    (admittedly simple) logic for consistency.
    
    Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/r/20220715053146.1291891-3-andrii@kernel.org
    
    
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    d937bc34
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7