Hi David,
Please consider pulling from:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/
Best Regards,
- Arnaldo
tree cb64f1688f611035ca076d8baed11abf3558361c
parent add709a31388a56411bc19babb8a45552744974e
author Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> 1123631974 -0300
committer Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> 1123631974 -0300
[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 <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
--
ccid.h|8 ++-
ccids/ccid3.c | 13 ++-
dccp.h|5 ++--
output.c | 38 +
proto.c | 65 ++
5 files changed, 57 insertions(+), 72 deletions(-)
--
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -43,8 +43,7 @@ struct ccid {
unsigned char len, u16 idx,
unsigned char* value);
int (*ccid_hc_tx_send_packet)(struct sock *sk,
- struct sk_buff *skb, int len,
- long *delay);
+ struct sk_buff *skb, int len);
void(*ccid_hc_tx_packet_sent)(struct sock *sk, int more,
int len);
};
@@ -60,12 +59,11 @@ static inline void __ccid_get(struct cci
}
static inline int ccid_hc_tx_send_packet(struct ccid *ccid, struct sock *sk,
-struct sk_buff *skb, int len,
-long *delay)
+struct sk_buff *skb, int len)
{
int rc = 0;
if (ccid->ccid_hc_tx_send_packet != NULL)
- rc = ccid->ccid_hc_tx_send_packet(sk, skb, len, delay);
+ rc = ccid->ccid_hc_tx_send_packet(sk, skb, len);
return rc;
}
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -977,13 +977,14 @@ out:
sock_put(sk);
}
-static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb,
- int len, long *delay)
+static int ccid3_hc_tx_send_packet(struct sock *sk,
+ struct sk_buff *skb, int len)
{
struct dccp_sock *dp = dccp_sk(sk);
struct ccid3_hc_tx_sock *hctx = dp->dccps_hc_tx_ccid_private;
struct ccid3_tx_hist_entry *new_packet = NULL;
struct timeval now;
+ long delay;
int rc = -ENOTCONN;
// 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(struc
break;
case TFRC_SSTATE_NO_FBACK:
case TFRC_SSTATE_FBACK:
- *delay = (now_delta(hctx->ccid3hctx_t_nom) -
hctx->ccid3hctx_delta);
- ccid3_pr_debug("send_packet delay=%ld\n",*delay);
- *delay /= -1000;
+ delay = (now_delta(hctx->ccid3hctx_t_nom) -
hctx->ccid3hctx_delta);
+ ccid3_pr_debug("send_packet delay=%ld\n", delay);
+ delay /= -1000;
/* divide by -1000 is to convert to ms and get sign right */
- rc = *delay > 0 ? -EAGAIN : 0;
+ rc = delay > 0 ? -EAGAIN : 0;
break;
default:
printk(KERN_CRIT "%s: %s, sk=%p, Illegal state (%d)!\n",
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -122,6 +122,9 @@ extern void dccp_send_ack(struct sock *s
extern void dccp_send_delayed_ack(struct sock *sk);
extern void dccp_send_sync(struct sock *sk, u64 seq);
+extern int dccp_write_xmit(struct sock *sk, struct sk_buff *skb,
+ const int len);
+
extern void dccp_init_xmit_timers(struct sock *sk);
static inline void dccp_clear_xmit_timers(struct sock *sk)
{
@@ -194,8 +197,6 @@ static inline void dccp_openreq_init(str
req->rcv_wnd = 0;
}
-extern void dccp_v4_send_check(struct sock *sk, struct dccp_hdr *dh, int len,
- struct sk_buff *skb);
extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
extern struct sock *dccp_create_openreq_child(struct sock *sk,
diff --git a/net/dccp/output.c b/net/dccp/output.c
--- a/net/dccp/output.c
+++ b/net/dccp