diff options
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index bbef4a7a9b56..a46d1eb41762 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -93,8 +93,7 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet, | |||
93 | { | 93 | { |
94 | struct sctp_chunk *chunk = NULL; | 94 | struct sctp_chunk *chunk = NULL; |
95 | 95 | ||
96 | SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __func__, | 96 | pr_debug("%s: packet:%p vtag:0x%x\n", __func__, packet, vtag); |
97 | packet, vtag); | ||
98 | 97 | ||
99 | packet->vtag = vtag; | 98 | packet->vtag = vtag; |
100 | 99 | ||
@@ -119,8 +118,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, | |||
119 | struct sctp_association *asoc = transport->asoc; | 118 | struct sctp_association *asoc = transport->asoc; |
120 | size_t overhead; | 119 | size_t overhead; |
121 | 120 | ||
122 | SCTP_DEBUG_PRINTK("%s: packet:%p transport:%p\n", __func__, | 121 | pr_debug("%s: packet:%p transport:%p\n", __func__, packet, transport); |
123 | packet, transport); | ||
124 | 122 | ||
125 | packet->transport = transport; | 123 | packet->transport = transport; |
126 | packet->source_port = sport; | 124 | packet->source_port = sport; |
@@ -145,7 +143,7 @@ void sctp_packet_free(struct sctp_packet *packet) | |||
145 | { | 143 | { |
146 | struct sctp_chunk *chunk, *tmp; | 144 | struct sctp_chunk *chunk, *tmp; |
147 | 145 | ||
148 | SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet); | 146 | pr_debug("%s: packet:%p\n", __func__, packet); |
149 | 147 | ||
150 | list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { | 148 | list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { |
151 | list_del_init(&chunk->list); | 149 | list_del_init(&chunk->list); |
@@ -167,8 +165,7 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet, | |||
167 | sctp_xmit_t retval; | 165 | sctp_xmit_t retval; |
168 | int error = 0; | 166 | int error = 0; |
169 | 167 | ||
170 | SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __func__, | 168 | pr_debug("%s: packet:%p chunk:%p\n", __func__, packet, chunk); |
171 | packet, chunk); | ||
172 | 169 | ||
173 | switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) { | 170 | switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) { |
174 | case SCTP_XMIT_PMTU_FULL: | 171 | case SCTP_XMIT_PMTU_FULL: |
@@ -334,8 +331,7 @@ sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *packet, | |||
334 | { | 331 | { |
335 | sctp_xmit_t retval = SCTP_XMIT_OK; | 332 | sctp_xmit_t retval = SCTP_XMIT_OK; |
336 | 333 | ||
337 | SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __func__, packet, | 334 | pr_debug("%s: packet:%p chunk:%p\n", __func__, packet, chunk); |
338 | chunk); | ||
339 | 335 | ||
340 | /* Data chunks are special. Before seeing what else we can | 336 | /* Data chunks are special. Before seeing what else we can |
341 | * bundle into this packet, check to see if we are allowed to | 337 | * bundle into this packet, check to see if we are allowed to |
@@ -402,7 +398,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
402 | unsigned char *auth = NULL; /* pointer to auth in skb data */ | 398 | unsigned char *auth = NULL; /* pointer to auth in skb data */ |
403 | __u32 cksum_buf_len = sizeof(struct sctphdr); | 399 | __u32 cksum_buf_len = sizeof(struct sctphdr); |
404 | 400 | ||
405 | SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet); | 401 | pr_debug("%s: packet:%p\n", __func__, packet); |
406 | 402 | ||
407 | /* Do NOT generate a chunkless packet. */ | 403 | /* Do NOT generate a chunkless packet. */ |
408 | if (list_empty(&packet->chunk_list)) | 404 | if (list_empty(&packet->chunk_list)) |
@@ -472,7 +468,9 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
472 | * | 468 | * |
473 | * [This whole comment explains WORD_ROUND() below.] | 469 | * [This whole comment explains WORD_ROUND() below.] |
474 | */ | 470 | */ |
475 | SCTP_DEBUG_PRINTK("***sctp_transmit_packet***\n"); | 471 | |
472 | pr_debug("***sctp_transmit_packet***\n"); | ||
473 | |||
476 | list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { | 474 | list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { |
477 | list_del_init(&chunk->list); | 475 | list_del_init(&chunk->list); |
478 | if (sctp_chunk_is_data(chunk)) { | 476 | if (sctp_chunk_is_data(chunk)) { |
@@ -505,16 +503,13 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
505 | memcpy(skb_put(nskb, chunk->skb->len), | 503 | memcpy(skb_put(nskb, chunk->skb->len), |
506 | chunk->skb->data, chunk->skb->len); | 504 | chunk->skb->data, chunk->skb->len); |
507 | 505 | ||
508 | SCTP_DEBUG_PRINTK("%s %p[%s] %s 0x%x, %s %d, %s %d, %s %d\n", | 506 | pr_debug("*** Chunk:%p[%s] %s 0x%x, length:%d, chunk->skb->len:%d, " |
509 | "*** Chunk", chunk, | 507 | "rtt_in_progress:%d\n", chunk, |
510 | sctp_cname(SCTP_ST_CHUNK( | 508 | sctp_cname(SCTP_ST_CHUNK(chunk->chunk_hdr->type)), |
511 | chunk->chunk_hdr->type)), | 509 | chunk->has_tsn ? "TSN" : "No TSN", |
512 | chunk->has_tsn ? "TSN" : "No TSN", | 510 | chunk->has_tsn ? ntohl(chunk->subh.data_hdr->tsn) : 0, |
513 | chunk->has_tsn ? | 511 | ntohs(chunk->chunk_hdr->length), chunk->skb->len, |
514 | ntohl(chunk->subh.data_hdr->tsn) : 0, | 512 | chunk->rtt_in_progress); |
515 | "length", ntohs(chunk->chunk_hdr->length), | ||
516 | "chunk->skb->len", chunk->skb->len, | ||
517 | "rtt_in_progress", chunk->rtt_in_progress); | ||
518 | 513 | ||
519 | /* | 514 | /* |
520 | * If this is a control chunk, this is our last | 515 | * If this is a control chunk, this is our last |
@@ -606,8 +601,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
606 | } | 601 | } |
607 | } | 602 | } |
608 | 603 | ||
609 | SCTP_DEBUG_PRINTK("***sctp_transmit_packet*** skb len %d\n", | 604 | pr_debug("***sctp_transmit_packet*** skb->len:%d\n", nskb->len); |
610 | nskb->len); | ||
611 | 605 | ||
612 | nskb->local_df = packet->ipfragok; | 606 | nskb->local_df = packet->ipfragok; |
613 | (*tp->af_specific->sctp_xmit)(nskb, tp); | 607 | (*tp->af_specific->sctp_xmit)(nskb, tp); |