Lines Matching refs:roce

143 			return &port->roce;  in mlx5_get_rep_roce()
149 read_lock(&port->roce.netdev_lock); in mlx5_get_rep_roce()
153 read_unlock(&port->roce.netdev_lock); in mlx5_get_rep_roce()
155 return &port->roce; in mlx5_get_rep_roce()
157 read_unlock(&port->roce.netdev_lock); in mlx5_get_rep_roce()
166 struct mlx5_roce *roce = container_of(this, struct mlx5_roce, nb); in mlx5_netdev_event() local
168 u32 port_num = roce->native_port_num; in mlx5_netdev_event()
172 ibdev = roce->dev; in mlx5_netdev_event()
182 write_lock(&roce->netdev_lock); in mlx5_netdev_event()
184 roce->netdev = ndev; in mlx5_netdev_event()
185 write_unlock(&roce->netdev_lock); in mlx5_netdev_event()
190 write_lock(&roce->netdev_lock); in mlx5_netdev_event()
191 if (roce->netdev == ndev) in mlx5_netdev_event()
192 roce->netdev = NULL; in mlx5_netdev_event()
193 write_unlock(&roce->netdev_lock); in mlx5_netdev_event()
208 roce = mlx5_get_rep_roce(ibdev, ndev, upper, &port_num); in mlx5_netdev_event()
209 if (!roce) in mlx5_netdev_event()
212 ((!upper || ibdev->is_rep) && ndev == roce->netdev)) && in mlx5_netdev_event()
221 if (roce->last_port_state == port_state) in mlx5_netdev_event()
224 roce->last_port_state = port_state; in mlx5_netdev_event()
264 read_lock(&ibdev->port[port_num - 1].roce.netdev_lock); in mlx5_ib_get_netdev()
265 ndev = ibdev->port[port_num - 1].roce.netdev; in mlx5_ib_get_netdev()
268 read_unlock(&ibdev->port[port_num - 1].roce.netdev_lock); in mlx5_ib_get_netdev()
513 if (!dev->is_rep && dev->mdev->roce.roce_en) { in mlx5_query_port_roce()
1971 1, &dev->port[port].roce.tx_port_affinity)); in mlx5_ib_alloc_ucontext()
3042 dev->port[port_num].roce.nb.notifier_call = mlx5_netdev_event; in mlx5_add_netdev_notifier()
3043 err = register_netdevice_notifier(&dev->port[port_num].roce.nb); in mlx5_add_netdev_notifier()
3045 dev->port[port_num].roce.nb.notifier_call = NULL; in mlx5_add_netdev_notifier()
3054 if (dev->port[port_num].roce.nb.notifier_call) { in mlx5_remove_netdev_notifier()
3055 unregister_netdevice_notifier(&dev->port[port_num].roce.nb); in mlx5_remove_netdev_notifier()
3056 dev->port[port_num].roce.nb.notifier_call = NULL; in mlx5_remove_netdev_notifier()
3194 ibdev->port[port_num].roce.last_port_state = IB_PORT_DOWN; in mlx5_ib_unbind_slave_port()
3663 rwlock_init(&dev->port[i].roce.netdev_lock); in mlx5_ib_stage_init_init()
3664 dev->port[i].roce.dev = dev; in mlx5_ib_stage_init_init()
3665 dev->port[i].roce.native_port_num = i + 1; in mlx5_ib_stage_init_init()
3666 dev->port[i].roce.last_port_state = IB_PORT_DOWN; in mlx5_ib_stage_init_init()