aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-09 23:30:56 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:55:18 -0400
commit27258ee54f8cd4a43d09319aa5448145afc2cb8d (patch)
tree4a52d16da47f7ab0777252169406ae85e53488b1 /net/dccp/ccids
parent0d48d93947dd9ea21c5cdc76a8581b06a4a39281 (diff)
[DCCP]: Introduce dccp_write_xmit from code in dccp_sendmsg
This way it gets closer to the TCP flow, where congestion window checks are done, it seems we can map ccid_hc_tx_send_packet in dccp_write_xmit to tcp_snd_wnd_test in tcp_write_xmit, a CCID2 decision should just fit in here as well... Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r--net/dccp/ccids/ccid3.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 04299c7565f3..df4adfeaafac 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -977,13 +977,14 @@ out:
977 sock_put(sk); 977 sock_put(sk);
978} 978}
979 979
980static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb, 980static int ccid3_hc_tx_send_packet(struct sock *sk,
981 int len, long *delay) 981 struct sk_buff *skb, int len)
982{ 982{
983 struct dccp_sock *dp = dccp_sk(sk); 983 struct dccp_sock *dp = dccp_sk(sk);
984 struct ccid3_hc_tx_sock *hctx = dp->dccps_hc_tx_ccid_private; 984 struct ccid3_hc_tx_sock *hctx = dp->dccps_hc_tx_ccid_private;
985 struct ccid3_tx_hist_entry *new_packet = NULL; 985 struct ccid3_tx_hist_entry *new_packet = NULL;
986 struct timeval now; 986 struct timeval now;
987 long delay;
987 int rc = -ENOTCONN; 988 int rc = -ENOTCONN;
988 989
989// ccid3_pr_debug("%s, sk=%p, skb=%p, len=%d\n", dccp_role(sk), sk, skb, len); 990// ccid3_pr_debug("%s, sk=%p, skb=%p, len=%d\n", dccp_role(sk), sk, skb, len);
@@ -1037,11 +1038,11 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb,
1037 break; 1038 break;
1038 case TFRC_SSTATE_NO_FBACK: 1039 case TFRC_SSTATE_NO_FBACK:
1039 case TFRC_SSTATE_FBACK: 1040 case TFRC_SSTATE_FBACK:
1040 *delay = (now_delta(hctx->ccid3hctx_t_nom) - hctx->ccid3hctx_delta); 1041 delay = (now_delta(hctx->ccid3hctx_t_nom) - hctx->ccid3hctx_delta);
1041 ccid3_pr_debug("send_packet delay=%ld\n",*delay); 1042 ccid3_pr_debug("send_packet delay=%ld\n", delay);
1042 *delay /= -1000; 1043 delay /= -1000;
1043 /* divide by -1000 is to convert to ms and get sign right */ 1044 /* divide by -1000 is to convert to ms and get sign right */
1044 rc = *delay > 0 ? -EAGAIN : 0; 1045 rc = delay > 0 ? -EAGAIN : 0;
1045 break; 1046 break;
1046 default: 1047 default:
1047 printk(KERN_CRIT "%s: %s, sk=%p, Illegal state (%d)!\n", 1048 printk(KERN_CRIT "%s: %s, sk=%p, Illegal state (%d)!\n",