Lines Matching defs:index
47 * @next_index: Next possible free exchange index
75 * @pool_max_index: Max exch array index in exch pool
406 * @index: Index of the exchange within the pool
408 * Use the index to get an exchange from within an exchange pool. exches
409 * will point to an array of exchange pointers. The index will select
413 u16 index)
416 return exches[index];
422 * @index: The index in the pool where the exchange will be assigned
425 static inline void fc_exch_ptr_set(struct fc_exch_pool *pool, u16 index,
428 ((struct fc_exch **)(pool + 1))[index] = ep;
438 u16 index;
446 index = (ep->xid - ep->em->min_xid) >> fc_cpu_order;
449 pool->left = index;
451 pool->right = index;
453 pool->next_index = index;
454 fc_exch_ptr_set(pool, index, NULL);
456 fc_exch_ptr_set(pool, index, &fc_quarantine_exch);
817 u16 index;
835 index = pool->left;
842 index = pool->right;
848 index = pool->next_index;
850 while (fc_exch_ptr_get(pool, index)) {
851 index = index == mp->pool_max_index ? 0 : index + 1;
852 if (index == pool->next_index)
855 pool->next_index = index == mp->pool_max_index ? 0 : index + 1;
866 fc_exch_ptr_set(pool, index, ep);
875 ep->oxid = ep->xid = (index << fc_cpu_order | cpu) + mp->min_xid;
2684 * mapping between an exch id and exch array index