Changes in uspace/srv/net/tcp/tqueue.c [69a93df7:a2e3ee6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/tqueue.c
r69a93df7 ra2e3ee6 88 88 tcp_segment_t *seg; 89 89 90 log_msg(L VL_DEBUG, "tcp_tqueue_ctrl_seg(%p, %u)", conn, ctrl);90 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_tqueue_ctrl_seg(%p, %u)", conn, ctrl); 91 91 92 92 seg = tcp_segment_make_ctrl(ctrl); … … 99 99 tcp_tqueue_entry_t *tqe; 100 100 101 log_msg(L VL_DEBUG, "%s: tcp_tqueue_seg(%p, %p)", conn->name, conn,101 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_seg(%p, %p)", conn->name, conn, 102 102 seg); 103 103 … … 109 109 rt_seg = tcp_segment_dup(seg); 110 110 if (rt_seg == NULL) { 111 log_msg(L VL_ERROR, "Memory allocation failed.");111 log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed."); 112 112 /* XXX Handle properly */ 113 113 return; … … 116 116 tqe = calloc(1, sizeof(tcp_tqueue_entry_t)); 117 117 if (tqe == NULL) { 118 log_msg(L VL_ERROR, "Memory allocation failed.");118 log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed."); 119 119 /* XXX Handle properly */ 120 120 return; … … 165 165 tcp_segment_t *seg; 166 166 167 log_msg(L VL_DEBUG, "%s: tcp_tqueue_new_data()", conn->name);167 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_new_data()", conn->name); 168 168 169 169 /* Number of free sequence numbers in send window */ … … 172 172 173 173 xfer_seqlen = min(snd_buf_seqlen, avail_wnd); 174 log_msg(L VL_DEBUG, "%s: snd_buf_seqlen = %zu, SND.WND = %zu, "174 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: snd_buf_seqlen = %zu, SND.WND = %" PRIu32 ", " 175 175 "xfer_seqlen = %zu", conn->name, snd_buf_seqlen, conn->snd_wnd, 176 176 xfer_seqlen); … … 185 185 186 186 if (send_fin) { 187 log_msg(L VL_DEBUG, "%s: Sending out FIN.", conn->name);187 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Sending out FIN.", conn->name); 188 188 /* We are sending out FIN */ 189 189 ctrl = CTL_FIN; … … 194 194 seg = tcp_segment_make_data(ctrl, conn->snd_buf, data_size); 195 195 if (seg == NULL) { 196 log_msg(L VL_ERROR, "Memory allocation failure.");196 log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failure."); 197 197 return; 198 198 } … … 223 223 link_t *cur, *next; 224 224 225 log_msg(L VL_DEBUG, "%s: tcp_tqueue_ack_received(%p)", conn->name,225 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_ack_received(%p)", conn->name, 226 226 conn); 227 227 … … 239 239 240 240 if ((tqe->seg->ctrl & CTL_FIN) != 0) { 241 log_msg(L VL_DEBUG, "Fin has been acked");242 log_msg(L VL_DEBUG, "SND.UNA=%" PRIu32241 log_msg(LOG_DEFAULT, LVL_DEBUG, "Fin has been acked"); 242 log_msg(LOG_DEFAULT, LVL_DEBUG, "SND.UNA=%" PRIu32 243 243 " SEG.SEQ=%" PRIu32 " SEG.LEN=%" PRIu32, 244 244 conn->snd_una, tqe->seg->seq, tqe->seg->len); … … 267 267 void tcp_conn_transmit_segment(tcp_conn_t *conn, tcp_segment_t *seg) 268 268 { 269 log_msg(L VL_DEBUG, "%s: tcp_conn_transmit_segment(%p, %p)",269 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_transmit_segment(%p, %p)", 270 270 conn->name, conn, seg); 271 271 … … 282 282 void tcp_transmit_segment(tcp_sockpair_t *sp, tcp_segment_t *seg) 283 283 { 284 log_msg(LVL_DEBUG, "tcp_transmit_segment(f:(%x,%u),l:(%x,%u), %p)", 285 sp->foreign.addr.ipv4, sp->foreign.port, 286 sp->local.addr.ipv4, sp->local.port, seg); 287 288 log_msg(LVL_DEBUG, "SEG.SEQ=%" PRIu32 ", SEG.WND=%" PRIu32, 284 log_msg(LOG_DEFAULT, LVL_DEBUG, "SEG.SEQ=%" PRIu32 ", SEG.WND=%" PRIu32, 289 285 seg->seq, seg->wnd); 290 286 … … 300 296 301 297 if (tcp_pdu_encode(sp, seg, &pdu) != EOK) { 302 log_msg(L VL_WARN, "Not enough memory. Segment dropped.");298 log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. Segment dropped."); 303 299 return; 304 300 } … … 315 311 link_t *link; 316 312 317 log_msg(L VL_DEBUG, "### %s: retransmit_timeout_func(%p)", conn->name, conn);313 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: retransmit_timeout_func(%p)", conn->name, conn); 318 314 319 315 fibril_mutex_lock(&conn->lock); 320 316 321 317 if (conn->cstate == st_closed) { 322 log_msg(L VL_DEBUG, "Connection already closed.");318 log_msg(LOG_DEFAULT, LVL_DEBUG, "Connection already closed."); 323 319 fibril_mutex_unlock(&conn->lock); 324 320 tcp_conn_delref(conn); … … 328 324 link = list_first(&conn->retransmit.list); 329 325 if (link == NULL) { 330 log_msg(L VL_DEBUG, "Nothing to retransmit");326 log_msg(LOG_DEFAULT, LVL_DEBUG, "Nothing to retransmit"); 331 327 fibril_mutex_unlock(&conn->lock); 332 328 tcp_conn_delref(conn); … … 338 334 rt_seg = tcp_segment_dup(tqe->seg); 339 335 if (rt_seg == NULL) { 340 log_msg(L VL_ERROR, "Memory allocation failed.");336 log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed."); 341 337 fibril_mutex_unlock(&conn->lock); 342 338 tcp_conn_delref(conn); … … 345 341 } 346 342 347 log_msg(L VL_DEBUG, "### %s: retransmitting segment", conn->name);343 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: retransmitting segment", conn->name); 348 344 tcp_conn_transmit_segment(tqe->conn, rt_seg); 349 345 … … 358 354 static void tcp_tqueue_timer_set(tcp_conn_t *conn) 359 355 { 360 log_msg(L VL_DEBUG, "### %s: tcp_tqueue_timer_set()", conn->name);356 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_set()", conn->name); 361 357 362 358 /* Clear first to make sure we update refcnt correctly */ … … 371 367 static void tcp_tqueue_timer_clear(tcp_conn_t *conn) 372 368 { 373 log_msg(L VL_DEBUG, "### %s: tcp_tqueue_timer_clear()", conn->name);369 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_clear()", conn->name); 374 370 375 371 if (fibril_timer_clear(conn->retransmit.timer) == fts_active)
Note:
See TracChangeset
for help on using the changeset viewer.