Lines Matching defs:generation
37 /* Maximum number of packets within a flow generation. */
47 /* Reserved generation value to set to unused flows for kernel contexts */
352 qpriv->flow_state.generation = KERN_GENERATION_RESERVED;
735 static void kern_set_hw_flow(struct hfi1_ctxtdata *rcd, u32 generation,
740 reg = ((u64)generation << HFI1_KDETH_BTH_SEQ_SHIFT) |
747 if (generation != KERN_GENERATION_RESERVED)
757 u32 generation = rcd->flows[flow_idx].generation;
759 kern_set_hw_flow(rcd, generation, flow_idx);
760 return generation;
765 u32 generation = mask_generation(gen + 1);
767 if (generation == KERN_GENERATION_RESERVED)
768 generation = mask_generation(generation + 1);
769 return generation;
775 rcd->flows[flow_idx].generation =
776 kern_flow_generation_next(rcd->flows[flow_idx].generation);
802 /* Generation received in a RESYNC overrides default flow generation */
803 if (fs->generation != KERN_GENERATION_RESERVED)
804 rcd->flows[fs->index].generation = fs->generation;
805 fs->generation = kern_setup_hw_flow(rcd, fs->index);
834 fs->generation = KERN_GENERATION_RESERVED;
853 rcd->flows[i].generation = mask_generation(get_random_u32());
1521 flow->flow_state.generation = qpriv->flow_state.generation;
1753 cpu_to_be32((flow->flow_state.generation <<
1836 * Check sync. The last PSN of each generation is reserved for
1945 flow->flow_state.generation = flow_psn >> HFI1_KDETH_BTH_SEQ_SHIFT;
2393 (flow->flow_state.generation <<
2816 * generation mismatch, drop this stale packet.
3111 * during a RESYNC, the generation is incremented and the
3546 * Last PSN of every generation is reserved for RESYNC.
3920 cpu_to_be32((flow->flow_state.generation <<
4116 flow->flow_state.generation = flow_psn >> HFI1_KDETH_BTH_SEQ_SHIFT;
4249 (flow->flow_state.generation <<
4444 *bth2 = mask_psn((fs->generation <<
4594 u32 spsn, fpsn, last_acked, generation;
4627 generation = psn >> HFI1_KDETH_BTH_SEQ_SHIFT;
4652 * request) starts with a new generation number, we
4655 if (flow->flow_state.generation !=
4662 * based on the new generation.
4676 gen = flow->flow_state.generation;
4677 if (WARN_ON(gen == generation &&
4687 flow->flow_state.generation =
4688 generation;
4851 u32 generation;
4860 generation = kern_flow_generation_next(flow->flow_state.generation);
4861 *bth2 = mask_psn((generation << HFI1_KDETH_BTH_SEQ_SHIFT) - 1);
4880 u32 psn, generation, idx, gen_next;
4887 generation = mask_psn(psn + 1) >> HFI1_KDETH_BTH_SEQ_SHIFT;
4890 gen_next = (fs->generation == KERN_GENERATION_RESERVED) ?
4891 generation : kern_flow_generation_next(fs->generation);
4893 * RESYNC packet contains the "next" generation and can only be
4896 if (generation != mask_generation(gen_next - 1) &&
4897 generation != gen_next)
4906 * If we don't have a flow, save the generation so it can be
4909 fs->generation = generation;
4911 /* Reprogram the QP flow with new generation */
4912 rcd->flows[fs->index].generation = generation;
4913 fs->generation = kern_setup_hw_flow(rcd, fs->index);
4924 * Reset all TID flow information with the new generation.
4952 flow->flow_state.generation = fs->generation;
5135 /* Use generation from the most recently received response */