aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/options.c')
-rw-r--r--net/dccp/options.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index e1867767946c..9ca32cba83af 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -119,7 +119,9 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
119 opt_recv->dccpor_ack_vector_idx = value - options; 119 opt_recv->dccpor_ack_vector_idx = value - options;
120 120
121 dccp_pr_debug("%sACK vector 0, len=%d, ack_ackno=%llu\n", 121 dccp_pr_debug("%sACK vector 0, len=%d, ack_ackno=%llu\n",
122 debug_prefix, len, DCCP_SKB_CB(skb)->dccpd_ack_seq); 122 debug_prefix, len,
123 (unsigned long long)
124 DCCP_SKB_CB(skb)->dccpd_ack_seq);
123 dccp_ackvector_print(DCCP_SKB_CB(skb)->dccpd_ack_seq, 125 dccp_ackvector_print(DCCP_SKB_CB(skb)->dccpd_ack_seq,
124 value, len); 126 value, len);
125 dccp_ackpkts_check_rcv_ackvector(dp->dccps_hc_rx_ackpkts, sk, 127 dccp_ackpkts_check_rcv_ackvector(dp->dccps_hc_rx_ackpkts, sk,
@@ -137,6 +139,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
137 139
138 dccp_pr_debug("%sTIMESTAMP=%u, ackno=%llu\n", 140 dccp_pr_debug("%sTIMESTAMP=%u, ackno=%llu\n",
139 debug_prefix, opt_recv->dccpor_timestamp, 141 debug_prefix, opt_recv->dccpor_timestamp,
142 (unsigned long long)
140 DCCP_SKB_CB(skb)->dccpd_ack_seq); 143 DCCP_SKB_CB(skb)->dccpd_ack_seq);
141 break; 144 break;
142 case DCCPO_TIMESTAMP_ECHO: 145 case DCCPO_TIMESTAMP_ECHO:
@@ -147,7 +150,9 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
147 150
148 dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, diff=%u\n", 151 dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, diff=%u\n",
149 debug_prefix, opt_recv->dccpor_timestamp_echo, 152 debug_prefix, opt_recv->dccpor_timestamp_echo,
150 len + 2, DCCP_SKB_CB(skb)->dccpd_ack_seq, 153 len + 2,
154 (unsigned long long)
155 DCCP_SKB_CB(skb)->dccpd_ack_seq,
151 tcp_time_stamp - opt_recv->dccpor_timestamp_echo); 156 tcp_time_stamp - opt_recv->dccpor_timestamp_echo);
152 157
153 opt_recv->dccpor_elapsed_time = dccp_decode_value_var(value + 4, len - 4); 158 opt_recv->dccpor_elapsed_time = dccp_decode_value_var(value + 4, len - 4);
@@ -308,7 +313,8 @@ void dccp_insert_option_elapsed_time(struct sock *sk,
308 313
309 dccp_pr_debug("%sELAPSED_TIME=%u, len=%d, seqno=%llu\n", 314 dccp_pr_debug("%sELAPSED_TIME=%u, len=%d, seqno=%llu\n",
310 debug_prefix, elapsed_time, 315 debug_prefix, elapsed_time,
311 len, DCCP_SKB_CB(skb)->dccpd_seq); 316 len,
317 (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq);
312} 318}
313 319
314EXPORT_SYMBOL(dccp_insert_option_elapsed_time); 320EXPORT_SYMBOL(dccp_insert_option_elapsed_time);
@@ -382,7 +388,8 @@ static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb)
382 388
383 dccp_pr_debug("%sACK Vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu\n", 389 dccp_pr_debug("%sACK Vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu\n",
384 debug_prefix, ap->dccpap_ack_vector_len, 390 debug_prefix, ap->dccpap_ack_vector_len,
385 ap->dccpap_ack_seqno, ap->dccpap_ack_ackno); 391 (unsigned long long) ap->dccpap_ack_seqno,
392 (unsigned long long) ap->dccpap_ack_ackno);
386} 393}
387 394
388static inline void dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb) 395static inline void dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
@@ -422,7 +429,8 @@ static void dccp_insert_option_timestamp_echo(struct sock *sk, struct sk_buff *s
422 429
423 dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, seqno=%llu\n", 430 dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, seqno=%llu\n",
424 debug_prefix, dp->dccps_timestamp_echo, 431 debug_prefix, dp->dccps_timestamp_echo,
425 len, DCCP_SKB_CB(skb)->dccpd_seq); 432 len,
433 (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq);
426 434
427 dp->dccps_timestamp_echo = 0; 435 dp->dccps_timestamp_echo = 0;
428 dp->dccps_timestamp_time = 0; 436 dp->dccps_timestamp_time = 0;
@@ -607,7 +615,8 @@ int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state)
607 */ 615 */
608 if (state == DCCP_ACKPKTS_STATE_NOT_RECEIVED && 616 if (state == DCCP_ACKPKTS_STATE_NOT_RECEIVED &&
609 len == 0 && delta == 0) { /* Found our reserved seat! */ 617 len == 0 && delta == 0) { /* Found our reserved seat! */
610 dccp_pr_debug("Found %llu reserved seat!\n", ackno); 618 dccp_pr_debug("Found %llu reserved seat!\n",
619 (unsigned long long) ackno);
611 ap->dccpap_buf[index] = state; 620 ap->dccpap_buf[index] = state;
612 goto out; 621 goto out;
613 } 622 }
@@ -630,7 +639,8 @@ out:
630 639
631out_duplicate: 640out_duplicate:
632 /* Duplicate packet */ 641 /* Duplicate packet */
633 dccp_pr_debug("Received a dup or already considered lost packet: %llu\n", ackno); 642 dccp_pr_debug("Received a dup or already considered lost packet: %llu\n",
643 (unsigned long long) ackno);
634 return -EILSEQ; 644 return -EILSEQ;
635} 645}
636 646
@@ -640,7 +650,8 @@ void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len)
640 if (!dccp_debug) 650 if (!dccp_debug)
641 return; 651 return;
642 652
643 printk("ACK vector len=%d, ackno=%llu |", len, ackno); 653 printk("ACK vector len=%d, ackno=%llu |", len,
654 (unsigned long long) ackno);
644 655
645 while (len--) { 656 while (len--) {
646 const u8 state = (*vector & DCCP_ACKPKTS_STATE_MASK) >> 6; 657 const u8 state = (*vector & DCCP_ACKPKTS_STATE_MASK) >> 6;
@@ -693,7 +704,8 @@ void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap, struct sock *sk,
693#endif 704#endif
694 dccp_pr_debug("%sACK packet 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n", 705 dccp_pr_debug("%sACK packet 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n",
695 debug_prefix, 1, 706 debug_prefix, 1,
696 ap->dccpap_ack_seqno, ap->dccpap_ack_ackno); 707 (unsigned long long) ap->dccpap_ack_seqno,
708 (unsigned long long) ap->dccpap_ack_ackno);
697 dccp_ackpkts_trow_away_ack_record(ap); 709 dccp_ackpkts_trow_away_ack_record(ap);
698 ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1; 710 ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1;
699 } 711 }
@@ -745,7 +757,10 @@ static void dccp_ackpkts_check_rcv_ackvector(struct dccp_ackpkts *ap,
745#endif 757#endif
746 dccp_pr_debug("%sACK vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n", 758 dccp_pr_debug("%sACK vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n",
747 debug_prefix, len, 759 debug_prefix, len,
748 ap->dccpap_ack_seqno, ap->dccpap_ack_ackno); 760 (unsigned long long)
761 ap->dccpap_ack_seqno,
762 (unsigned long long)
763 ap->dccpap_ack_ackno);
749 dccp_ackpkts_trow_away_ack_record(ap); 764 dccp_ackpkts_trow_away_ack_record(ap);
750 } 765 }
751 /* 766 /*