diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 22:41:10 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 22:41:10 -0400 |
commit | 0e3aef8d09a8c11e3fb83cdcb24b5bc7421b3726 (patch) | |
tree | 62e19d24380a9a8308d0ef3f2186742944971a5c /net/sctp/chunk.c | |
parent | bfa0d9843ac5feb9667990706b4524390fee4df9 (diff) |
sctp: Tag messages that can be Nagle delayed at creation.
When we create the sctp_datamsg and fragment the user data,
we know exactly if we are sending full segments or not and
how they might be bundled. During this time, we can mark
messages a Nagle capable or not. This makes the check at
transmit time much simpler.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/chunk.c')
-rw-r--r-- | net/sctp/chunk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 3eab6db59a37..476caaf100ed 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
@@ -58,9 +58,9 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg) | |||
58 | msg->send_failed = 0; | 58 | msg->send_failed = 0; |
59 | msg->send_error = 0; | 59 | msg->send_error = 0; |
60 | msg->can_abandon = 0; | 60 | msg->can_abandon = 0; |
61 | msg->can_delay = 1; | ||
61 | msg->expires_at = 0; | 62 | msg->expires_at = 0; |
62 | INIT_LIST_HEAD(&msg->chunks); | 63 | INIT_LIST_HEAD(&msg->chunks); |
63 | msg->msg_size = 0; | ||
64 | } | 64 | } |
65 | 65 | ||
66 | /* Allocate and initialize datamsg. */ | 66 | /* Allocate and initialize datamsg. */ |
@@ -157,7 +157,6 @@ static void sctp_datamsg_assign(struct sctp_datamsg *msg, struct sctp_chunk *chu | |||
157 | { | 157 | { |
158 | sctp_datamsg_hold(msg); | 158 | sctp_datamsg_hold(msg); |
159 | chunk->msg = msg; | 159 | chunk->msg = msg; |
160 | msg->msg_size += chunk->skb->len; | ||
161 | } | 160 | } |
162 | 161 | ||
163 | 162 | ||
@@ -247,6 +246,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, | |||
247 | if (msg_len >= first_len) { | 246 | if (msg_len >= first_len) { |
248 | msg_len -= first_len; | 247 | msg_len -= first_len; |
249 | whole = 1; | 248 | whole = 1; |
249 | msg->can_delay = 0; | ||
250 | } | 250 | } |
251 | 251 | ||
252 | /* How many full sized? How many bytes leftover? */ | 252 | /* How many full sized? How many bytes leftover? */ |