• Parav Pandit's avatar
    RDMA/core: Introduce ib_core_device to hold device · cebe556b
    Parav Pandit authored
    In order to support sysfs entries in multiple net namespaces for a rdma
    device, introduce a ib_core_device whose scope is limited to hold core
    device and per port sysfs related entries.
    
    This is preparation patch so that multiple ib_core_devices in each net
    namespace can be created in subsequent patch who all can share ib_device.
    
    (a) Move sysfs specific fields to ib_core_device.
    (b) Make sysfs and device life cycle related routines to work on
        ib_core_device.
    (c) Introduce and use rdma_init_coredev() helper to initialize
        coredev fields.
    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>
    cebe556b
device.c 53.4 KB