• P
    RDMA/core: Add command to set ib_core device net namspace sharing mode · 2b34c558
    Parav Pandit 提交于
    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: NParav Pandit <parav@mellanox.com>
    Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
    Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
    2b34c558
device.c 62.8 KB