Lines Matching refs:hop_ptr
49 u8 hop_ptr, hop_cnt; in smi_handle_dr_smp_send() local
51 hop_ptr = smp->hop_ptr; in smi_handle_dr_smp_send()
61 if (hop_cnt && hop_ptr == 0) { in smi_handle_dr_smp_send()
62 smp->hop_ptr++; in smi_handle_dr_smp_send()
63 return (smp->initial_path[smp->hop_ptr] == in smi_handle_dr_smp_send()
68 if (hop_ptr && hop_ptr < hop_cnt) { in smi_handle_dr_smp_send()
73 smp->hop_ptr++; in smi_handle_dr_smp_send()
74 return (smp->initial_path[smp->hop_ptr] == in smi_handle_dr_smp_send()
79 if (hop_ptr == hop_cnt) { in smi_handle_dr_smp_send()
81 smp->hop_ptr++; in smi_handle_dr_smp_send()
89 return (hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD); in smi_handle_dr_smp_send()
93 if (hop_cnt && hop_ptr == hop_cnt + 1) { in smi_handle_dr_smp_send()
94 smp->hop_ptr--; in smi_handle_dr_smp_send()
95 return (smp->return_path[smp->hop_ptr] == in smi_handle_dr_smp_send()
100 if (2 <= hop_ptr && hop_ptr <= hop_cnt) { in smi_handle_dr_smp_send()
104 smp->hop_ptr--; in smi_handle_dr_smp_send()
105 return (smp->return_path[smp->hop_ptr] == in smi_handle_dr_smp_send()
110 if (hop_ptr == 1) { in smi_handle_dr_smp_send()
111 smp->hop_ptr--; in smi_handle_dr_smp_send()
119 if (hop_ptr == 0) in smi_handle_dr_smp_send()
134 u8 hop_ptr, hop_cnt; in smi_handle_dr_smp_recv() local
136 hop_ptr = smp->hop_ptr; in smi_handle_dr_smp_recv()
146 if (hop_cnt && hop_ptr == 0) in smi_handle_dr_smp_recv()
150 if (hop_ptr && hop_ptr < hop_cnt) { in smi_handle_dr_smp_recv()
154 smp->return_path[hop_ptr] = port_num; in smi_handle_dr_smp_recv()
156 return (smp->initial_path[hop_ptr+1] <= phys_port_cnt ? in smi_handle_dr_smp_recv()
161 if (hop_ptr == hop_cnt) { in smi_handle_dr_smp_recv()
163 smp->return_path[hop_ptr] = port_num; in smi_handle_dr_smp_recv()
173 return (hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD); in smi_handle_dr_smp_recv()
178 if (hop_cnt && hop_ptr == hop_cnt + 1) { in smi_handle_dr_smp_recv()
179 smp->hop_ptr--; in smi_handle_dr_smp_recv()
180 return (smp->return_path[smp->hop_ptr] == in smi_handle_dr_smp_recv()
185 if (2 <= hop_ptr && hop_ptr <= hop_cnt) { in smi_handle_dr_smp_recv()
190 return (smp->return_path[hop_ptr-1] <= phys_port_cnt ? in smi_handle_dr_smp_recv()
195 if (hop_ptr == 1) { in smi_handle_dr_smp_recv()
198 smp->hop_ptr--; in smi_handle_dr_smp_recv()
208 return (hop_ptr == 0 ? IB_SMI_HANDLE : IB_SMI_DISCARD); in smi_handle_dr_smp_recv()
214 u8 hop_ptr, hop_cnt; in smi_check_forward_dr_smp() local
216 hop_ptr = smp->hop_ptr; in smi_check_forward_dr_smp()
221 if (hop_ptr && hop_ptr < hop_cnt) in smi_check_forward_dr_smp()
225 if (hop_ptr == hop_cnt) in smi_check_forward_dr_smp()
230 if (hop_ptr == hop_cnt + 1) in smi_check_forward_dr_smp()
234 if (2 <= hop_ptr && hop_ptr <= hop_cnt) in smi_check_forward_dr_smp()
238 if (hop_ptr == 1) in smi_check_forward_dr_smp()
251 return (!ib_get_smp_direction(smp) ? smp->initial_path[smp->hop_ptr+1] : in smi_get_fwd_port()
252 smp->return_path[smp->hop_ptr-1]); in smi_get_fwd_port()