• Parav Pandit's avatar
    RDMA/core: Add command to set ib_core device net namspace sharing mode · 2b34c558
    Parav Pandit authored
    Add netlink command that enables/disables sharing rdma device among
    multiple net namespaces.
    
    Using rdma tool,
    $rdma sys set netns shared (default mode)
    
    When rdma subsystem netns mode is set to shared mode, rdma devices
    will be accessible in all net namespaces.
    
    Using rdma tool,
    $rdma sys set netns exclusive
    
    When rdma subsystem netns mode is set to exclusive mode, devices
    will be accessible in only one net namespace at any given
    point of time.
    
    If there are any net namespaces other than default init_net exists,
    while executing this command, it will fail and mode cannot be changed.
    
    To change this mode, netlink command is used instead of sysctl, because
    netlink command allows to auto load a module.
    Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    2b34c558
core_priv.h 9.85 KB