Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44282
b: refs/heads/master
c: c5a1ae9
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 11, 2006
1 parent 895d568 commit 23f3ba0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e312d100f19fdfe1019512b07a9d15653f254abf
refs/heads/master: c5a1ae9a4cc4aef1505fa0aba079f834c3ee1af1
38 changes: 9 additions & 29 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
{
struct dccp_sock *dp = dccp_sk(sk);
struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
struct dccp_tx_hist_entry *new_packet;
struct timeval now;
suseconds_t delay;

Expand All @@ -310,21 +309,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
if (unlikely(skb->len == 0))
return -EBADMSG;

/* See if last packet allocated was not sent */
new_packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist);
if (new_packet == NULL || new_packet->dccphtx_sent) {
new_packet = dccp_tx_hist_entry_new(ccid3_tx_hist,
GFP_ATOMIC);

if (unlikely(new_packet == NULL)) {
DCCP_WARN("%s, sk=%p, not enough mem to add to history,"
"send refused\n", dccp_role(sk), sk);
return -ENOBUFS;
}

dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, new_packet);
}

dccp_timestamp(sk, &now);

switch (hctx->ccid3hctx_state) {
Expand Down Expand Up @@ -380,31 +364,27 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)

static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)
{
const struct dccp_sock *dp = dccp_sk(sk);
struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
struct timeval now;
struct dccp_tx_hist_entry *packet;

BUG_ON(hctx == NULL);

dccp_timestamp(sk, &now);

ccid3_hc_tx_update_s(hctx, len);

packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist);
packet = dccp_tx_hist_entry_new(ccid3_tx_hist, GFP_ATOMIC);
if (unlikely(packet == NULL)) {
DCCP_WARN("packet doesn't exist in history!\n");
return;
}
if (unlikely(packet->dccphtx_sent)) {
DCCP_WARN("no unsent packet in history!\n");
DCCP_CRIT("packet history - out of memory!");
return;
}
dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, packet);

dccp_timestamp(sk, &now);
packet->dccphtx_tstamp = now;
packet->dccphtx_seqno = dp->dccps_gss;
hctx->ccid3hctx_idle = 0;
packet->dccphtx_rtt = hctx->ccid3hctx_rtt;
packet->dccphtx_sent = 1;
packet->dccphtx_seqno = dccp_sk(sk)->dccps_gss;
packet->dccphtx_rtt = hctx->ccid3hctx_rtt;
packet->dccphtx_sent = 1;
hctx->ccid3hctx_idle = 0;
}

static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
Expand Down

0 comments on commit 23f3ba0

Please sign in to comment.