Loading include/net/sctp/sctp.h +1 −1 Original line number Diff line number Diff line Loading @@ -547,7 +547,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\ #define WORD_ROUND(s) (((s)+3)&~3) /* Make a new instance of type. */ #define t_new(type, flags) (type *)kmalloc(sizeof(type), flags) #define t_new(type, flags) (type *)kzalloc(sizeof(type), flags) /* Compare two timevals. */ #define tv_lt(s, t) \ Loading include/net/sctp/sm.h +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ sctp_vtag_verify_either(const struct sctp_chunk *chunk, */ if ((!sctp_test_T_bit(chunk) && (ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag)) || (sctp_test_T_bit(chunk) && (sctp_test_T_bit(chunk) && asoc->c.peer_vtag && (ntohl(chunk->sctp_hdr->vtag) == asoc->c.peer_vtag))) { return 1; } Loading include/net/sctp/structs.h +34 −32 Original line number Diff line number Diff line Loading @@ -643,17 +643,15 @@ struct sctp_pf { struct sctp_datamsg { /* Chunks waiting to be submitted to lower layer. */ struct list_head chunks; /* Chunks that have been transmitted. */ size_t msg_size; /* Reference counting. */ atomic_t refcnt; /* When is this message no longer interesting to the peer? */ unsigned long expires_at; /* Did the messenge fail to send? */ int send_error; char send_failed; /* Control whether chunks from this message can be abandoned. */ char can_abandon; u8 send_failed:1, can_abandon:1, /* can chunks from this message can be abandoned. */ can_delay; /* should this message be Nagle delayed */ }; struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, Loading Loading @@ -757,7 +755,6 @@ struct sctp_chunk { #define SCTP_NEED_FRTX 0x1 #define SCTP_DONT_FRTX 0x2 __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ resent:1, /* Has this chunk ever been resent. */ has_tsn:1, /* Does this chunk have a TSN yet? */ has_ssn:1, /* Does this chunk have a SSN yet? */ singleton:1, /* Only chunk in the packet? */ Loading Loading @@ -879,7 +876,30 @@ struct sctp_transport { /* Reference counting. */ atomic_t refcnt; int dead; int dead:1, /* RTO-Pending : A flag used to track if one of the DATA * chunks sent to this address is currently being * used to compute a RTT. If this flag is 0, * the next DATA chunk sent to this destination * should be used to compute a RTT and this flag * should be set. Every time the RTT * calculation completes (i.e. the DATA chunk * is SACK'd) clear this flag. */ rto_pending:1, /* * hb_sent : a flag that signals that we have a pending * heartbeat. */ hb_sent:1, /* Is the Path MTU update pending on this tranport */ pmtu_pending:1, /* Is this structure kfree()able? */ malloced:1; /* This is the peer's IP address and port. */ union sctp_addr ipaddr; Loading Loading @@ -909,22 +929,6 @@ struct sctp_transport { /* SRTT : The current smoothed round trip time. */ __u32 srtt; /* RTO-Pending : A flag used to track if one of the DATA * chunks sent to this address is currently being * used to compute a RTT. If this flag is 0, * the next DATA chunk sent to this destination * should be used to compute a RTT and this flag * should be set. Every time the RTT * calculation completes (i.e. the DATA chunk * is SACK'd) clear this flag. * hb_sent : a flag that signals that we have a pending heartbeat. */ __u8 rto_pending; __u8 hb_sent; /* Flag to track the current fast recovery state */ __u8 fast_recovery; /* * These are the congestion stats. */ Loading @@ -944,9 +948,6 @@ struct sctp_transport { __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ /* TSN marking the fast recovery exit point */ __u32 fast_recovery_exit; /* Destination */ struct dst_entry *dst; /* Source address. */ Loading Loading @@ -977,9 +978,6 @@ struct sctp_transport { */ __u16 pathmaxrxt; /* is the Path MTU update pending on this tranport */ __u8 pmtu_pending; /* PMTU : The current known path MTU. */ __u32 pathmtu; Loading Loading @@ -1023,8 +1021,6 @@ struct sctp_transport { /* This is the list of transports that have chunks to send. */ struct list_head send_ready; int malloced; /* Is this structure kfree()able? */ /* State information saved for SFR_CACC algorithm. The key * idea in SFR_CACC is to maintain state at the sender on a * per-destination basis when a changeover happens. Loading Loading @@ -1066,7 +1062,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, struct sctp_sock *); void sctp_transport_pmtu(struct sctp_transport *); void sctp_transport_free(struct sctp_transport *); void sctp_transport_reset_timers(struct sctp_transport *, int); void sctp_transport_reset_timers(struct sctp_transport *); void sctp_transport_hold(struct sctp_transport *); void sctp_transport_put(struct sctp_transport *); void sctp_transport_update_rto(struct sctp_transport *, __u32); Loading Loading @@ -1720,6 +1716,12 @@ struct sctp_association { /* Highest TSN that is acknowledged by incoming SACKs. */ __u32 highest_sacked; /* TSN marking the fast recovery exit point */ __u32 fast_recovery_exit; /* Flag to track the current fast recovery state */ __u8 fast_recovery; /* The number of unacknowledged data chunks. Reported through * the SCTP_STATUS sockopt. */ Loading net/sctp/Kconfig +12 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,18 @@ menuconfig IP_SCTP if IP_SCTP config NET_SCTPPROBE tristate "SCTP: Association probing" depends on PROC_FS && KPROBES ---help--- This module allows for capturing the changes to SCTP association state in response to incoming packets. It is used for debugging SCTP congestion control algorithms. If you don't understand what was just said, you don't need it: say N. To compile this code as a module, choose M here: the module will be called sctp_probe. config SCTP_DBG_MSG bool "SCTP: Debug messages" help Loading net/sctp/Makefile +3 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ # obj-$(CONFIG_IP_SCTP) += sctp.o obj-$(CONFIG_NET_SCTPPROBE) += sctp_probe.o sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \ protocol.o endpointola.o associola.o \ Loading @@ -11,6 +12,8 @@ sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \ tsnmap.o bind_addr.o socket.o primitive.o \ output.o input.o debug.o ssnmap.o auth.o sctp_probe-y := probe.o sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o sctp-$(CONFIG_PROC_FS) += proc.o sctp-$(CONFIG_SYSCTL) += sysctl.o Loading Loading
include/net/sctp/sctp.h +1 −1 Original line number Diff line number Diff line Loading @@ -547,7 +547,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\ #define WORD_ROUND(s) (((s)+3)&~3) /* Make a new instance of type. */ #define t_new(type, flags) (type *)kmalloc(sizeof(type), flags) #define t_new(type, flags) (type *)kzalloc(sizeof(type), flags) /* Compare two timevals. */ #define tv_lt(s, t) \ Loading
include/net/sctp/sm.h +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ sctp_vtag_verify_either(const struct sctp_chunk *chunk, */ if ((!sctp_test_T_bit(chunk) && (ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag)) || (sctp_test_T_bit(chunk) && (sctp_test_T_bit(chunk) && asoc->c.peer_vtag && (ntohl(chunk->sctp_hdr->vtag) == asoc->c.peer_vtag))) { return 1; } Loading
include/net/sctp/structs.h +34 −32 Original line number Diff line number Diff line Loading @@ -643,17 +643,15 @@ struct sctp_pf { struct sctp_datamsg { /* Chunks waiting to be submitted to lower layer. */ struct list_head chunks; /* Chunks that have been transmitted. */ size_t msg_size; /* Reference counting. */ atomic_t refcnt; /* When is this message no longer interesting to the peer? */ unsigned long expires_at; /* Did the messenge fail to send? */ int send_error; char send_failed; /* Control whether chunks from this message can be abandoned. */ char can_abandon; u8 send_failed:1, can_abandon:1, /* can chunks from this message can be abandoned. */ can_delay; /* should this message be Nagle delayed */ }; struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, Loading Loading @@ -757,7 +755,6 @@ struct sctp_chunk { #define SCTP_NEED_FRTX 0x1 #define SCTP_DONT_FRTX 0x2 __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ resent:1, /* Has this chunk ever been resent. */ has_tsn:1, /* Does this chunk have a TSN yet? */ has_ssn:1, /* Does this chunk have a SSN yet? */ singleton:1, /* Only chunk in the packet? */ Loading Loading @@ -879,7 +876,30 @@ struct sctp_transport { /* Reference counting. */ atomic_t refcnt; int dead; int dead:1, /* RTO-Pending : A flag used to track if one of the DATA * chunks sent to this address is currently being * used to compute a RTT. If this flag is 0, * the next DATA chunk sent to this destination * should be used to compute a RTT and this flag * should be set. Every time the RTT * calculation completes (i.e. the DATA chunk * is SACK'd) clear this flag. */ rto_pending:1, /* * hb_sent : a flag that signals that we have a pending * heartbeat. */ hb_sent:1, /* Is the Path MTU update pending on this tranport */ pmtu_pending:1, /* Is this structure kfree()able? */ malloced:1; /* This is the peer's IP address and port. */ union sctp_addr ipaddr; Loading Loading @@ -909,22 +929,6 @@ struct sctp_transport { /* SRTT : The current smoothed round trip time. */ __u32 srtt; /* RTO-Pending : A flag used to track if one of the DATA * chunks sent to this address is currently being * used to compute a RTT. If this flag is 0, * the next DATA chunk sent to this destination * should be used to compute a RTT and this flag * should be set. Every time the RTT * calculation completes (i.e. the DATA chunk * is SACK'd) clear this flag. * hb_sent : a flag that signals that we have a pending heartbeat. */ __u8 rto_pending; __u8 hb_sent; /* Flag to track the current fast recovery state */ __u8 fast_recovery; /* * These are the congestion stats. */ Loading @@ -944,9 +948,6 @@ struct sctp_transport { __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ /* TSN marking the fast recovery exit point */ __u32 fast_recovery_exit; /* Destination */ struct dst_entry *dst; /* Source address. */ Loading Loading @@ -977,9 +978,6 @@ struct sctp_transport { */ __u16 pathmaxrxt; /* is the Path MTU update pending on this tranport */ __u8 pmtu_pending; /* PMTU : The current known path MTU. */ __u32 pathmtu; Loading Loading @@ -1023,8 +1021,6 @@ struct sctp_transport { /* This is the list of transports that have chunks to send. */ struct list_head send_ready; int malloced; /* Is this structure kfree()able? */ /* State information saved for SFR_CACC algorithm. The key * idea in SFR_CACC is to maintain state at the sender on a * per-destination basis when a changeover happens. Loading Loading @@ -1066,7 +1062,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, struct sctp_sock *); void sctp_transport_pmtu(struct sctp_transport *); void sctp_transport_free(struct sctp_transport *); void sctp_transport_reset_timers(struct sctp_transport *, int); void sctp_transport_reset_timers(struct sctp_transport *); void sctp_transport_hold(struct sctp_transport *); void sctp_transport_put(struct sctp_transport *); void sctp_transport_update_rto(struct sctp_transport *, __u32); Loading Loading @@ -1720,6 +1716,12 @@ struct sctp_association { /* Highest TSN that is acknowledged by incoming SACKs. */ __u32 highest_sacked; /* TSN marking the fast recovery exit point */ __u32 fast_recovery_exit; /* Flag to track the current fast recovery state */ __u8 fast_recovery; /* The number of unacknowledged data chunks. Reported through * the SCTP_STATUS sockopt. */ Loading
net/sctp/Kconfig +12 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,18 @@ menuconfig IP_SCTP if IP_SCTP config NET_SCTPPROBE tristate "SCTP: Association probing" depends on PROC_FS && KPROBES ---help--- This module allows for capturing the changes to SCTP association state in response to incoming packets. It is used for debugging SCTP congestion control algorithms. If you don't understand what was just said, you don't need it: say N. To compile this code as a module, choose M here: the module will be called sctp_probe. config SCTP_DBG_MSG bool "SCTP: Debug messages" help Loading
net/sctp/Makefile +3 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ # obj-$(CONFIG_IP_SCTP) += sctp.o obj-$(CONFIG_NET_SCTPPROBE) += sctp_probe.o sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \ protocol.o endpointola.o associola.o \ Loading @@ -11,6 +12,8 @@ sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \ tsnmap.o bind_addr.o socket.o primitive.o \ output.o input.o debug.o ssnmap.o auth.o sctp_probe-y := probe.o sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o sctp-$(CONFIG_PROC_FS) += proc.o sctp-$(CONFIG_SYSCTL) += sysctl.o Loading