summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-07-21 23:44:45 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-21 23:44:45 (GMT)
commit12157a8d78af50842774bedb80b7b84a87f60951 (patch)
tree7e1c3ec5eb07b212cc6f6b4663ae6dff1ae78eb9 /include
parentefab4cbe99f9b73d208ad9e5ec9388524005e095 (diff)
parent9df3f3d28bca0157e2bab2f3171d2ad4f0930634 (diff)
downloadlinux-fsl-qoriq-12157a8d78af50842774bedb80b7b84a87f60951.tar.xz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits) [TIPC]: Removing useless casts [IPV4]: Fix nexthop realm dumping for multipath routes [DUMMY]: Avoid an oops when dummy_init_one() failed [IFB] After ifb_init_one() failed, i is increased. Decrease [NET]: Fix reversed error test in netif_tx_trylock [MAINTAINERS]: Mark LAPB as Oprhan. [NET]: Conversions from kmalloc+memset to k(z|c)alloc. [NET]: sun happymeal, little pci cleanup [IrDA]: Use alloc_skb() in IrDA TX path [I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine [I/OAT]: net/core/user_dma.c should #include <net/netdma.h> [SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed [SCTP]: Set chunk->data_accepted only if we are going to accept it. [SCTP]: Verify all the paths to a peer via heartbeat before using them. [SCTP]: Unhash the endpoint in sctp_endpoint_free(). [SCTP]: Check for NULL arg to sctp_bucket_destroy(). [PKT_SCHED] netem: Fix slab corruption with netem (2nd try) [WAN]: Converted synclink drivers to use netif_carrier_*() [WAN]: Cosmetic changes to N2 and C101 drivers [WAN]: Added missing netif_dormant_off() to generic HDLC ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h6
-rw-r--r--include/net/netdma.h2
-rw-r--r--include/net/sctp/structs.h11
-rw-r--r--include/net/sctp/user.h9
4 files changed, 19 insertions, 9 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 76cc099..75f02d8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -924,10 +924,10 @@ static inline void netif_tx_lock_bh(struct net_device *dev)
static inline int netif_tx_trylock(struct net_device *dev)
{
- int err = spin_trylock(&dev->_xmit_lock);
- if (!err)
+ int ok = spin_trylock(&dev->_xmit_lock);
+ if (likely(ok))
dev->xmit_lock_owner = smp_processor_id();
- return err;
+ return ok;
}
static inline void netif_tx_unlock(struct net_device *dev)
diff --git a/include/net/netdma.h b/include/net/netdma.h
index 19760eb..ceae5ee 100644
--- a/include/net/netdma.h
+++ b/include/net/netdma.h
@@ -37,7 +37,7 @@ static inline struct dma_chan *get_softnet_dma(void)
}
int dma_skb_copy_datagram_iovec(struct dma_chan* chan,
- const struct sk_buff *skb, int offset, struct iovec *to,
+ struct sk_buff *skb, int offset, struct iovec *to,
size_t len, struct dma_pinned_list *pinned_list);
#endif /* CONFIG_NET_DMA */
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 5f69158..e5aa7ff 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -445,6 +445,7 @@ typedef struct sctp_sender_hb_info {
struct sctp_paramhdr param_hdr;
union sctp_addr daddr;
unsigned long sent_at;
+ __u64 hb_nonce;
} __attribute__((packed)) sctp_sender_hb_info_t;
/*
@@ -730,13 +731,10 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
/* This is a structure for holding either an IPv6 or an IPv4 address. */
-/* sin_family -- AF_INET or AF_INET6
- * sin_port -- ordinary port number
- * sin_addr -- cast to either (struct in_addr) or (struct in6_addr)
- */
struct sctp_sockaddr_entry {
struct list_head list;
union sctp_addr a;
+ __u8 use_as_src;
};
typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *);
@@ -984,6 +982,9 @@ struct sctp_transport {
*/
char cacc_saw_newack;
} cacc;
+
+ /* 64-bit random number sent with heartbeat. */
+ __u64 hb_nonce;
};
struct sctp_transport *sctp_transport_new(const union sctp_addr *,
@@ -1138,7 +1139,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
sctp_scope_t scope, gfp_t gfp,
int flags);
int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
- gfp_t gfp);
+ __u8 use_as_src, gfp_t gfp);
int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
struct sctp_sock *);
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 8a6bef6..1b7aae6 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -560,9 +560,18 @@ struct sctp_paddrinfo {
} __attribute__((packed, aligned(4)));
/* Peer addresses's state. */
+/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x]
+ * calls.
+ * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters.
+ * Not yet confirmed by a heartbeat and not available for data
+ * transfers.
+ * ACTIVE : Peer address confirmed, active and available for data transfers.
+ * INACTIVE: Peer address inactive and not available for data transfers.
+ */
enum sctp_spinfo_state {
SCTP_INACTIVE,
SCTP_ACTIVE,
+ SCTP_UNCONFIRMED,
SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */
};