• Home
  • Raw
  • Download

Lines Matching refs:slave

305 	int i, ix, slave, err;  in __propagate_pkey_ev()  local
308 for (slave = 0; slave < dev->dev->caps.sqp_demux; slave++) { in __propagate_pkey_ev()
309 if (slave == mlx4_master_func_num(dev->dev)) in __propagate_pkey_ev()
311 if (!mlx4_is_slave_active(dev->dev, slave)) in __propagate_pkey_ev()
320 if (dev->pkeys.virt2phys_pkey[slave][port_num - 1] in __propagate_pkey_ev()
322 err = mlx4_gen_pkey_eqe(dev->dev, slave, port_num); in __propagate_pkey_ev()
325 slave, port_num, ix, err); in __propagate_pkey_ev()
383 static int mlx4_ib_demux_sa_handler(struct ib_device *ibdev, int port, int slave, in mlx4_ib_demux_sa_handler() argument
391 ret = mlx4_ib_mcg_demux_handler(ibdev, port, slave, sa_mad); in mlx4_ib_demux_sa_handler()
412 static int find_slave_port_pkey_ix(struct mlx4_ib_dev *dev, int slave, in find_slave_port_pkey_ix() argument
419 if (slave == mlx4_master_func_num(dev->dev)) in find_slave_port_pkey_ix()
425 if (dev->pkeys.virt2phys_pkey[slave][port - 1][i] == unassigned_pkey_ix) in find_slave_port_pkey_ix()
428 pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][i]; in find_slave_port_pkey_ix()
453 int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port, in mlx4_ib_send_to_slave() argument
474 tun_ctx = dev->sriov.demux[port-1].tun[slave]; in mlx4_ib_send_to_slave()
481 if (!dest_qpt && (mlx4_master_func_num(dev->dev) != slave)) in mlx4_ib_send_to_slave()
496 ret = find_slave_port_pkey_ix(dev, slave, port, cached_pkey, &pkey_ix); in mlx4_ib_send_to_slave()
501 tun_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][0]; in mlx4_ib_send_to_slave()
503 dqpn = dev->dev->phys_caps.base_proxy_sqpn + 8 * slave + port + (dest_qpt * 2) - 1; in mlx4_ib_send_to_slave()
581 int slave; in mlx4_ib_demux_mad() local
585 slave = mlx4_master_func_num(dev->dev); in mlx4_ib_demux_mad()
590 slave = *slave_id; in mlx4_ib_demux_mad()
591 if (slave != 255) /*255 indicates the dom0*/ in mlx4_ib_demux_mad()
597 slave = mlx4_ib_find_real_gid(ibdev, port, grh->dgid.global.interface_id); in mlx4_ib_demux_mad()
598 if (slave < 0) { in mlx4_ib_demux_mad()
606 if (mlx4_ib_demux_sa_handler(ibdev, port, slave, in mlx4_ib_demux_mad()
611 if (mlx4_ib_demux_cm_handler(ibdev, port, &slave, mad)) in mlx4_ib_demux_mad()
620 if (slave != mlx4_master_func_num(dev->dev)) { in mlx4_ib_demux_mad()
622 "for slave:%d\n", mad->mad_hdr.mgmt_class, slave); in mlx4_ib_demux_mad()
627 if (slave >= dev->dev->caps.sqp_demux) { in mlx4_ib_demux_mad()
629 slave, dev->dev->caps.sqp_demux); in mlx4_ib_demux_mad()
633 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
636 slave, err); in mlx4_ib_demux_mad()
1055 int slave, struct ib_sa_mad *sa_mad) in mlx4_ib_multiplex_sa_handler() argument
1062 ret = mlx4_ib_mcg_multiplex_handler(ibdev, port, slave, sa_mad); in mlx4_ib_multiplex_sa_handler()
1070 static int is_proxy_qp0(struct mlx4_ib_dev *dev, int qpn, int slave) in is_proxy_qp0() argument
1072 int proxy_start = dev->dev->phys_caps.base_proxy_sqpn + 8 * slave; in is_proxy_qp0()
1078 int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, in mlx4_ib_send_to_wire() argument
1103 if (dest_qpt == IB_QPT_SMI && (mlx4_master_func_num(dev->dev) != slave)) in mlx4_ib_send_to_wire()
1109 wire_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][0]; in mlx4_ib_send_to_wire()
1113 wire_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][pkey_index]; in mlx4_ib_send_to_wire()
1186 int slave; in mlx4_ib_multiplex_mad() local
1196 slave = ((wc->src_qp & ~0x7) - dev->dev->phys_caps.base_proxy_sqpn) / 8; in mlx4_ib_multiplex_mad()
1197 if (slave != ctx->slave) { in mlx4_ib_multiplex_mad()
1202 if (slave != mlx4_master_func_num(dev->dev) && !(wc->src_qp & 0x2)) { in mlx4_ib_multiplex_mad()
1224 tunnel->mad.mad_hdr.mgmt_class, slave); in mlx4_ib_multiplex_mad()
1227 *slave_id = slave; in mlx4_ib_multiplex_mad()
1235 if (mlx4_ib_multiplex_sa_handler(ctx->ib_dev, ctx->port, slave, in mlx4_ib_multiplex_mad()
1240 if (mlx4_ib_multiplex_cm_handler(ctx->ib_dev, ctx->port, slave, in mlx4_ib_multiplex_mad()
1251 if (slave != mlx4_master_func_num(dev->dev)) { in mlx4_ib_multiplex_mad()
1253 "for slave:%d\n", tunnel->mad.mad_hdr.mgmt_class, slave); in mlx4_ib_multiplex_mad()
1264 (ah_attr.grh.sgid_index != slave)) { in mlx4_ib_multiplex_mad()
1266 slave, ah_attr.grh.sgid_index); in mlx4_ib_multiplex_mad()
1270 mlx4_ib_send_to_wire(dev, slave, ctx->port, in mlx4_ib_multiplex_mad()
1271 is_proxy_qp0(dev, wc->src_qp, slave) ? in mlx4_ib_multiplex_mad()
1442 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1491 qp_init_attr.slave = ctx->slave; in create_pv_sqp()
1515 to_mdev(ctx->ib_dev)->pkeys.virt2phys_pkey[ctx->slave][ctx->port - 1][0]; in create_pv_sqp()
1603 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_sqp_comp_worker()
1617 static int alloc_pv_object(struct mlx4_ib_dev *dev, int slave, int port, in alloc_pv_object() argument
1626 "for port %d, slave %d\n", port, slave); in alloc_pv_object()
1632 ctx->slave = slave; in alloc_pv_object()
1637 static void free_pv_object(struct mlx4_ib_dev *dev, int slave, int port) in free_pv_object() argument
1639 if (dev->sriov.demux[port - 1].tun[slave]) { in free_pv_object()
1640 kfree(dev->sriov.demux[port - 1].tun[slave]); in free_pv_object()
1641 dev->sriov.demux[port - 1].tun[slave] = NULL; in free_pv_object()
1645 static int create_pv_resources(struct ib_device *ibdev, int slave, int port, in create_pv_resources() argument
1655 if (ctx->slave == mlx4_master_func_num(to_mdev(ctx->ib_dev)->dev) && in create_pv_resources()
1764 static void destroy_pv_resources(struct mlx4_ib_dev *dev, int slave, int port, in destroy_pv_resources() argument
1791 static int mlx4_ib_tunnels_update(struct mlx4_ib_dev *dev, int slave, in mlx4_ib_tunnels_update() argument
1797 clean_vf_mcast(&dev->sriov.demux[port - 1], slave); in mlx4_ib_tunnels_update()
1799 if (slave == mlx4_master_func_num(dev->dev)) in mlx4_ib_tunnels_update()
1800 destroy_pv_resources(dev, slave, port, in mlx4_ib_tunnels_update()
1803 destroy_pv_resources(dev, slave, port, in mlx4_ib_tunnels_update()
1804 dev->sriov.demux[port - 1].tun[slave], 1); in mlx4_ib_tunnels_update()
1809 ret = create_pv_resources(&dev->ib_dev, slave, port, 1, in mlx4_ib_tunnels_update()
1810 dev->sriov.demux[port - 1].tun[slave]); in mlx4_ib_tunnels_update()
1813 if (!ret && slave == mlx4_master_func_num(dev->dev)) in mlx4_ib_tunnels_update()
1814 ret = create_pv_resources(&dev->ib_dev, slave, port, 0, in mlx4_ib_tunnels_update()
1824 mlx4_ib_tunnels_update(dmxw->dev, dmxw->slave, (int) dmxw->port, in mlx4_ib_tunnels_update_work()