Lines Matching refs:hop_ptr

49 	u8 hop_ptr, hop_cnt;
51 hop_ptr = smp->hop_ptr;
61 if (hop_cnt && hop_ptr == 0) {
62 smp->hop_ptr++;
63 return (smp->initial_path[smp->hop_ptr] ==
68 if (hop_ptr && hop_ptr < hop_cnt) {
73 smp->hop_ptr++;
74 return (smp->initial_path[smp->hop_ptr] ==
79 if (hop_ptr == hop_cnt) {
81 smp->hop_ptr++;
87 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
89 return (hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
93 if (hop_cnt && hop_ptr == hop_cnt + 1) {
94 smp->hop_ptr--;
95 return (smp->return_path[smp->hop_ptr] ==
100 if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
104 smp->hop_ptr--;
105 return (smp->return_path[smp->hop_ptr] ==
110 if (hop_ptr == 1) {
111 smp->hop_ptr--;
118 /* C14-13:4 -- hop_ptr = 0 -> should have gone to SM */
119 if (hop_ptr == 0)
134 u8 hop_ptr, hop_cnt;
136 hop_ptr = smp->hop_ptr;
145 /* C14-9:1 -- sender should have incremented hop_ptr */
146 if (hop_cnt && hop_ptr == 0)
150 if (hop_ptr && hop_ptr < hop_cnt) {
154 smp->return_path[hop_ptr] = port_num;
155 /* smp->hop_ptr updated when sending */
156 return (smp->initial_path[hop_ptr+1] <= phys_port_cnt ?
161 if (hop_ptr == hop_cnt) {
163 smp->return_path[hop_ptr] = port_num;
164 /* smp->hop_ptr updated when sending */
171 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
173 return (hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
178 if (hop_cnt && hop_ptr == hop_cnt + 1) {
179 smp->hop_ptr--;
180 return (smp->return_path[smp->hop_ptr] ==
185 if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
189 /* smp->hop_ptr updated when sending */
190 return (smp->return_path[hop_ptr-1] <= phys_port_cnt ?
195 if (hop_ptr == 1) {
197 /* giving SMP to SM - update hop_ptr */
198 smp->hop_ptr--;
201 /* smp->hop_ptr updated when sending */
206 /* C14-13:4 -- hop_ptr = 0 -> give to SM */
208 return (hop_ptr == 0 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
214 u8 hop_ptr, hop_cnt;
216 hop_ptr = smp->hop_ptr;
221 if (hop_ptr && hop_ptr < hop_cnt)
225 if (hop_ptr == hop_cnt)
229 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
230 if (hop_ptr == hop_cnt + 1)
234 if (2 <= hop_ptr && hop_ptr <= hop_cnt)
238 if (hop_ptr == 1)
251 return (!ib_get_smp_direction(smp) ? smp->initial_path[smp->hop_ptr+1] :
252 smp->return_path[smp->hop_ptr-1]);