diff options
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r-- | include/net/sctp/structs.h | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ff3017744711..43257b903c82 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -643,17 +643,15 @@ struct sctp_pf { | |||
643 | struct sctp_datamsg { | 643 | struct sctp_datamsg { |
644 | /* Chunks waiting to be submitted to lower layer. */ | 644 | /* Chunks waiting to be submitted to lower layer. */ |
645 | struct list_head chunks; | 645 | struct list_head chunks; |
646 | /* Chunks that have been transmitted. */ | ||
647 | size_t msg_size; | ||
648 | /* Reference counting. */ | 646 | /* Reference counting. */ |
649 | atomic_t refcnt; | 647 | atomic_t refcnt; |
650 | /* When is this message no longer interesting to the peer? */ | 648 | /* When is this message no longer interesting to the peer? */ |
651 | unsigned long expires_at; | 649 | unsigned long expires_at; |
652 | /* Did the messenge fail to send? */ | 650 | /* Did the messenge fail to send? */ |
653 | int send_error; | 651 | int send_error; |
654 | char send_failed; | 652 | u8 send_failed:1, |
655 | /* Control whether chunks from this message can be abandoned. */ | 653 | can_abandon:1, /* can chunks from this message can be abandoned. */ |
656 | char can_abandon; | 654 | can_delay; /* should this message be Nagle delayed */ |
657 | }; | 655 | }; |
658 | 656 | ||
659 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, | 657 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, |
@@ -757,7 +755,6 @@ struct sctp_chunk { | |||
757 | #define SCTP_NEED_FRTX 0x1 | 755 | #define SCTP_NEED_FRTX 0x1 |
758 | #define SCTP_DONT_FRTX 0x2 | 756 | #define SCTP_DONT_FRTX 0x2 |
759 | __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ | 757 | __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ |
760 | resent:1, /* Has this chunk ever been resent. */ | ||
761 | has_tsn:1, /* Does this chunk have a TSN yet? */ | 758 | has_tsn:1, /* Does this chunk have a TSN yet? */ |
762 | has_ssn:1, /* Does this chunk have a SSN yet? */ | 759 | has_ssn:1, /* Does this chunk have a SSN yet? */ |
763 | singleton:1, /* Only chunk in the packet? */ | 760 | singleton:1, /* Only chunk in the packet? */ |
@@ -778,6 +775,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, | |||
778 | struct iovec *data); | 775 | struct iovec *data); |
779 | void sctp_chunk_free(struct sctp_chunk *); | 776 | void sctp_chunk_free(struct sctp_chunk *); |
780 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); | 777 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); |
778 | void *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data); | ||
781 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, | 779 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, |
782 | const struct sctp_association *, | 780 | const struct sctp_association *, |
783 | struct sock *); | 781 | struct sock *); |
@@ -878,7 +876,30 @@ struct sctp_transport { | |||
878 | 876 | ||
879 | /* Reference counting. */ | 877 | /* Reference counting. */ |
880 | atomic_t refcnt; | 878 | atomic_t refcnt; |
881 | int dead; | 879 | int dead:1, |
880 | /* RTO-Pending : A flag used to track if one of the DATA | ||
881 | * chunks sent to this address is currently being | ||
882 | * used to compute a RTT. If this flag is 0, | ||
883 | * the next DATA chunk sent to this destination | ||
884 | * should be used to compute a RTT and this flag | ||
885 | * should be set. Every time the RTT | ||
886 | * calculation completes (i.e. the DATA chunk | ||
887 | * is SACK'd) clear this flag. | ||
888 | */ | ||
889 | rto_pending:1, | ||
890 | |||
891 | /* | ||
892 | * hb_sent : a flag that signals that we have a pending | ||
893 | * heartbeat. | ||
894 | */ | ||
895 | hb_sent:1, | ||
896 | |||
897 | /* Is the Path MTU update pending on this tranport */ | ||
898 | pmtu_pending:1, | ||
899 | |||
900 | /* Is this structure kfree()able? */ | ||
901 | malloced:1; | ||
902 | |||
882 | 903 | ||
883 | /* This is the peer's IP address and port. */ | 904 | /* This is the peer's IP address and port. */ |
884 | union sctp_addr ipaddr; | 905 | union sctp_addr ipaddr; |
@@ -908,22 +929,6 @@ struct sctp_transport { | |||
908 | /* SRTT : The current smoothed round trip time. */ | 929 | /* SRTT : The current smoothed round trip time. */ |
909 | __u32 srtt; | 930 | __u32 srtt; |
910 | 931 | ||
911 | /* RTO-Pending : A flag used to track if one of the DATA | ||
912 | * chunks sent to this address is currently being | ||
913 | * used to compute a RTT. If this flag is 0, | ||
914 | * the next DATA chunk sent to this destination | ||
915 | * should be used to compute a RTT and this flag | ||
916 | * should be set. Every time the RTT | ||
917 | * calculation completes (i.e. the DATA chunk | ||
918 | * is SACK'd) clear this flag. | ||
919 | * hb_sent : a flag that signals that we have a pending heartbeat. | ||
920 | */ | ||
921 | __u8 rto_pending; | ||
922 | __u8 hb_sent; | ||
923 | |||
924 | /* Flag to track the current fast recovery state */ | ||
925 | __u8 fast_recovery; | ||
926 | |||
927 | /* | 932 | /* |
928 | * These are the congestion stats. | 933 | * These are the congestion stats. |
929 | */ | 934 | */ |
@@ -943,9 +948,6 @@ struct sctp_transport { | |||
943 | 948 | ||
944 | __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ | 949 | __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ |
945 | 950 | ||
946 | /* TSN marking the fast recovery exit point */ | ||
947 | __u32 fast_recovery_exit; | ||
948 | |||
949 | /* Destination */ | 951 | /* Destination */ |
950 | struct dst_entry *dst; | 952 | struct dst_entry *dst; |
951 | /* Source address. */ | 953 | /* Source address. */ |
@@ -976,9 +978,6 @@ struct sctp_transport { | |||
976 | */ | 978 | */ |
977 | __u16 pathmaxrxt; | 979 | __u16 pathmaxrxt; |
978 | 980 | ||
979 | /* is the Path MTU update pending on this tranport */ | ||
980 | __u8 pmtu_pending; | ||
981 | |||
982 | /* PMTU : The current known path MTU. */ | 981 | /* PMTU : The current known path MTU. */ |
983 | __u32 pathmtu; | 982 | __u32 pathmtu; |
984 | 983 | ||
@@ -1022,8 +1021,6 @@ struct sctp_transport { | |||
1022 | /* This is the list of transports that have chunks to send. */ | 1021 | /* This is the list of transports that have chunks to send. */ |
1023 | struct list_head send_ready; | 1022 | struct list_head send_ready; |
1024 | 1023 | ||
1025 | int malloced; /* Is this structure kfree()able? */ | ||
1026 | |||
1027 | /* State information saved for SFR_CACC algorithm. The key | 1024 | /* State information saved for SFR_CACC algorithm. The key |
1028 | * idea in SFR_CACC is to maintain state at the sender on a | 1025 | * idea in SFR_CACC is to maintain state at the sender on a |
1029 | * per-destination basis when a changeover happens. | 1026 | * per-destination basis when a changeover happens. |
@@ -1065,7 +1062,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
1065 | struct sctp_sock *); | 1062 | struct sctp_sock *); |
1066 | void sctp_transport_pmtu(struct sctp_transport *); | 1063 | void sctp_transport_pmtu(struct sctp_transport *); |
1067 | void sctp_transport_free(struct sctp_transport *); | 1064 | void sctp_transport_free(struct sctp_transport *); |
1068 | void sctp_transport_reset_timers(struct sctp_transport *, int); | 1065 | void sctp_transport_reset_timers(struct sctp_transport *); |
1069 | void sctp_transport_hold(struct sctp_transport *); | 1066 | void sctp_transport_hold(struct sctp_transport *); |
1070 | void sctp_transport_put(struct sctp_transport *); | 1067 | void sctp_transport_put(struct sctp_transport *); |
1071 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1068 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
@@ -1719,6 +1716,12 @@ struct sctp_association { | |||
1719 | /* Highest TSN that is acknowledged by incoming SACKs. */ | 1716 | /* Highest TSN that is acknowledged by incoming SACKs. */ |
1720 | __u32 highest_sacked; | 1717 | __u32 highest_sacked; |
1721 | 1718 | ||
1719 | /* TSN marking the fast recovery exit point */ | ||
1720 | __u32 fast_recovery_exit; | ||
1721 | |||
1722 | /* Flag to track the current fast recovery state */ | ||
1723 | __u8 fast_recovery; | ||
1724 | |||
1722 | /* The number of unacknowledged data chunks. Reported through | 1725 | /* The number of unacknowledged data chunks. Reported through |
1723 | * the SCTP_STATUS sockopt. | 1726 | * the SCTP_STATUS sockopt. |
1724 | */ | 1727 | */ |