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
  • net
  • switchdev
  • switchdev.c
Find file BlameHistoryPermalink
  • Vladimir Oltean's avatar
    net: switchdev: merge switchdev_handle_fdb_{add,del}_to_device · 716a30a9
    Vladimir Oltean authored Oct 26, 2021
    
    
    To reduce code churn, the same patch makes multiple changes, since they
    all touch the same lines:
    
    1. The implementations for these two are identical, just with different
       function pointers. Reduce duplications and name the function pointers
       "mod_cb" instead of "add_cb" and "del_cb". Pass the event as argument.
    
    2. Drop the "const" attribute from "orig_dev". If the driver needs to
       check whether orig_dev belongs to itself and then
       call_switchdev_notifiers(orig_dev, SWITCHDEV_FDB_OFFLOADED), it
       can't, because call_switchdev_notifiers takes a non-const struct
       net_device *.
    
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    716a30a9
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7