Lines Matching refs:session
107 struct session *session; in udp_received() local
120 session = get_session(addr, SESSION_UDP); in udp_received()
121 if (!session) { in udp_received()
128 switch (session->state) { in udp_received()
136 &session->stat) < 0) { in udp_received()
140 zperf_reset_session_stats(session); in udp_received()
141 session->state = STATE_ONGOING; in udp_received()
142 session->start_time = time; in udp_received()
157 session->start_time); in udp_received()
160 session->state = STATE_COMPLETED; in udp_received()
163 session->stat.flags = 0x80000000; in udp_received()
164 session->stat.total_len1 = session->length >> 32; in udp_received()
165 session->stat.total_len2 = in udp_received()
166 session->length % 0xFFFFFFFF; in udp_received()
167 session->stat.stop_sec = duration / USEC_PER_SEC; in udp_received()
168 session->stat.stop_usec = duration % USEC_PER_SEC; in udp_received()
169 session->stat.error_cnt = session->error; in udp_received()
170 session->stat.outorder_cnt = session->outorder; in udp_received()
171 session->stat.datagrams = session->counter; in udp_received()
172 session->stat.jitter1 = 0; in udp_received()
173 session->stat.jitter2 = session->jitter; in udp_received()
176 &session->stat) < 0) { in udp_received()
180 results.nb_packets_rcvd = session->counter; in udp_received()
181 results.nb_packets_lost = session->error; in udp_received()
182 results.nb_packets_outorder = session->outorder; in udp_received()
183 results.total_len = session->length; in udp_received()
185 results.jitter_in_us = session->jitter; in udp_received()
186 results.packet_size = session->length / session->counter; in udp_received()
194 session->counter++; in udp_received()
195 session->length += datalen; in udp_received()
202 if (session->last_transit_time != 0) { in udp_received()
204 session->last_transit_time; in udp_received()
210 session->jitter += in udp_received()
211 (delta_transit - session->jitter) / 16; in udp_received()
214 session->last_transit_time = transit_time; in udp_received()
217 if (id != session->next_id) { in udp_received()
218 if (id < session->next_id) { in udp_received()
219 session->outorder++; in udp_received()
221 session->error += id - session->next_id; in udp_received()
222 session->next_id = id + 1; in udp_received()
225 session->next_id++; in udp_received()