diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
commit | 15c54033964a943de7b0763efd3bd0ede7326395 (patch) | |
tree | 840b292612d1b5396d5bab5bde537a9013db3ceb /include/rxrpc/message.h | |
parent | ad5da3cf39a5b11a198929be1f2644e17ecd767e (diff) | |
parent | 912a41a4ab935ce8c4308428ec13fc7f8b1f18f4 (diff) |
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: (448 commits)
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
[IPV4]: Add multipath cached to feature-removal-schedule.txt
[WIRELESS] cfg80211: Clarify locking comment.
[WIRELESS] cfg80211: Fix locking in wiphy_new.
[WEXT] net_device: Don't include wext bits if not required.
[WEXT]: Misc code cleanups.
[WEXT]: Reduce inline abuse.
[WEXT]: Move EXPORT_SYMBOL statements where they belong.
[WEXT]: Cleanup early ioctl call path.
[WEXT]: Remove options.
[WEXT]: Remove dead debug code.
[WEXT]: Clean up how wext is called.
[WEXT]: Move to net/wireless
[AFS]: Eliminate cmpxchg() usage in vlocation code.
[RXRPC]: Fix pointers passed to bitops.
[RXRPC]: Remove bogus atomic_* overrides.
[AFS]: Fix u64 printing in debug logging.
[AFS]: Add "directory write" support.
[AFS]: Implement the CB.InitCallBackState3 operation.
...
Diffstat (limited to 'include/rxrpc/message.h')
-rw-r--r-- | include/rxrpc/message.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/include/rxrpc/message.h b/include/rxrpc/message.h deleted file mode 100644 index b318f273d4f2..000000000000 --- a/include/rxrpc/message.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* message.h: Rx message caching | ||
2 | * | ||
3 | * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_RXRPC_MESSAGE_H | ||
13 | #define _LINUX_RXRPC_MESSAGE_H | ||
14 | |||
15 | #include <rxrpc/packet.h> | ||
16 | |||
17 | /*****************************************************************************/ | ||
18 | /* | ||
19 | * Rx message record | ||
20 | */ | ||
21 | struct rxrpc_message | ||
22 | { | ||
23 | atomic_t usage; | ||
24 | struct list_head link; /* list link */ | ||
25 | struct timeval stamp; /* time received or last sent */ | ||
26 | rxrpc_seq_t seq; /* message sequence number */ | ||
27 | |||
28 | int state; /* the state the message is currently in */ | ||
29 | #define RXRPC_MSG_PREPARED 0 | ||
30 | #define RXRPC_MSG_SENT 1 | ||
31 | #define RXRPC_MSG_ACKED 2 /* provisionally ACK'd */ | ||
32 | #define RXRPC_MSG_DONE 3 /* definitively ACK'd (msg->seq<ack.firstPacket) */ | ||
33 | #define RXRPC_MSG_RECEIVED 4 | ||
34 | #define RXRPC_MSG_ERROR -1 | ||
35 | char rttdone; /* used for RTT */ | ||
36 | |||
37 | struct rxrpc_transport *trans; /* transport received through */ | ||
38 | struct rxrpc_connection *conn; /* connection received over */ | ||
39 | struct sk_buff *pkt; /* received packet */ | ||
40 | off_t offset; /* offset into pkt of next byte of data */ | ||
41 | |||
42 | struct rxrpc_header hdr; /* message header */ | ||
43 | |||
44 | int dcount; /* data part count */ | ||
45 | size_t dsize; /* data size */ | ||
46 | #define RXRPC_MSG_MAX_IOCS 8 | ||
47 | struct kvec data[RXRPC_MSG_MAX_IOCS]; /* message data */ | ||
48 | unsigned long dfree; /* bit mask indicating kfree(data[x]) if T */ | ||
49 | }; | ||
50 | |||
51 | #define rxrpc_get_message(M) do { atomic_inc(&(M)->usage); } while(0) | ||
52 | |||
53 | extern void __rxrpc_put_message(struct rxrpc_message *msg); | ||
54 | static inline void rxrpc_put_message(struct rxrpc_message *msg) | ||
55 | { | ||
56 | BUG_ON(atomic_read(&msg->usage)<=0); | ||
57 | if (atomic_dec_and_test(&msg->usage)) | ||
58 | __rxrpc_put_message(msg); | ||
59 | } | ||
60 | |||
61 | extern int rxrpc_conn_newmsg(struct rxrpc_connection *conn, | ||
62 | struct rxrpc_call *call, | ||
63 | uint8_t type, | ||
64 | int count, | ||
65 | struct kvec *diov, | ||
66 | gfp_t alloc_flags, | ||
67 | struct rxrpc_message **_msg); | ||
68 | |||
69 | extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg); | ||
70 | |||
71 | #endif /* _LINUX_RXRPC_MESSAGE_H */ | ||