Lines Matching refs:index

83 static int mlx4_READ_ENTRY(struct mlx4_dev *dev, int index,  in mlx4_READ_ENTRY()  argument
86 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG, in mlx4_READ_ENTRY()
90 static int mlx4_WRITE_ENTRY(struct mlx4_dev *dev, int index, in mlx4_WRITE_ENTRY() argument
93 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG, in mlx4_WRITE_ENTRY()
150 unsigned int index, u32 qpn) in new_steering_entry() argument
171 new_entry->index = index; in new_steering_entry()
202 err = mlx4_READ_ENTRY(dev, index, mailbox); in new_steering_entry()
223 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in new_steering_entry()
242 unsigned int index, u32 qpn) in existing_steering_entry() argument
259 if (tmp_entry->index == index) { in existing_steering_entry()
265 mlx4_warn(dev, "Steering entry at index %x is not registered\n", index); in existing_steering_entry()
291 unsigned int index, u32 qpn) in check_duplicate_entry() argument
309 if (tmp_entry->index == index) { in check_duplicate_entry()
315 mlx4_warn(dev, "Steering entry for index %x is not registered\n", index); in check_duplicate_entry()
332 unsigned int index, u32 tqpn, in promisc_steering_entry() argument
349 if (mlx4_READ_ENTRY(dev, index, mailbox)) in promisc_steering_entry()
371 unsigned int index, u32 tqpn) in can_remove_steering_entry() argument
383 if (!promisc_steering_entry(dev, port, steer, index, in can_remove_steering_entry()
391 if (entry->index == index) { in can_remove_steering_entry()
469 err = mlx4_READ_ENTRY(dev, entry->index, mailbox); in add_promisc_qp()
507 err = mlx4_WRITE_ENTRY(dev, entry->index, in add_promisc_qp()
621 entry->index, in remove_promisc_qp()
630 qpn, entry->index); in remove_promisc_qp()
645 qpn, entry->index); in remove_promisc_qp()
660 entry->index, in remove_promisc_qp()
698 int *prev, int *index) in find_entry() argument
723 *index = hash; in find_entry()
727 err = mlx4_READ_ENTRY(dev, *index, mgm_mailbox); in find_entry()
732 if (*index != hash) { in find_entry()
743 *prev = *index; in find_entry()
744 *index = be32_to_cpu(mgm->next_gid_index) >> 6; in find_entry()
745 } while (*index); in find_entry()
747 *index = -1; in find_entry()
1105 int index, prev; in mlx4_qp_attach_common() local
1119 mailbox, &prev, &index); in mlx4_qp_attach_common()
1123 if (index != -1) { in mlx4_qp_attach_common()
1131 index = mlx4_bitmap_alloc(&priv->mcg_table.bitmap); in mlx4_qp_attach_common()
1132 if (index == -1) { in mlx4_qp_attach_common()
1137 index += dev->caps.num_mgms; in mlx4_qp_attach_common()
1146 mlx4_err(dev, "MGM at index %x is full\n", index); in mlx4_qp_attach_common()
1166 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in mlx4_qp_attach_common()
1177 mgm->next_gid_index = cpu_to_be32(index << 6); in mlx4_qp_attach_common()
1187 new_steering_entry(dev, port, steer, index, qp->qpn); in mlx4_qp_attach_common()
1190 index, qp->qpn); in mlx4_qp_attach_common()
1192 if (err && link && index != -1) { in mlx4_qp_attach_common()
1193 if (index < dev->caps.num_mgms) in mlx4_qp_attach_common()
1195 index, dev->caps.num_mgms); in mlx4_qp_attach_common()
1198 index - dev->caps.num_mgms, MLX4_USE_RR); in mlx4_qp_attach_common()
1213 int prev, index; in mlx4_qp_detach_common() local
1227 mailbox, &prev, &index); in mlx4_qp_detach_common()
1231 if (index == -1) { in mlx4_qp_detach_common()
1241 check_duplicate_entry(dev, port, steer, index, qp->qpn) && in mlx4_qp_detach_common()
1242 !promisc_steering_entry(dev, port, steer, index, qp->qpn, NULL)) in mlx4_qp_detach_common()
1265 index, qp->qpn); in mlx4_qp_detach_common()
1267 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in mlx4_qp_detach_common()
1284 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in mlx4_qp_detach_common()
1291 index, amgm_index, dev->caps.num_mgms); in mlx4_qp_detach_common()
1309 if (index < dev->caps.num_mgms) in mlx4_qp_detach_common()
1311 prev, index, dev->caps.num_mgms); in mlx4_qp_detach_common()
1314 index - dev->caps.num_mgms, MLX4_USE_RR); in mlx4_qp_detach_common()