Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194648
b: refs/heads/master
c: 0e3aef8
h: refs/heads/master
v: v3
  • Loading branch information
Vlad Yasevich committed May 1, 2010
1 parent 2d3a80f commit 6fe5d9e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 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: bfa0d9843ac5feb9667990706b4524390fee4df9
refs/heads/master: 0e3aef8d09a8c11e3fb83cdcb24b5bc7421b3726
8 changes: 3 additions & 5 deletions trunk/include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,17 +643,15 @@ struct sctp_pf {
struct sctp_datamsg {
/* Chunks waiting to be submitted to lower layer. */
struct list_head chunks;
/* Chunks that have been transmitted. */
size_t msg_size;
/* Reference counting. */
atomic_t refcnt;
/* When is this message no longer interesting to the peer? */
unsigned long expires_at;
/* Did the messenge fail to send? */
int send_error;
char send_failed;
/* Control whether chunks from this message can be abandoned. */
char can_abandon;
u8 send_failed:1,
can_abandon:1, /* can chunks from this message can be abandoned. */
can_delay; /* should this message be Nagle delayed */
};

struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *,
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sctp/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg)
msg->send_failed = 0;
msg->send_error = 0;
msg->can_abandon = 0;
msg->can_delay = 1;
msg->expires_at = 0;
INIT_LIST_HEAD(&msg->chunks);
msg->msg_size = 0;
}

/* Allocate and initialize datamsg. */
Expand Down Expand Up @@ -157,7 +157,6 @@ static void sctp_datamsg_assign(struct sctp_datamsg *msg, struct sctp_chunk *chu
{
sctp_datamsg_hold(msg);
chunk->msg = msg;
msg->msg_size += chunk->skb->len;
}


Expand Down Expand Up @@ -247,6 +246,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
if (msg_len >= first_len) {
msg_len -= first_len;
whole = 1;
msg->can_delay = 0;
}

/* How many full sized? How many bytes leftover? */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sctp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
* Don't delay large message writes that may have been
* fragmeneted into small peices.
*/
if ((len < max) && (chunk->msg->msg_size < max)) {
if ((len < max) && chunk->msg->can_delay) {
retval = SCTP_XMIT_NAGLE_DELAY;
goto finish;
}
Expand Down

0 comments on commit 6fe5d9e

Please sign in to comment.