aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2010-04-30 22:41:09 -0400
committerVlad Yasevich <vladislav.yasevich@hp.com>2010-04-30 22:41:09 -0400
commitc0058a35aacc79406e867ec33c5cb75624fd5860 (patch)
treef474e3bc3aac2162897d592ed91c5116616111a6 /include/net/sctp
parentd9efc2231b28bc199f9de4dd594248b7341188e5 (diff)
sctp: Save some room in the sctp_transport by using bitfields
Saves some room in the sctp_transport structure. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/structs.h49
1 files changed, 27 insertions, 22 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 03deffb1886b..9072dd67d8ad 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -877,7 +877,33 @@ struct sctp_transport {
877 877
878 /* Reference counting. */ 878 /* Reference counting. */
879 atomic_t refcnt; 879 atomic_t refcnt;
880 int dead; 880 int dead:1,
881 /* RTO-Pending : A flag used to track if one of the DATA
882 * chunks sent to this address is currently being
883 * used to compute a RTT. If this flag is 0,
884 * the next DATA chunk sent to this destination
885 * should be used to compute a RTT and this flag
886 * should be set. Every time the RTT
887 * calculation completes (i.e. the DATA chunk
888 * is SACK'd) clear this flag.
889 */
890 rto_pending:1,
891
892 /*
893 * hb_sent : a flag that signals that we have a pending
894 * heartbeat.
895 */
896 hb_sent:1,
897
898 /* Flag to track the current fast recovery state */
899 fast_recovery:1,
900
901 /* Is the Path MTU update pending on this tranport */
902 pmtu_pending:1,
903
904 /* Is this structure kfree()able? */
905 malloced:1;
906
881 907
882 /* This is the peer's IP address and port. */ 908 /* This is the peer's IP address and port. */
883 union sctp_addr ipaddr; 909 union sctp_addr ipaddr;
@@ -907,22 +933,6 @@ struct sctp_transport {
907 /* SRTT : The current smoothed round trip time. */ 933 /* SRTT : The current smoothed round trip time. */
908 __u32 srtt; 934 __u32 srtt;
909 935
910 /* RTO-Pending : A flag used to track if one of the DATA
911 * chunks sent to this address is currently being
912 * used to compute a RTT. If this flag is 0,
913 * the next DATA chunk sent to this destination
914 * should be used to compute a RTT and this flag
915 * should be set. Every time the RTT
916 * calculation completes (i.e. the DATA chunk
917 * is SACK'd) clear this flag.
918 * hb_sent : a flag that signals that we have a pending heartbeat.
919 */
920 __u8 rto_pending;
921 __u8 hb_sent;
922
923 /* Flag to track the current fast recovery state */
924 __u8 fast_recovery;
925
926 /* 936 /*
927 * These are the congestion stats. 937 * These are the congestion stats.
928 */ 938 */
@@ -975,9 +985,6 @@ struct sctp_transport {
975 */ 985 */
976 __u16 pathmaxrxt; 986 __u16 pathmaxrxt;
977 987
978 /* is the Path MTU update pending on this tranport */
979 __u8 pmtu_pending;
980
981 /* PMTU : The current known path MTU. */ 988 /* PMTU : The current known path MTU. */
982 __u32 pathmtu; 989 __u32 pathmtu;
983 990
@@ -1021,8 +1028,6 @@ struct sctp_transport {
1021 /* This is the list of transports that have chunks to send. */ 1028 /* This is the list of transports that have chunks to send. */
1022 struct list_head send_ready; 1029 struct list_head send_ready;
1023 1030
1024 int malloced; /* Is this structure kfree()able? */
1025
1026 /* State information saved for SFR_CACC algorithm. The key 1031 /* State information saved for SFR_CACC algorithm. The key
1027 * idea in SFR_CACC is to maintain state at the sender on a 1032 * idea in SFR_CACC is to maintain state at the sender on a
1028 * per-destination basis when a changeover happens. 1033 * per-destination basis when a changeover happens.