Lines Matching refs:hop_ptr
45 u8 *hop_ptr, u8 hop_cnt, in __smi_handle_dr_smp_send() argument
59 if (hop_cnt && *hop_ptr == 0) { in __smi_handle_dr_smp_send()
60 (*hop_ptr)++; in __smi_handle_dr_smp_send()
61 return (initial_path[*hop_ptr] == in __smi_handle_dr_smp_send()
66 if (*hop_ptr && *hop_ptr < hop_cnt) { in __smi_handle_dr_smp_send()
71 (*hop_ptr)++; in __smi_handle_dr_smp_send()
72 return (initial_path[*hop_ptr] == in __smi_handle_dr_smp_send()
77 if (*hop_ptr == hop_cnt) { in __smi_handle_dr_smp_send()
79 (*hop_ptr)++; in __smi_handle_dr_smp_send()
87 return (*hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD); in __smi_handle_dr_smp_send()
91 if (hop_cnt && *hop_ptr == hop_cnt + 1) { in __smi_handle_dr_smp_send()
92 (*hop_ptr)--; in __smi_handle_dr_smp_send()
93 return (return_path[*hop_ptr] == in __smi_handle_dr_smp_send()
98 if (2 <= *hop_ptr && *hop_ptr <= hop_cnt) { in __smi_handle_dr_smp_send()
102 (*hop_ptr)--; in __smi_handle_dr_smp_send()
103 return (return_path[*hop_ptr] == in __smi_handle_dr_smp_send()
108 if (*hop_ptr == 1) { in __smi_handle_dr_smp_send()
109 (*hop_ptr)--; in __smi_handle_dr_smp_send()
117 if (*hop_ptr == 0) in __smi_handle_dr_smp_send()
133 &smp->hop_ptr, smp->hop_cnt, in smi_handle_dr_smp_send()
145 &smp->hop_ptr, smp->hop_cnt, in opa_smi_handle_dr_smp_send()
157 u8 *hop_ptr, u8 hop_cnt, in __smi_handle_dr_smp_recv() argument
171 if (hop_cnt && *hop_ptr == 0) in __smi_handle_dr_smp_recv()
175 if (*hop_ptr && *hop_ptr < hop_cnt) { in __smi_handle_dr_smp_recv()
179 return_path[*hop_ptr] = port_num; in __smi_handle_dr_smp_recv()
181 return (initial_path[*hop_ptr+1] <= phys_port_cnt ? in __smi_handle_dr_smp_recv()
186 if (*hop_ptr == hop_cnt) { in __smi_handle_dr_smp_recv()
188 return_path[*hop_ptr] = port_num; in __smi_handle_dr_smp_recv()
198 return (*hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD); in __smi_handle_dr_smp_recv()
203 if (hop_cnt && *hop_ptr == hop_cnt + 1) { in __smi_handle_dr_smp_recv()
204 (*hop_ptr)--; in __smi_handle_dr_smp_recv()
205 return (return_path[*hop_ptr] == in __smi_handle_dr_smp_recv()
210 if (2 <= *hop_ptr && *hop_ptr <= hop_cnt) { in __smi_handle_dr_smp_recv()
215 return (return_path[*hop_ptr-1] <= phys_port_cnt ? in __smi_handle_dr_smp_recv()
220 if (*hop_ptr == 1) { in __smi_handle_dr_smp_recv()
223 (*hop_ptr)--; in __smi_handle_dr_smp_recv()
232 return (*hop_ptr == 0 ? IB_SMI_HANDLE : IB_SMI_DISCARD); in __smi_handle_dr_smp_recv()
244 &smp->hop_ptr, smp->hop_cnt, in smi_handle_dr_smp_recv()
260 &smp->hop_ptr, smp->hop_cnt, in opa_smi_handle_dr_smp_recv()
270 static enum smi_forward_action __smi_check_forward_dr_smp(u8 hop_ptr, u8 hop_cnt, in __smi_check_forward_dr_smp() argument
277 if (hop_ptr && hop_ptr < hop_cnt) in __smi_check_forward_dr_smp()
281 if (hop_ptr == hop_cnt) in __smi_check_forward_dr_smp()
286 if (hop_ptr == hop_cnt + 1) in __smi_check_forward_dr_smp()
290 if (2 <= hop_ptr && hop_ptr <= hop_cnt) in __smi_check_forward_dr_smp()
294 if (hop_ptr == 1) in __smi_check_forward_dr_smp()
304 return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt, in smi_check_forward_dr_smp()
312 return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt, in opa_smi_check_forward_dr_smp()
326 return (!ib_get_smp_direction(smp) ? smp->initial_path[smp->hop_ptr+1] : in smi_get_fwd_port()
327 smp->return_path[smp->hop_ptr-1]); in smi_get_fwd_port()
336 return !opa_get_smp_direction(smp) ? smp->route.dr.initial_path[smp->hop_ptr+1] : in opa_smi_get_fwd_port()
337 smp->route.dr.return_path[smp->hop_ptr-1]; in opa_smi_get_fwd_port()