diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2005-11-11 19:08:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-11 19:08:24 -0500 |
commit | 049b3ff5a86d0187184a189d2e31b8654d58fe22 (patch) | |
tree | aed83ae799e444c57d76597bad6e3b41957a828e /include/net/sctp | |
parent | 19c7e9eef503dc1ae926f3d26c56f88bee568d7b (diff) |
[SCTP]: Include ulpevents in socket receive buffer accounting.
Also introduces a sysctl option to configure the receive buffer
accounting policy to be either at socket or association level.
Default is all the associations on the same socket share the
receive buffer.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r-- | include/net/sctp/structs.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 2aad4468797e..8e7794ee27ff 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -161,6 +161,13 @@ extern struct sctp_globals { | |||
161 | */ | 161 | */ |
162 | int sndbuf_policy; | 162 | int sndbuf_policy; |
163 | 163 | ||
164 | /* | ||
165 | * Policy for preforming sctp/socket accounting | ||
166 | * 0 - do socket level accounting, all assocs share sk_rcvbuf | ||
167 | * 1 - do sctp accounting, each asoc may use sk_rcvbuf bytes | ||
168 | */ | ||
169 | int rcvbuf_policy; | ||
170 | |||
164 | /* Delayed SACK timeout 200ms default*/ | 171 | /* Delayed SACK timeout 200ms default*/ |
165 | int sack_timeout; | 172 | int sack_timeout; |
166 | 173 | ||
@@ -218,6 +225,7 @@ extern struct sctp_globals { | |||
218 | #define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable) | 225 | #define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable) |
219 | #define sctp_max_retrans_association (sctp_globals.max_retrans_association) | 226 | #define sctp_max_retrans_association (sctp_globals.max_retrans_association) |
220 | #define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) | 227 | #define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) |
228 | #define sctp_rcvbuf_policy (sctp_globals.rcvbuf_policy) | ||
221 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) | 229 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) |
222 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) | 230 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) |
223 | #define sctp_sack_timeout (sctp_globals.sack_timeout) | 231 | #define sctp_sack_timeout (sctp_globals.sack_timeout) |
@@ -1224,6 +1232,9 @@ struct sctp_endpoint { | |||
1224 | 1232 | ||
1225 | /* sendbuf acct. policy. */ | 1233 | /* sendbuf acct. policy. */ |
1226 | __u32 sndbuf_policy; | 1234 | __u32 sndbuf_policy; |
1235 | |||
1236 | /* rcvbuf acct. policy. */ | ||
1237 | __u32 rcvbuf_policy; | ||
1227 | }; | 1238 | }; |
1228 | 1239 | ||
1229 | /* Recover the outter endpoint structure. */ | 1240 | /* Recover the outter endpoint structure. */ |
@@ -1550,6 +1561,11 @@ struct sctp_association { | |||
1550 | */ | 1561 | */ |
1551 | int sndbuf_used; | 1562 | int sndbuf_used; |
1552 | 1563 | ||
1564 | /* This is the amount of memory that this association has allocated | ||
1565 | * in the receive path at any given time. | ||
1566 | */ | ||
1567 | atomic_t rmem_alloc; | ||
1568 | |||
1553 | /* This is the wait queue head for send requests waiting on | 1569 | /* This is the wait queue head for send requests waiting on |
1554 | * the association sndbuf space. | 1570 | * the association sndbuf space. |
1555 | */ | 1571 | */ |