aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-03 19:20:44 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-03 19:24:31 -0400
commitf5460618405eec8c3300947a499011528a115acd (patch)
tree19aba5acb6d91d5a20400292aaf1881a6b26c118 /include/net/sctp
parent4f70ecca9c57731b4acbe5043eb22e4416bd2368 (diff)
parent0e3aef8d09a8c11e3fb83cdcb24b5bc7421b3726 (diff)
Merge branch 'net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev
Add missing linux/vmalloc.h include to net/sctp/probe.c Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/sctp.h2
-rw-r--r--include/net/sctp/sm.h2
-rw-r--r--include/net/sctp/structs.h66
3 files changed, 36 insertions, 34 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index e9a408718636..65946bc43d00 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -547,7 +547,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\
547#define WORD_ROUND(s) (((s)+3)&~3) 547#define WORD_ROUND(s) (((s)+3)&~3)
548 548
549/* Make a new instance of type. */ 549/* Make a new instance of type. */
550#define t_new(type, flags) (type *)kmalloc(sizeof(type), flags) 550#define t_new(type, flags) (type *)kzalloc(sizeof(type), flags)
551 551
552/* Compare two timevals. */ 552/* Compare two timevals. */
553#define tv_lt(s, t) \ 553#define tv_lt(s, t) \
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 851c813adb3a..273a8bb683e3 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -437,7 +437,7 @@ sctp_vtag_verify_either(const struct sctp_chunk *chunk,
437 */ 437 */
438 if ((!sctp_test_T_bit(chunk) && 438 if ((!sctp_test_T_bit(chunk) &&
439 (ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag)) || 439 (ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag)) ||
440 (sctp_test_T_bit(chunk) && 440 (sctp_test_T_bit(chunk) && asoc->c.peer_vtag &&
441 (ntohl(chunk->sctp_hdr->vtag) == asoc->c.peer_vtag))) { 441 (ntohl(chunk->sctp_hdr->vtag) == asoc->c.peer_vtag))) {
442 return 1; 442 return 1;
443 } 443 }
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 597f8e27aaf6..43257b903c82 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -643,17 +643,15 @@ struct sctp_pf {
643struct sctp_datamsg { 643struct 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
659struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, 657struct 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? */
@@ -879,7 +876,30 @@ struct sctp_transport {
879 876
880 /* Reference counting. */ 877 /* Reference counting. */
881 atomic_t refcnt; 878 atomic_t refcnt;
882 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
883 903
884 /* This is the peer's IP address and port. */ 904 /* This is the peer's IP address and port. */
885 union sctp_addr ipaddr; 905 union sctp_addr ipaddr;
@@ -909,22 +929,6 @@ struct sctp_transport {
909 /* SRTT : The current smoothed round trip time. */ 929 /* SRTT : The current smoothed round trip time. */
910 __u32 srtt; 930 __u32 srtt;
911 931
912 /* RTO-Pending : A flag used to track if one of the DATA
913 * chunks sent to this address is currently being
914 * used to compute a RTT. If this flag is 0,
915 * the next DATA chunk sent to this destination
916 * should be used to compute a RTT and this flag
917 * should be set. Every time the RTT
918 * calculation completes (i.e. the DATA chunk
919 * is SACK'd) clear this flag.
920 * hb_sent : a flag that signals that we have a pending heartbeat.
921 */
922 __u8 rto_pending;
923 __u8 hb_sent;
924
925 /* Flag to track the current fast recovery state */
926 __u8 fast_recovery;
927
928 /* 932 /*
929 * These are the congestion stats. 933 * These are the congestion stats.
930 */ 934 */
@@ -944,9 +948,6 @@ struct sctp_transport {
944 948
945 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ 949 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */
946 950
947 /* TSN marking the fast recovery exit point */
948 __u32 fast_recovery_exit;
949
950 /* Destination */ 951 /* Destination */
951 struct dst_entry *dst; 952 struct dst_entry *dst;
952 /* Source address. */ 953 /* Source address. */
@@ -977,9 +978,6 @@ struct sctp_transport {
977 */ 978 */
978 __u16 pathmaxrxt; 979 __u16 pathmaxrxt;
979 980
980 /* is the Path MTU update pending on this tranport */
981 __u8 pmtu_pending;
982
983 /* PMTU : The current known path MTU. */ 981 /* PMTU : The current known path MTU. */
984 __u32 pathmtu; 982 __u32 pathmtu;
985 983
@@ -1023,8 +1021,6 @@ struct sctp_transport {
1023 /* This is the list of transports that have chunks to send. */ 1021 /* This is the list of transports that have chunks to send. */
1024 struct list_head send_ready; 1022 struct list_head send_ready;
1025 1023
1026 int malloced; /* Is this structure kfree()able? */
1027
1028 /* State information saved for SFR_CACC algorithm. The key 1024 /* State information saved for SFR_CACC algorithm. The key
1029 * 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
1030 * per-destination basis when a changeover happens. 1026 * per-destination basis when a changeover happens.
@@ -1066,7 +1062,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
1066 struct sctp_sock *); 1062 struct sctp_sock *);
1067void sctp_transport_pmtu(struct sctp_transport *); 1063void sctp_transport_pmtu(struct sctp_transport *);
1068void sctp_transport_free(struct sctp_transport *); 1064void sctp_transport_free(struct sctp_transport *);
1069void sctp_transport_reset_timers(struct sctp_transport *, int); 1065void sctp_transport_reset_timers(struct sctp_transport *);
1070void sctp_transport_hold(struct sctp_transport *); 1066void sctp_transport_hold(struct sctp_transport *);
1071void sctp_transport_put(struct sctp_transport *); 1067void sctp_transport_put(struct sctp_transport *);
1072void sctp_transport_update_rto(struct sctp_transport *, __u32); 1068void sctp_transport_update_rto(struct sctp_transport *, __u32);
@@ -1720,6 +1716,12 @@ struct sctp_association {
1720 /* Highest TSN that is acknowledged by incoming SACKs. */ 1716 /* Highest TSN that is acknowledged by incoming SACKs. */
1721 __u32 highest_sacked; 1717 __u32 highest_sacked;
1722 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
1723 /* The number of unacknowledged data chunks. Reported through 1725 /* The number of unacknowledged data chunks. Reported through
1724 * the SCTP_STATUS sockopt. 1726 * the SCTP_STATUS sockopt.
1725 */ 1727 */