diff options
author | Neil Horman <nhorman@redhat.com> | 2005-04-28 15:02:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-04-28 15:02:04 -0400 |
commit | 4eb701dfc618491c9b97377df6e61de36dfc39ce (patch) | |
tree | b49f31ebecda19d071d3ae3777be2a6a8c9e5c34 /include/net | |
parent | 594ccc14dfe4d61b476491758425a1c2ca4ec71b (diff) |
[SCTP] Fix SCTP sendbuffer accouting.
- Include chunk and skb sizes in sendbuffer accounting.
- 2 policies are supported. 0: per socket accouting, 1: per association
accounting
DaveM: I've made the default per-socket.
Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sctp/structs.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 7e64cf6bda1e..6c24d9cd3d66 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -154,6 +154,13 @@ extern struct sctp_globals { | |||
154 | int max_retrans_path; | 154 | int max_retrans_path; |
155 | int max_retrans_init; | 155 | int max_retrans_init; |
156 | 156 | ||
157 | /* | ||
158 | * Policy for preforming sctp/socket accounting | ||
159 | * 0 - do socket level accounting, all assocs share sk_sndbuf | ||
160 | * 1 - do sctp accounting, each asoc may use sk_sndbuf bytes | ||
161 | */ | ||
162 | int sndbuf_policy; | ||
163 | |||
157 | /* HB.interval - 30 seconds */ | 164 | /* HB.interval - 30 seconds */ |
158 | int hb_interval; | 165 | int hb_interval; |
159 | 166 | ||
@@ -207,6 +214,7 @@ extern struct sctp_globals { | |||
207 | #define sctp_valid_cookie_life (sctp_globals.valid_cookie_life) | 214 | #define sctp_valid_cookie_life (sctp_globals.valid_cookie_life) |
208 | #define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable) | 215 | #define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable) |
209 | #define sctp_max_retrans_association (sctp_globals.max_retrans_association) | 216 | #define sctp_max_retrans_association (sctp_globals.max_retrans_association) |
217 | #define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) | ||
210 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) | 218 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) |
211 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) | 219 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) |
212 | #define sctp_hb_interval (sctp_globals.hb_interval) | 220 | #define sctp_hb_interval (sctp_globals.hb_interval) |
@@ -1212,7 +1220,8 @@ struct sctp_endpoint { | |||
1212 | /* Default timeouts. */ | 1220 | /* Default timeouts. */ |
1213 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; | 1221 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; |
1214 | 1222 | ||
1215 | /* Various thresholds. */ | 1223 | /* sendbuf acct. policy. */ |
1224 | __u32 sndbuf_policy; | ||
1216 | 1225 | ||
1217 | /* Name for debugging output... */ | 1226 | /* Name for debugging output... */ |
1218 | char *debug_name; | 1227 | char *debug_name; |