aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-09 19:01:25 -0400
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-09 19:01:25 -0400
commit59d203f9e989c81defc2cb1c559d678e16dbe684 (patch)
treebd8456b28612818674b5031b8c0dcaa752b324bd /net
parentdc19336c76d213fd9ae7b6a352e837f509418012 (diff)
[CCID3] Cleanup ccid3 debug calls
Also use some BUG_ON where appropriate and use LIMIT_NETDEBUG for the unlikely cases where we, at this stage, want to know about, that in my tests hasn't appeared in the radar. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ccids/ccid3.c164
1 files changed, 67 insertions, 97 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 4467a74e6f40..e05f4f955eee 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -78,13 +78,11 @@ static struct dccp_li_hist *ccid3_li_hist;
78 78
79static int ccid3_init(struct sock *sk) 79static int ccid3_init(struct sock *sk)
80{ 80{
81 ccid3_pr_debug("%s, sk=%p\n", dccp_role(sk), sk);
82 return 0; 81 return 0;
83} 82}
84 83
85static void ccid3_exit(struct sock *sk) 84static void ccid3_exit(struct sock *sk)
86{ 85{
87 ccid3_pr_debug("%s, sk=%p\n", dccp_role(sk), sk);
88} 86}
89 87
90/* TFRC sender states */ 88/* TFRC sender states */
@@ -287,14 +285,14 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
287 long delay; 285 long delay;
288 int rc = -ENOTCONN; 286 int rc = -ENOTCONN;
289 287
290 /* Check if pure ACK or Terminating*/ 288 BUG_ON(hctx == NULL || hctx->ccid3hctx_state == TFRC_SSTATE_TERM);
291 289
290 /* Check if pure ACK or Terminating*/
292 /* 291 /*
293 * XXX: We only call this function for DATA and DATAACK, on, these 292 * XXX: We only call this function for DATA and DATAACK, on, these
294 * packets can have zero length, but why the comment about "pure ACK"? 293 * packets can have zero length, but why the comment about "pure ACK"?
295 */ 294 */
296 if (hctx == NULL || len == 0 || 295 if (unlikely(len == 0))
297 hctx->ccid3hctx_state == TFRC_SSTATE_TERM)
298 goto out; 296 goto out;
299 297
300 /* See if last packet allocated was not sent */ 298 /* See if last packet allocated was not sent */
@@ -304,10 +302,10 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
304 SLAB_ATOMIC); 302 SLAB_ATOMIC);
305 303
306 rc = -ENOBUFS; 304 rc = -ENOBUFS;
307 if (new_packet == NULL) { 305 if (unlikely(new_packet == NULL)) {
308 ccid3_pr_debug("%s, sk=%p, not enough mem to add " 306 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, not enough "
309 "to history, send refused\n", 307 "mem to add to history, send refused\n",
310 dccp_role(sk), sk); 308 __FUNCTION__, dccp_role(sk), sk);
311 goto out; 309 goto out;
312 } 310 }
313 311
@@ -318,9 +316,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
318 316
319 switch (hctx->ccid3hctx_state) { 317 switch (hctx->ccid3hctx_state) {
320 case TFRC_SSTATE_NO_SENT: 318 case TFRC_SSTATE_NO_SENT:
321 ccid3_pr_debug("%s, sk=%p, first packet(%llu)\n",
322 dccp_role(sk), sk, dp->dccps_gss);
323
324 hctx->ccid3hctx_no_feedback_timer.function = ccid3_hc_tx_no_feedback_timer; 319 hctx->ccid3hctx_no_feedback_timer.function = ccid3_hc_tx_no_feedback_timer;
325 hctx->ccid3hctx_no_feedback_timer.data = (unsigned long)sk; 320 hctx->ccid3hctx_no_feedback_timer.data = (unsigned long)sk;
326 sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer, 321 sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
@@ -341,7 +336,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
341 case TFRC_SSTATE_FBACK: 336 case TFRC_SSTATE_FBACK:
342 delay = (timeval_delta(&now, &hctx->ccid3hctx_t_nom) - 337 delay = (timeval_delta(&now, &hctx->ccid3hctx_t_nom) -
343 hctx->ccid3hctx_delta); 338 hctx->ccid3hctx_delta);
344 ccid3_pr_debug("send_packet delay=%ld\n", delay);
345 delay /= -1000; 339 delay /= -1000;
346 /* divide by -1000 is to convert to ms and get sign right */ 340 /* divide by -1000 is to convert to ms and get sign right */
347 rc = delay > 0 ? delay : 0; 341 rc = delay > 0 ? delay : 0;
@@ -371,13 +365,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
371 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 365 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
372 struct timeval now; 366 struct timeval now;
373 367
374 BUG_ON(hctx == NULL); 368 BUG_ON(hctx == NULL || hctx->ccid3hctx_state == TFRC_SSTATE_TERM);
375
376 if (hctx->ccid3hctx_state == TFRC_SSTATE_TERM) {
377 ccid3_pr_debug("%s, sk=%p, while state is TFRC_SSTATE_TERM!\n",
378 dccp_role(sk), sk);
379 return;
380 }
381 369
382 dccp_timestamp(sk, &now); 370 dccp_timestamp(sk, &now);
383 371
@@ -387,14 +375,14 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
387 struct dccp_tx_hist_entry *packet; 375 struct dccp_tx_hist_entry *packet;
388 376
389 packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist); 377 packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist);
390 if (packet == NULL) { 378 if (unlikely(packet == NULL)) {
391 printk(KERN_CRIT "%s: packet doesn't exists in " 379 LIMIT_NETDEBUG(KERN_WARNING "%s: packet doesn't "
392 "history!\n", __FUNCTION__); 380 "exists in history!\n", __FUNCTION__);
393 return; 381 return;
394 } 382 }
395 if (packet->dccphtx_sent) { 383 if (unlikely(packet->dccphtx_sent)) {
396 printk(KERN_CRIT "%s: no unsent packet in history!\n", 384 LIMIT_NETDEBUG(KERN_WARNING "%s: no unsent packet in "
397 __FUNCTION__); 385 "history!\n", __FUNCTION__);
398 return; 386 return;
399 } 387 }
400 packet->dccphtx_tstamp = now; 388 packet->dccphtx_tstamp = now;
@@ -465,14 +453,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
465 u32 x_recv; 453 u32 x_recv;
466 u32 r_sample; 454 u32 r_sample;
467 455
468 if (hctx == NULL) 456 BUG_ON(hctx == NULL || hctx->ccid3hctx_state == TFRC_SSTATE_TERM);
469 return;
470
471 if (hctx->ccid3hctx_state == TFRC_SSTATE_TERM) {
472 ccid3_pr_debug("%s, sk=%p, received a packet when "
473 "terminating!\n", dccp_role(sk), sk);
474 return;
475 }
476 457
477 /* we are only interested in ACKs */ 458 /* we are only interested in ACKs */
478 if (!(DCCP_SKB_CB(skb)->dccpd_type == DCCP_PKT_ACK || 459 if (!(DCCP_SKB_CB(skb)->dccpd_type == DCCP_PKT_ACK ||
@@ -496,12 +477,12 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
496 /* get t_recvdata from history */ 477 /* get t_recvdata from history */
497 packet = dccp_tx_hist_find_entry(&hctx->ccid3hctx_hist, 478 packet = dccp_tx_hist_find_entry(&hctx->ccid3hctx_hist,
498 DCCP_SKB_CB(skb)->dccpd_ack_seq); 479 DCCP_SKB_CB(skb)->dccpd_ack_seq);
499 if (packet == NULL) { 480 if (unlikely(packet == NULL)) {
500 ccid3_pr_debug("%s, sk=%p, seqno %llu(%s) does't " 481 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, seqno "
501 "exist in history!\n", 482 "%llu(%s) does't exist in history!\n",
502 dccp_role(sk), sk, 483 __FUNCTION__, dccp_role(sk), sk,
503 DCCP_SKB_CB(skb)->dccpd_ack_seq, 484 (unsigned long long)DCCP_SKB_CB(skb)->dccpd_ack_seq,
504 dccp_packet_name(DCCP_SKB_CB(skb)->dccpd_type)); 485 dccp_packet_name(DCCP_SKB_CB(skb)->dccpd_type));
505 return; 486 return;
506 } 487 }
507 488
@@ -509,8 +490,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
509 dccp_timestamp(sk, &now); 490 dccp_timestamp(sk, &now);
510 r_sample = timeval_delta(&now, &packet->dccphtx_tstamp); 491 r_sample = timeval_delta(&now, &packet->dccphtx_tstamp);
511 if (unlikely(r_sample <= t_elapsed)) 492 if (unlikely(r_sample <= t_elapsed))
512 LIMIT_NETDEBUG(KERN_WARNING 493 LIMIT_NETDEBUG(KERN_WARNING "%s: r_sample=%uus, "
513 "%s: r_sample=%uus, t_elapsed=%uus\n", 494 "t_elapsed=%uus\n",
514 __FUNCTION__, r_sample, t_elapsed); 495 __FUNCTION__, r_sample, t_elapsed);
515 else 496 else
516 r_sample -= t_elapsed; 497 r_sample -= t_elapsed;
@@ -606,10 +587,11 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
606 587
607static void ccid3_hc_tx_insert_options(struct sock *sk, struct sk_buff *skb) 588static void ccid3_hc_tx_insert_options(struct sock *sk, struct sk_buff *skb)
608{ 589{
609 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 590 const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
610 591
611 if (hctx == NULL || !(sk->sk_state == DCCP_OPEN || 592 BUG_ON(hctx == NULL);
612 sk->sk_state == DCCP_PARTOPEN)) 593
594 if (!(sk->sk_state == DCCP_OPEN || sk->sk_state == DCCP_PARTOPEN))
613 return; 595 return;
614 596
615 DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count; 597 DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count;
@@ -624,8 +606,7 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
624 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 606 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
625 struct ccid3_options_received *opt_recv; 607 struct ccid3_options_received *opt_recv;
626 608
627 if (hctx == NULL) 609 BUG_ON(hctx == NULL);
628 return 0;
629 610
630 opt_recv = &hctx->ccid3hctx_options_received; 611 opt_recv = &hctx->ccid3hctx_options_received;
631 612
@@ -639,10 +620,10 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
639 620
640 switch (option) { 621 switch (option) {
641 case TFRC_OPT_LOSS_EVENT_RATE: 622 case TFRC_OPT_LOSS_EVENT_RATE:
642 if (len != 4) { 623 if (unlikely(len != 4)) {
643 ccid3_pr_debug("%s, sk=%p, invalid len for " 624 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, invalid "
644 "TFRC_OPT_LOSS_EVENT_RATE\n", 625 "len for TFRC_OPT_LOSS_EVENT_RATE\n",
645 dccp_role(sk), sk); 626 __FUNCTION__, dccp_role(sk), sk);
646 rc = -EINVAL; 627 rc = -EINVAL;
647 } else { 628 } else {
648 opt_recv->ccid3or_loss_event_rate = ntohl(*(u32 *)value); 629 opt_recv->ccid3or_loss_event_rate = ntohl(*(u32 *)value);
@@ -660,10 +641,10 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
660 opt_recv->ccid3or_loss_intervals_len); 641 opt_recv->ccid3or_loss_intervals_len);
661 break; 642 break;
662 case TFRC_OPT_RECEIVE_RATE: 643 case TFRC_OPT_RECEIVE_RATE:
663 if (len != 4) { 644 if (unlikely(len != 4)) {
664 ccid3_pr_debug("%s, sk=%p, invalid len for " 645 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, invalid "
665 "TFRC_OPT_RECEIVE_RATE\n", 646 "len for TFRC_OPT_RECEIVE_RATE\n",
666 dccp_role(sk), sk); 647 __FUNCTION__, dccp_role(sk), sk);
667 rc = -EINVAL; 648 rc = -EINVAL;
668 } else { 649 } else {
669 opt_recv->ccid3or_receive_rate = ntohl(*(u32 *)value); 650 opt_recv->ccid3or_receive_rate = ntohl(*(u32 *)value);
@@ -682,8 +663,6 @@ static int ccid3_hc_tx_init(struct sock *sk)
682 struct dccp_sock *dp = dccp_sk(sk); 663 struct dccp_sock *dp = dccp_sk(sk);
683 struct ccid3_hc_tx_sock *hctx; 664 struct ccid3_hc_tx_sock *hctx;
684 665
685 ccid3_pr_debug("%s, sk=%p\n", dccp_role(sk), sk);
686
687 dp->dccps_hc_tx_ccid_private = kmalloc(sizeof(*hctx), gfp_any()); 666 dp->dccps_hc_tx_ccid_private = kmalloc(sizeof(*hctx), gfp_any());
688 if (dp->dccps_hc_tx_ccid_private == NULL) 667 if (dp->dccps_hc_tx_ccid_private == NULL)
689 return -ENOMEM; 668 return -ENOMEM;
@@ -712,7 +691,6 @@ static void ccid3_hc_tx_exit(struct sock *sk)
712 struct dccp_sock *dp = dccp_sk(sk); 691 struct dccp_sock *dp = dccp_sk(sk);
713 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 692 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
714 693
715 ccid3_pr_debug("%s, sk=%p\n", dccp_role(sk), sk);
716 BUG_ON(hctx == NULL); 694 BUG_ON(hctx == NULL);
717 695
718 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_TERM); 696 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_TERM);
@@ -792,10 +770,10 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
792 } 770 }
793 771
794 packet = dccp_rx_hist_find_data_packet(&hcrx->ccid3hcrx_hist); 772 packet = dccp_rx_hist_find_data_packet(&hcrx->ccid3hcrx_hist);
795 if (packet == NULL) { 773 if (unlikely(packet == NULL)) {
796 printk(KERN_CRIT "%s: %s, sk=%p, no data packet in history!\n", 774 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, no data packet "
797 __FUNCTION__, dccp_role(sk), sk); 775 "in history!\n",
798 dump_stack(); 776 __FUNCTION__, dccp_role(sk), sk);
799 return; 777 return;
800 } 778 }
801 779
@@ -817,11 +795,12 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
817 795
818static void ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb) 796static void ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb)
819{ 797{
820 struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); 798 const struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
821 u32 x_recv, pinv; 799 u32 x_recv, pinv;
822 800
823 if (hcrx == NULL || !(sk->sk_state == DCCP_OPEN || 801 BUG_ON(hcrx == NULL);
824 sk->sk_state == DCCP_PARTOPEN)) 802
803 if (!(sk->sk_state == DCCP_OPEN || sk->sk_state == DCCP_PARTOPEN))
825 return; 804 return;
826 805
827 DCCP_SKB_CB(skb)->dccpd_ccval = hcrx->ccid3hcrx_last_counter; 806 DCCP_SKB_CB(skb)->dccpd_ccval = hcrx->ccid3hcrx_last_counter;
@@ -878,17 +857,17 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
878 } 857 }
879 } 858 }
880 859
881 if (step == 0) { 860 if (unlikely(step == 0)) {
882 printk(KERN_CRIT "%s: %s, sk=%p, packet history contains no " 861 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, packet history "
883 "data packets!\n", 862 "contains no data packets!\n",
884 __FUNCTION__, dccp_role(sk), sk); 863 __FUNCTION__, dccp_role(sk), sk);
885 return ~0; 864 return ~0;
886 } 865 }
887 866
888 if (interval == 0) { 867 if (unlikely(interval == 0)) {
889 ccid3_pr_debug("%s, sk=%p, Could not find a win_count " 868 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, Could not find a "
890 "interval > 0. Defaulting to 1\n", 869 "win_count interval > 0. Defaulting to 1\n",
891 dccp_role(sk), sk); 870 __FUNCTION__, dccp_role(sk), sk);
892 interval = 1; 871 interval = 1;
893 } 872 }
894found: 873found:
@@ -931,8 +910,9 @@ static void ccid3_hc_rx_update_li(struct sock *sk, u64 seq_loss, u8 win_loss)
931 if (li_tail == NULL) 910 if (li_tail == NULL)
932 return; 911 return;
933 li_tail->dccplih_interval = ccid3_hc_rx_calc_first_li(sk); 912 li_tail->dccplih_interval = ccid3_hc_rx_calc_first_li(sk);
934 } 913 } else
935 /* FIXME: find end of interval */ 914 LIMIT_NETDEBUG(KERN_WARNING "%s: FIXME: find end of "
915 "interval\n", __FUNCTION__);
936} 916}
937 917
938static void ccid3_hc_rx_detect_loss(struct sock *sk) 918static void ccid3_hc_rx_detect_loss(struct sock *sk)
@@ -956,10 +936,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
956 u32 p_prev, r_sample, t_elapsed; 936 u32 p_prev, r_sample, t_elapsed;
957 int ins; 937 int ins;
958 938
959 if (hcrx == NULL) 939 BUG_ON(hcrx == NULL ||
960 return; 940 !(hcrx->ccid3hcrx_state == TFRC_RSTATE_NO_DATA ||
961
962 BUG_ON(!(hcrx->ccid3hcrx_state == TFRC_RSTATE_NO_DATA ||
963 hcrx->ccid3hcrx_state == TFRC_RSTATE_DATA)); 941 hcrx->ccid3hcrx_state == TFRC_RSTATE_DATA));
964 942
965 opt_recv = &dccp_sk(sk)->dccps_options_received; 943 opt_recv = &dccp_sk(sk)->dccps_options_received;
@@ -978,8 +956,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
978 t_elapsed = opt_recv->dccpor_elapsed_time * 10; 956 t_elapsed = opt_recv->dccpor_elapsed_time * 10;
979 957
980 if (unlikely(r_sample <= t_elapsed)) 958 if (unlikely(r_sample <= t_elapsed))
981 LIMIT_NETDEBUG(KERN_WARNING 959 LIMIT_NETDEBUG(KERN_WARNING "%s: r_sample=%uus, "
982 "%s: r_sample=%uus, t_elapsed=%uus\n", 960 "t_elapsed=%uus\n",
983 __FUNCTION__, r_sample, t_elapsed); 961 __FUNCTION__, r_sample, t_elapsed);
984 else 962 else
985 r_sample -= t_elapsed; 963 r_sample -= t_elapsed;
@@ -997,19 +975,16 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
997 break; 975 break;
998 case DCCP_PKT_DATA: 976 case DCCP_PKT_DATA:
999 break; 977 break;
1000 default: 978 default: /* We're not interested in other packet types, move along */
1001 ccid3_pr_debug("%s, sk=%p, not DATA/DATAACK/ACK packet(%s)\n",
1002 dccp_role(sk), sk,
1003 dccp_packet_name(DCCP_SKB_CB(skb)->dccpd_type));
1004 return; 979 return;
1005 } 980 }
1006 981
1007 packet = dccp_rx_hist_entry_new(ccid3_rx_hist, sk, opt_recv->dccpor_ndp, 982 packet = dccp_rx_hist_entry_new(ccid3_rx_hist, sk, opt_recv->dccpor_ndp,
1008 skb, SLAB_ATOMIC); 983 skb, SLAB_ATOMIC);
1009 if (packet == NULL) { 984 if (unlikely(packet == NULL)) {
1010 ccid3_pr_debug("%s, sk=%p, Not enough mem to add rx packet " 985 LIMIT_NETDEBUG(KERN_WARNING "%s: %s, sk=%p, Not enough mem to "
1011 "to history (consider it lost)!", 986 "add rx packet to history, consider it lost!\n",
1012 dccp_role(sk), sk); 987 __FUNCTION__, dccp_role(sk), sk);
1013 return; 988 return;
1014 } 989 }
1015 990
@@ -1102,10 +1077,7 @@ static void ccid3_hc_rx_exit(struct sock *sk)
1102 struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); 1077 struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
1103 struct dccp_sock *dp = dccp_sk(sk); 1078 struct dccp_sock *dp = dccp_sk(sk);
1104 1079
1105 ccid3_pr_debug("%s, sk=%p\n", dccp_role(sk), sk); 1080 BUG_ON(hcrx == NULL);
1106
1107 if (hcrx == NULL)
1108 return;
1109 1081
1110 ccid3_hc_rx_set_state(sk, TFRC_RSTATE_TERM); 1082 ccid3_hc_rx_set_state(sk, TFRC_RSTATE_TERM);
1111 1083
@@ -1123,8 +1095,7 @@ static void ccid3_hc_rx_get_info(struct sock *sk, struct tcp_info *info)
1123{ 1095{
1124 const struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); 1096 const struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
1125 1097
1126 if (hcrx == NULL) 1098 BUG_ON(hcrx == NULL);
1127 return;
1128 1099
1129 info->tcpi_ca_state = hcrx->ccid3hcrx_state; 1100 info->tcpi_ca_state = hcrx->ccid3hcrx_state;
1130 info->tcpi_options |= TCPI_OPT_TIMESTAMPS; 1101 info->tcpi_options |= TCPI_OPT_TIMESTAMPS;
@@ -1135,8 +1106,7 @@ static void ccid3_hc_tx_get_info(struct sock *sk, struct tcp_info *info)
1135{ 1106{
1136 const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 1107 const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
1137 1108
1138 if (hctx == NULL) 1109 BUG_ON(hctx == NULL);
1139 return;
1140 1110
1141 info->tcpi_rto = hctx->ccid3hctx_t_rto; 1111 info->tcpi_rto = hctx->ccid3hctx_t_rto;
1142 info->tcpi_rtt = hctx->ccid3hctx_rtt; 1112 info->tcpi_rtt = hctx->ccid3hctx_rtt;