[DCCP]: More debug information for dccp_wait_for_ccid
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 20 Mar 2007 18:00:28 +0000 (15:00 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:54 +0000 (22:26 -0700)
This adds more detail in the wait_for_ccid packet scheduling loop.
In particular, it informs about (i) when delay is used and (ii) why
a packet is discarded.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/output.c

index aa21cc4de37f7b77c84cd38d6d901a1027810471..c8d843e983fcd4073f6847f1a68c354398924864 100644 (file)
@@ -194,6 +194,7 @@ static int dccp_wait_for_ccid(struct sock *sk, struct sk_buff *skb)
                rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb);
                if (rc <= 0)
                        break;
+               dccp_pr_debug("delayed send by %d msec\n", rc);
                delay = msecs_to_jiffies(rc);
                sk->sk_write_pending++;
                release_sock(sk);
@@ -255,7 +256,7 @@ void dccp_write_xmit(struct sock *sk, int block)
                                DCCP_BUG("err=%d after ccid_hc_tx_packet_sent",
                                         err);
                } else {
-                       dccp_pr_debug("packet discarded\n");
+                       dccp_pr_debug("packet discarded due to err=%d\n", err);
                        kfree_skb(skb);
                }
        }