Lines Matching defs:hop_ptr

49 	u8 hop_ptr, hop_cnt;
51 hop_ptr = smp->hop_ptr;
57 if (hop_cnt && hop_ptr == 0) {
58 smp->hop_ptr++;
59 return (smp->initial_path[smp->hop_ptr] ==
64 if (hop_ptr && hop_ptr < hop_cnt) {
69 smp->hop_ptr++;
70 return (smp->initial_path[smp->hop_ptr] ==
75 if (hop_ptr == hop_cnt) {
77 smp->hop_ptr++;
83 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
85 return (hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
89 if (hop_cnt && hop_ptr == hop_cnt + 1) {
90 smp->hop_ptr--;
91 return (smp->return_path[smp->hop_ptr] ==
96 if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
100 smp->hop_ptr--;
101 return (smp->return_path[smp->hop_ptr] ==
106 if (hop_ptr == 1) {
107 smp->hop_ptr--;
114 /* C14-13:4 -- hop_ptr = 0 -> should have gone to SM */
115 if (hop_ptr == 0)
130 u8 hop_ptr, hop_cnt;
132 hop_ptr = smp->hop_ptr;
137 /* C14-9:1 -- sender should have incremented hop_ptr */
138 if (hop_cnt && hop_ptr == 0)
142 if (hop_ptr && hop_ptr < hop_cnt) {
146 smp->return_path[hop_ptr] = port_num;
147 /* smp->hop_ptr updated when sending */
148 return (smp->initial_path[hop_ptr+1] <= phys_port_cnt ?
153 if (hop_ptr == hop_cnt) {
155 smp->return_path[hop_ptr] = port_num;
156 /* smp->hop_ptr updated when sending */
163 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
165 return (hop_ptr == hop_cnt + 1 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
170 if (hop_cnt && hop_ptr == hop_cnt + 1) {
171 smp->hop_ptr--;
172 return (smp->return_path[smp->hop_ptr] ==
177 if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
181 /* smp->hop_ptr updated when sending */
182 return (smp->return_path[hop_ptr-1] <= phys_port_cnt ?
187 if (hop_ptr == 1) {
189 /* giving SMP to SM - update hop_ptr */
190 smp->hop_ptr--;
193 /* smp->hop_ptr updated when sending */
198 /* C14-13:4 -- hop_ptr = 0 -> give to SM */
200 return (hop_ptr == 0 ? IB_SMI_HANDLE : IB_SMI_DISCARD);
206 u8 hop_ptr, hop_cnt;
208 hop_ptr = smp->hop_ptr;
213 if (hop_ptr && hop_ptr < hop_cnt)
217 if (hop_ptr == hop_cnt)
221 /* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
222 if (hop_ptr == hop_cnt + 1)
226 if (2 <= hop_ptr && hop_ptr <= hop_cnt)
230 if (hop_ptr == 1)
243 return (!ib_get_smp_direction(smp) ? smp->initial_path[smp->hop_ptr+1] :
244 smp->return_path[smp->hop_ptr-1]);