Lines Matching defs:hop_ptr

45 						u8 *hop_ptr, u8 hop_cnt,
59 if (hop_cnt && *hop_ptr == 0) {
60 (*hop_ptr)++;
61 return (initial_path[*hop_ptr] ==
66 if (*hop_ptr && *hop_ptr < hop_cnt) {
71 (*hop_ptr)++;
72 return (initial_path[*hop_ptr] ==
77 if (*hop_ptr == hop_cnt) {
79 (*hop_ptr)++;
85 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
87 return (*hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
91 if (hop_cnt && *hop_ptr == hop_cnt + 1) {
92 (*hop_ptr)--;
93 return (return_path[*hop_ptr] ==
98 if (2 <= *hop_ptr && *hop_ptr <= hop_cnt) {
102 (*hop_ptr)--;
103 return (return_path[*hop_ptr] ==
108 if (*hop_ptr == 1) {
109 (*hop_ptr)--;
116 /* C14-13:4 -- hop_ptr = 0 -> should have gone to SM */
117 if (*hop_ptr == 0)
133 &smp->hop_ptr, smp->hop_cnt,
145 &smp->hop_ptr, smp->hop_cnt,
157 u8 *hop_ptr, u8 hop_cnt,
170 /* C14-9:1 -- sender should have incremented hop_ptr */
171 if (hop_cnt && *hop_ptr == 0)
175 if (*hop_ptr && *hop_ptr < hop_cnt) {
179 return_path[*hop_ptr] = port_num;
180 /* hop_ptr updated when sending */
181 return (initial_path[*hop_ptr+1] <= phys_port_cnt ?
186 if (*hop_ptr == hop_cnt) {
188 return_path[*hop_ptr] = port_num;
189 /* hop_ptr updated when sending */
196 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
198 return (*hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
203 if (hop_cnt && *hop_ptr == hop_cnt + 1) {
204 (*hop_ptr)--;
205 return (return_path[*hop_ptr] ==
210 if (2 <= *hop_ptr && *hop_ptr <= hop_cnt) {
214 /* hop_ptr updated when sending */
215 return (return_path[*hop_ptr-1] <= phys_port_cnt ?
220 if (*hop_ptr == 1) {
222 /* giving SMP to SM - update hop_ptr */
223 (*hop_ptr)--;
226 /* hop_ptr updated when sending */
230 /* C14-13:4 -- hop_ptr = 0 -> give to SM */
232 return (*hop_ptr == 0 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
244 &smp->hop_ptr, smp->hop_cnt,
260 &smp->hop_ptr, smp->hop_cnt,
270 static enum smi_forward_action __smi_check_forward_dr_smp(u8 hop_ptr, u8 hop_cnt,
277 if (hop_ptr && hop_ptr < hop_cnt)
281 if (hop_ptr == hop_cnt)
285 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
286 if (hop_ptr == hop_cnt + 1)
290 if (2 <= hop_ptr && hop_ptr <= hop_cnt)
294 if (hop_ptr == 1)
304 return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt,
312 return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt,
326 return (!ib_get_smp_direction(smp) ? smp->initial_path[smp->hop_ptr+1] :
327 smp->return_path[smp->hop_ptr-1]);
336 return !opa_get_smp_direction(smp) ? smp->route.dr.initial_path[smp->hop_ptr+1] :
337 smp->route.dr.return_path[smp->hop_ptr-1];