Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256038
b: refs/heads/master
c: 58fdea0
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker committed Jul 4, 2011
1 parent aa8e2bc commit f808285
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 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: b4d5f4b2884625d13c7ef5b9fd085ec93bbf545c
refs/heads/master: 58fdea0f3170c13a3b875ef904d5b67cf73814be
16 changes: 6 additions & 10 deletions trunk/net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,18 +627,14 @@ static void ccid2_hc_tx_exit(struct sock *sk)

static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
{
const struct dccp_sock *dp = dccp_sk(sk);
struct ccid2_hc_rx_sock *hc = ccid2_hc_rx_sk(sk);

switch (DCCP_SKB_CB(skb)->dccpd_type) {
case DCCP_PKT_DATA:
case DCCP_PKT_DATAACK:
hc->rx_data++;
if (hc->rx_data >= dp->dccps_r_ack_ratio) {
dccp_send_ack(sk);
hc->rx_data = 0;
}
break;
if (!dccp_data_packet(skb))
return;

if (++hc->rx_num_data_pkts >= dccp_sk(sk)->dccps_r_ack_ratio) {
dccp_send_ack(sk);
hc->rx_num_data_pkts = 0;
}
}

Expand Down
6 changes: 5 additions & 1 deletion trunk/net/dccp/ccids/ccid2.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ static inline u32 rfc3390_bytes_to_packets(const u32 smss)
return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3);
}

/**
* struct ccid2_hc_rx_sock - Receiving end of CCID-2 half-connection
* @rx_num_data_pkts: number of data packets received since last feedback
*/
struct ccid2_hc_rx_sock {
int rx_data;
u32 rx_num_data_pkts;
};

static inline struct ccid2_hc_tx_sock *ccid2_hc_tx_sk(const struct sock *sk)
Expand Down

0 comments on commit f808285

Please sign in to comment.