summaryrefslogtreecommitdiff
path: root/include/net/sctp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 15:54:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 15:54:36 -0700
commit13220a94d35708d5378114e96ffcc88d0a74fe99 (patch)
treebe6530677d5f9536c7211e05ba012923e4c0b307 /include/net/sctp
parent8690d8a9f6c2d5728a9c9f68231f1bb4de109e3a (diff)
parent08abe18af1f78ee80c3c3a5ac47c3e0ae0beadf6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1750 commits) ixgbe: Allow Priority Flow Control settings to survive a device reset net: core: remove unneeded include in net/core/utils.c. e1000e: update version number e1000e: fix close interrupt race e1000e: fix loss of multicast packets e1000e: commonize tx cleanup routine to match e1000 & igb netfilter: fix nf_logger name in ebt_ulog. netfilter: fix warning in ebt_ulog init function. netfilter: fix warning about invalid const usage e1000: fix close race with interrupt e1000: cleanup clean_tx_irq routine so that it completely cleans ring e1000: fix tx hang detect logic and address dma mapping issues bridge: bad error handling when adding invalid ether address bonding: select current active slave when enslaving device for mode tlb and alb gianfar: reallocate skb when headroom is not enough for fcb Bump release date to 25Mar2009 and version to 0.22 r6040: Fix second PHY address qeth: fix wait_event_timeout handling qeth: check for completion of a running recovery qeth: unregister MAC addresses during recovery. ... Manually fixed up conflicts in: drivers/infiniband/hw/cxgb3/cxio_hal.h drivers/infiniband/hw/nes/nes_nic.c
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/checksum.h14
-rw-r--r--include/net/sctp/command.h3
-rw-r--r--include/net/sctp/sctp.h9
-rw-r--r--include/net/sctp/structs.h7
4 files changed, 18 insertions, 15 deletions
diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h
index 2fec3c366e81..befc8d2a1b9f 100644
--- a/include/net/sctp/checksum.h
+++ b/include/net/sctp/checksum.h
@@ -46,14 +46,14 @@
#include <net/sctp/sctp.h>
#include <linux/crc32c.h>
-static inline __be32 sctp_crc32c(__be32 crc, u8 *buffer, u16 length)
+static inline __u32 sctp_crc32c(__u32 crc, u8 *buffer, u16 length)
{
- return (__force __be32)crc32c((__force u32)crc, buffer, length);
+ return crc32c(crc, buffer, length);
}
-static inline __be32 sctp_start_cksum(__u8 *buffer, __u16 length)
+static inline __u32 sctp_start_cksum(__u8 *buffer, __u16 length)
{
- __be32 crc = ~cpu_to_be32(0);
+ __u32 crc = ~(__u32)0;
__u8 zero[sizeof(__u32)] = {0};
/* Optimize this routine to be SCTP specific, knowing how
@@ -72,12 +72,12 @@ static inline __be32 sctp_start_cksum(__u8 *buffer, __u16 length)
return crc;
}
-static inline __be32 sctp_update_cksum(__u8 *buffer, __u16 length, __be32 crc32)
+static inline __u32 sctp_update_cksum(__u8 *buffer, __u16 length, __u32 crc32)
{
return sctp_crc32c(crc32, buffer, length);
}
-static inline __be32 sctp_end_cksum(__be32 crc32)
+static inline __le32 sctp_end_cksum(__be32 crc32)
{
- return (__force __be32)~cpu_to_le32((__force u32)crc32);
+ return cpu_to_le32(~crc32);
}
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index 88988ab03d75..3b966802e05d 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -77,7 +77,8 @@ typedef enum {
SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */
SCTP_CMD_HB_TIMER_UPDATE, /* Update a heartbeat timers. */
SCTP_CMD_HB_TIMERS_STOP, /* Stop the heartbeat timers. */
- SCTP_CMD_TRANSPORT_RESET, /* Reset the status of a transport. */
+ SCTP_CMD_TRANSPORT_HB_SENT, /* Reset the status of a transport. */
+ SCTP_CMD_TRANSPORT_IDLE, /* Do manipulations on idle transport */
SCTP_CMD_TRANSPORT_ON, /* Mark the transport as active. */
SCTP_CMD_REPORT_ERROR, /* Pass this error back out of the sm. */
SCTP_CMD_REPORT_BAD_TAG, /* Verification tags didn't match. */
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index bbb7742195b0..9f80a7668289 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -62,13 +62,6 @@
* and will continue to evolve.
*/
-
-
-#ifdef TEST_FRAME
-#undef CONFIG_SCTP_DBG_OBJCNT
-#undef CONFIG_SYSCTL
-#endif /* TEST_FRAME */
-
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/in.h>
@@ -138,6 +131,8 @@ void sctp_write_space(struct sock *sk);
unsigned int sctp_poll(struct file *file, struct socket *sock,
poll_table *wait);
void sctp_sock_rfree(struct sk_buff *skb);
+void sctp_copy_sock(struct sock *newsk, struct sock *sk,
+ struct sctp_association *asoc);
extern struct percpu_counter sctp_sockets_allocated;
/*
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 9661d7b765f0..23f08fe1d50a 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -218,6 +218,10 @@ extern struct sctp_globals {
/* Flag to idicate if SCTP-AUTH is enabled */
int auth_enable;
+
+ /* Flag to indicate whether computing and verifying checksum
+ * is disabled. */
+ int checksum_disable;
} sctp_globals;
#define sctp_rto_initial (sctp_globals.rto_initial)
@@ -252,6 +256,7 @@ extern struct sctp_globals {
#define sctp_addip_noauth (sctp_globals.addip_noauth_enable)
#define sctp_prsctp_enable (sctp_globals.prsctp_enable)
#define sctp_auth_enable (sctp_globals.auth_enable)
+#define sctp_checksum_disable (sctp_globals.checksum_disable)
/* SCTP Socket type: UDP or TCP style. */
typedef enum {
@@ -905,8 +910,10 @@ struct sctp_transport {
* 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;