Lines Matching refs:hop_ptr
49 u8 *hop_ptr, u8 hop_cnt,
63 if (hop_cnt && *hop_ptr == 0) {
64 (*hop_ptr)++;
65 return (initial_path[*hop_ptr] ==
70 if (*hop_ptr && *hop_ptr < hop_cnt) {
75 (*hop_ptr)++;
76 return (initial_path[*hop_ptr] ==
81 if (*hop_ptr == hop_cnt) {
83 (*hop_ptr)++;
89 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
91 return (*hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
95 if (hop_cnt && *hop_ptr == hop_cnt + 1) {
96 (*hop_ptr)--;
97 return (return_path[*hop_ptr] ==
102 if (2 <= *hop_ptr && *hop_ptr <= hop_cnt) {
106 (*hop_ptr)--;
107 return (return_path[*hop_ptr] ==
112 if (*hop_ptr == 1) {
113 (*hop_ptr)--;
120 /* C14-13:4 -- hop_ptr = 0 -> should have gone to SM */
121 if (*hop_ptr == 0)
137 &smp->hop_ptr, smp->hop_cnt,
149 &smp->hop_ptr, smp->hop_cnt,
161 u8 *hop_ptr, u8 hop_cnt,
174 /* C14-9:1 -- sender should have incremented hop_ptr */
175 if (hop_cnt && *hop_ptr == 0)
179 if (*hop_ptr && *hop_ptr < hop_cnt) {
183 return_path[*hop_ptr] = port_num;
184 /* hop_ptr updated when sending */
185 return (initial_path[*hop_ptr+1] <= phys_port_cnt ?
190 if (*hop_ptr == hop_cnt) {
192 return_path[*hop_ptr] = port_num;
193 /* hop_ptr updated when sending */
200 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
202 return (*hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
207 if (hop_cnt && *hop_ptr == hop_cnt + 1) {
208 (*hop_ptr)--;
209 return (return_path[*hop_ptr] ==
214 if (2 <= *hop_ptr && *hop_ptr <= hop_cnt) {
218 /* hop_ptr updated when sending */
219 return (return_path[*hop_ptr-1] <= phys_port_cnt ?
224 if (*hop_ptr == 1) {
226 /* giving SMP to SM - update hop_ptr */
227 (*hop_ptr)--;
230 /* hop_ptr updated when sending */
234 /* C14-13:4 -- hop_ptr = 0 -> give to SM */
236 return (*hop_ptr == 0 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
248 &smp->hop_ptr, smp->hop_cnt,
264 &smp->hop_ptr, smp->hop_cnt,
274 static enum smi_forward_action __smi_check_forward_dr_smp(u8 hop_ptr, u8 hop_cnt,
281 if (hop_ptr && hop_ptr < hop_cnt)
285 if (hop_ptr == hop_cnt)
289 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
290 if (hop_ptr == hop_cnt + 1)
294 if (2 <= hop_ptr && hop_ptr <= hop_cnt)
298 if (hop_ptr == 1)
308 return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt,
316 return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt,
330 return (!ib_get_smp_direction(smp) ? smp->initial_path[smp->hop_ptr+1] :
331 smp->return_path[smp->hop_ptr-1]);
340 return !opa_get_smp_direction(smp) ? smp->route.dr.initial_path[smp->hop_ptr+1] :
341 smp->route.dr.return_path[smp->hop_ptr-1];