aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeil Horman <nhorman@redhat.com>2005-04-28 12:02:04 -0700
committerDavid S. Miller <davem@davemloft.net>2005-04-28 12:02:04 -0700
commit4eb701dfc618491c9b97377df6e61de36dfc39ce (patch)
treeb49f31ebecda19d071d3ae3777be2a6a8c9e5c34 /include
parent[SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit(). (diff)
downloadlinux-dev-4eb701dfc618491c9b97377df6e61de36dfc39ce.tar.xz
linux-dev-4eb701dfc618491c9b97377df6e61de36dfc39ce.zip
[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')
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/net/sctp/structs.h11
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 358d52b0c445..772998147e3e 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -643,6 +643,7 @@ enum {
NET_SCTP_MAX_BURST = 12,
NET_SCTP_ADDIP_ENABLE = 13,
NET_SCTP_PRSCTP_ENABLE = 14,
+ NET_SCTP_SNDBUF_POLICY = 15,
};
/* /proc/sys/net/bridge */
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 {
int max_retrans_path;
int max_retrans_init;
+ /*
+ * Policy for preforming sctp/socket accounting
+ * 0 - do socket level accounting, all assocs share sk_sndbuf
+ * 1 - do sctp accounting, each asoc may use sk_sndbuf bytes
+ */
+ int sndbuf_policy;
+
/* HB.interval - 30 seconds */
int hb_interval;
@@ -207,6 +214,7 @@ extern struct sctp_globals {
#define sctp_valid_cookie_life (sctp_globals.valid_cookie_life)
#define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable)
#define sctp_max_retrans_association (sctp_globals.max_retrans_association)
+#define sctp_sndbuf_policy (sctp_globals.sndbuf_policy)
#define sctp_max_retrans_path (sctp_globals.max_retrans_path)
#define sctp_max_retrans_init (sctp_globals.max_retrans_init)
#define sctp_hb_interval (sctp_globals.hb_interval)
@@ -1212,7 +1220,8 @@ struct sctp_endpoint {
/* Default timeouts. */
int timeouts[SCTP_NUM_TIMEOUT_TYPES];
- /* Various thresholds. */
+ /* sendbuf acct. policy. */
+ __u32 sndbuf_policy;
/* Name for debugging output... */
char *debug_name;