Lines Matching defs:index

82 static int mlx4_READ_ENTRY(struct mlx4_dev *dev, int index,
85 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG,
89 static int mlx4_WRITE_ENTRY(struct mlx4_dev *dev, int index,
92 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG,
149 unsigned int index, u32 qpn)
170 new_entry->index = index;
201 err = mlx4_READ_ENTRY(dev, index, mailbox);
222 err = mlx4_WRITE_ENTRY(dev, index, mailbox);
241 unsigned int index, u32 qpn)
258 if (tmp_entry->index == index) {
264 mlx4_warn(dev, "Steering entry at index %x is not registered\n", index);
276 /* add the qp as a duplicate on this index */
290 unsigned int index, u32 qpn)
305 /* The qp is promisc qp so it is a duplicate on this index
306 * Find the index entry, and remove the duplicate */
308 if (tmp_entry->index == index) {
314 mlx4_warn(dev, "Steering entry for index %x is not registered\n", index);
331 unsigned int index, u32 tqpn,
348 if (mlx4_READ_ENTRY(dev, index, mailbox))
370 unsigned int index, u32 tqpn)
382 if (!promisc_steering_entry(dev, port, steer, index,
390 if (entry->index == index) {
468 err = mlx4_READ_ENTRY(dev, entry->index, mailbox);
506 err = mlx4_WRITE_ENTRY(dev, entry->index,
620 entry->index,
629 qpn, entry->index);
644 qpn, entry->index);
659 entry->index,
685 * If GID is found in MGM or MGM is empty, *index = *hash, *prev = -1
688 * if GID is found in AMGM, *index = index in AMGM, *prev = index of
691 * If no AMGM exists for given gid, *index = -1, *prev = index of last
697 int *prev, int *index)
722 *index = hash;
726 err = mlx4_READ_ENTRY(dev, *index, mgm_mailbox);
731 if (*index != hash) {
742 *prev = *index;
743 *index = be32_to_cpu(mgm->next_gid_index) >> 6;
744 } while (*index);
746 *index = -1;
1112 int index = -1, prev;
1126 mailbox, &prev, &index);
1130 if (index != -1) {
1138 index = mlx4_bitmap_alloc(&priv->mcg_table.bitmap);
1139 if (index == -1) {
1144 index += dev->caps.num_mgms;
1153 mlx4_err(dev, "MGM at index %x is full\n", index);
1173 err = mlx4_WRITE_ENTRY(dev, index, mailbox);
1184 mgm->next_gid_index = cpu_to_be32(index << 6);
1191 if (prot == MLX4_PROT_ETH && index != -1) {
1195 index, qp->qpn);
1198 index, qp->qpn);
1200 if (err && link && index != -1) {
1201 if (index < dev->caps.num_mgms)
1202 mlx4_warn(dev, "Got AMGM index %d < %d\n",
1203 index, dev->caps.num_mgms);
1206 index - dev->caps.num_mgms, MLX4_USE_RR);
1221 int prev, index;
1235 mailbox, &prev, &index);
1239 if (index == -1) {
1249 check_duplicate_entry(dev, port, steer, index, qp->qpn) &&
1250 !promisc_steering_entry(dev, port, steer, index, qp->qpn, NULL))
1273 index, qp->qpn);
1275 err = mlx4_WRITE_ENTRY(dev, index, mailbox);
1292 err = mlx4_WRITE_ENTRY(dev, index, mailbox);
1298 mlx4_warn(dev, "MGM entry %d had AMGM index %d < %d\n",
1299 index, amgm_index, dev->caps.num_mgms);
1317 if (index < dev->caps.num_mgms)
1318 mlx4_warn(dev, "entry %d had next AMGM index %d < %d\n",
1319 prev, index, dev->caps.num_mgms);
1322 index - dev->caps.num_mgms, MLX4_USE_RR);