aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/rxrpc/ar-internal.h')
-rw-r--r--net/rxrpc/ar-internal.h220
1 files changed, 126 insertions, 94 deletions
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 2934a73a5981..cd6cdbe87125 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -16,7 +16,7 @@
16 BUG_ON(atomic_read((X)) >> (sizeof(atomic_t) - 2) == \ 16 BUG_ON(atomic_read((X)) >> (sizeof(atomic_t) - 2) == \
17 (POISON_FREE << 8 | POISON_FREE)) 17 (POISON_FREE << 8 | POISON_FREE))
18#else 18#else
19#define CHECK_SLAB_OKAY(X) do {} while(0) 19#define CHECK_SLAB_OKAY(X) do {} while (0)
20#endif 20#endif
21 21
22#define FCRYPT_BSIZE 8 22#define FCRYPT_BSIZE 8
@@ -70,12 +70,31 @@ struct rxrpc_sock {
70#define RXRPC_SECURITY_MAX RXRPC_SECURITY_ENCRYPT 70#define RXRPC_SECURITY_MAX RXRPC_SECURITY_ENCRYPT
71 struct sockaddr_rxrpc srx; /* local address */ 71 struct sockaddr_rxrpc srx; /* local address */
72 sa_family_t proto; /* protocol created with */ 72 sa_family_t proto; /* protocol created with */
73 __be16 service_id; /* service ID of local/remote service */
74}; 73};
75 74
76#define rxrpc_sk(__sk) container_of((__sk), struct rxrpc_sock, sk) 75#define rxrpc_sk(__sk) container_of((__sk), struct rxrpc_sock, sk)
77 76
78/* 77/*
78 * CPU-byteorder normalised Rx packet header.
79 */
80struct rxrpc_host_header {
81 u32 epoch; /* client boot timestamp */
82 u32 cid; /* connection and channel ID */
83 u32 callNumber; /* call ID (0 for connection-level packets) */
84 u32 seq; /* sequence number of pkt in call stream */
85 u32 serial; /* serial number of pkt sent to network */
86 u8 type; /* packet type */
87 u8 flags; /* packet flags */
88 u8 userStatus; /* app-layer defined status */
89 u8 securityIndex; /* security protocol ID */
90 union {
91 u16 _rsvd; /* reserved */
92 u16 cksum; /* kerberos security checksum */
93 };
94 u16 serviceId; /* service ID */
95} __packed;
96
97/*
79 * RxRPC socket buffer private variables 98 * RxRPC socket buffer private variables
80 * - max 48 bytes (struct sk_buff::cb) 99 * - max 48 bytes (struct sk_buff::cb)
81 */ 100 */
@@ -89,7 +108,7 @@ struct rxrpc_skb_priv {
89 bool need_resend; /* T if needs resending */ 108 bool need_resend; /* T if needs resending */
90 }; 109 };
91 110
92 struct rxrpc_header hdr; /* RxRPC packet header from this packet */ 111 struct rxrpc_host_header hdr; /* RxRPC packet header from this packet */
93}; 112};
94 113
95#define rxrpc_skb(__skb) ((struct rxrpc_skb_priv *) &(__skb)->cb) 114#define rxrpc_skb(__skb) ((struct rxrpc_skb_priv *) &(__skb)->cb)
@@ -230,7 +249,7 @@ struct rxrpc_conn_bundle {
230 atomic_t usage; 249 atomic_t usage;
231 int debug_id; /* debug ID for printks */ 250 int debug_id; /* debug ID for printks */
232 unsigned short num_conns; /* number of connections in this bundle */ 251 unsigned short num_conns; /* number of connections in this bundle */
233 __be16 service_id; /* service ID */ 252 u16 service_id; /* Service ID for this bundle */
234 u8 security_ix; /* security type */ 253 u8 security_ix; /* security type */
235}; 254};
236 255
@@ -252,7 +271,7 @@ struct rxrpc_connection {
252 struct rxrpc_security *security; /* applied security module */ 271 struct rxrpc_security *security; /* applied security module */
253 struct key *key; /* security for this connection (client) */ 272 struct key *key; /* security for this connection (client) */
254 struct key *server_key; /* security for this service */ 273 struct key *server_key; /* security for this service */
255 struct crypto_blkcipher *cipher; /* encryption handle */ 274 struct crypto_skcipher *cipher; /* encryption handle */
256 struct rxrpc_crypt csum_iv; /* packet checksum base */ 275 struct rxrpc_crypt csum_iv; /* packet checksum base */
257 unsigned long events; 276 unsigned long events;
258#define RXRPC_CONN_CHALLENGE 0 /* send challenge packet */ 277#define RXRPC_CONN_CHALLENGE 0 /* send challenge packet */
@@ -260,7 +279,6 @@ struct rxrpc_connection {
260 rwlock_t lock; /* access lock */ 279 rwlock_t lock; /* access lock */
261 spinlock_t state_lock; /* state-change lock */ 280 spinlock_t state_lock; /* state-change lock */
262 atomic_t usage; 281 atomic_t usage;
263 u32 real_conn_id; /* connection ID (host-endian) */
264 enum { /* current state of connection */ 282 enum { /* current state of connection */
265 RXRPC_CONN_UNUSED, /* - connection not yet attempted */ 283 RXRPC_CONN_UNUSED, /* - connection not yet attempted */
266 RXRPC_CONN_CLIENT, /* - client connection */ 284 RXRPC_CONN_CLIENT, /* - client connection */
@@ -282,17 +300,76 @@ struct rxrpc_connection {
282 u8 security_size; /* security header size */ 300 u8 security_size; /* security header size */
283 u32 security_level; /* security level negotiated */ 301 u32 security_level; /* security level negotiated */
284 u32 security_nonce; /* response re-use preventer */ 302 u32 security_nonce; /* response re-use preventer */
285 303 u32 epoch; /* epoch of this connection */
286 /* the following are all in net order */ 304 u32 cid; /* connection ID */
287 __be32 epoch; /* epoch of this connection */ 305 u16 service_id; /* service ID for this connection */
288 __be32 cid; /* connection ID */
289 __be16 service_id; /* service ID */
290 u8 security_ix; /* security type */ 306 u8 security_ix; /* security type */
291 u8 in_clientflag; /* RXRPC_CLIENT_INITIATED if we are server */ 307 u8 in_clientflag; /* RXRPC_CLIENT_INITIATED if we are server */
292 u8 out_clientflag; /* RXRPC_CLIENT_INITIATED if we are client */ 308 u8 out_clientflag; /* RXRPC_CLIENT_INITIATED if we are client */
293}; 309};
294 310
295/* 311/*
312 * Flags in call->flags.
313 */
314enum rxrpc_call_flag {
315 RXRPC_CALL_RELEASED, /* call has been released - no more message to userspace */
316 RXRPC_CALL_TERMINAL_MSG, /* call has given the socket its final message */
317 RXRPC_CALL_RCVD_LAST, /* all packets received */
318 RXRPC_CALL_RUN_RTIMER, /* Tx resend timer started */
319 RXRPC_CALL_TX_SOFT_ACK, /* sent some soft ACKs */
320 RXRPC_CALL_PROC_BUSY, /* the processor is busy */
321 RXRPC_CALL_INIT_ACCEPT, /* acceptance was initiated */
322 RXRPC_CALL_HAS_USERID, /* has a user ID attached */
323 RXRPC_CALL_EXPECT_OOS, /* expect out of sequence packets */
324};
325
326/*
327 * Events that can be raised on a call.
328 */
329enum rxrpc_call_event {
330 RXRPC_CALL_EV_RCVD_ACKALL, /* ACKALL or reply received */
331 RXRPC_CALL_EV_RCVD_BUSY, /* busy packet received */
332 RXRPC_CALL_EV_RCVD_ABORT, /* abort packet received */
333 RXRPC_CALL_EV_RCVD_ERROR, /* network error received */
334 RXRPC_CALL_EV_ACK_FINAL, /* need to generate final ACK (and release call) */
335 RXRPC_CALL_EV_ACK, /* need to generate ACK */
336 RXRPC_CALL_EV_REJECT_BUSY, /* need to generate busy message */
337 RXRPC_CALL_EV_ABORT, /* need to generate abort */
338 RXRPC_CALL_EV_CONN_ABORT, /* local connection abort generated */
339 RXRPC_CALL_EV_RESEND_TIMER, /* Tx resend timer expired */
340 RXRPC_CALL_EV_RESEND, /* Tx resend required */
341 RXRPC_CALL_EV_DRAIN_RX_OOS, /* drain the Rx out of sequence queue */
342 RXRPC_CALL_EV_LIFE_TIMER, /* call's lifetimer ran out */
343 RXRPC_CALL_EV_ACCEPTED, /* incoming call accepted by userspace app */
344 RXRPC_CALL_EV_SECURED, /* incoming call's connection is now secure */
345 RXRPC_CALL_EV_POST_ACCEPT, /* need to post an "accept?" message to the app */
346 RXRPC_CALL_EV_RELEASE, /* need to release the call's resources */
347};
348
349/*
350 * The states that a call can be in.
351 */
352enum rxrpc_call_state {
353 RXRPC_CALL_CLIENT_SEND_REQUEST, /* - client sending request phase */
354 RXRPC_CALL_CLIENT_AWAIT_REPLY, /* - client awaiting reply */
355 RXRPC_CALL_CLIENT_RECV_REPLY, /* - client receiving reply phase */
356 RXRPC_CALL_CLIENT_FINAL_ACK, /* - client sending final ACK phase */
357 RXRPC_CALL_SERVER_SECURING, /* - server securing request connection */
358 RXRPC_CALL_SERVER_ACCEPTING, /* - server accepting request */
359 RXRPC_CALL_SERVER_RECV_REQUEST, /* - server receiving request */
360 RXRPC_CALL_SERVER_ACK_REQUEST, /* - server pending ACK of request */
361 RXRPC_CALL_SERVER_SEND_REPLY, /* - server sending reply */
362 RXRPC_CALL_SERVER_AWAIT_ACK, /* - server awaiting final ACK */
363 RXRPC_CALL_COMPLETE, /* - call completed */
364 RXRPC_CALL_SERVER_BUSY, /* - call rejected by busy server */
365 RXRPC_CALL_REMOTELY_ABORTED, /* - call aborted by peer */
366 RXRPC_CALL_LOCALLY_ABORTED, /* - call aborted locally on error or close */
367 RXRPC_CALL_NETWORK_ERROR, /* - call terminated by network error */
368 RXRPC_CALL_DEAD, /* - call is dead */
369 NR__RXRPC_CALL_STATES
370};
371
372/*
296 * RxRPC call definition 373 * RxRPC call definition
297 * - matched by { connection, call_id } 374 * - matched by { connection, call_id }
298 */ 375 */
@@ -317,57 +394,13 @@ struct rxrpc_call {
317 unsigned long user_call_ID; /* user-defined call ID */ 394 unsigned long user_call_ID; /* user-defined call ID */
318 unsigned long creation_jif; /* time of call creation */ 395 unsigned long creation_jif; /* time of call creation */
319 unsigned long flags; 396 unsigned long flags;
320#define RXRPC_CALL_RELEASED 0 /* call has been released - no more message to userspace */
321#define RXRPC_CALL_TERMINAL_MSG 1 /* call has given the socket its final message */
322#define RXRPC_CALL_RCVD_LAST 2 /* all packets received */
323#define RXRPC_CALL_RUN_RTIMER 3 /* Tx resend timer started */
324#define RXRPC_CALL_TX_SOFT_ACK 4 /* sent some soft ACKs */
325#define RXRPC_CALL_PROC_BUSY 5 /* the processor is busy */
326#define RXRPC_CALL_INIT_ACCEPT 6 /* acceptance was initiated */
327#define RXRPC_CALL_HAS_USERID 7 /* has a user ID attached */
328#define RXRPC_CALL_EXPECT_OOS 8 /* expect out of sequence packets */
329 unsigned long events; 397 unsigned long events;
330#define RXRPC_CALL_RCVD_ACKALL 0 /* ACKALL or reply received */
331#define RXRPC_CALL_RCVD_BUSY 1 /* busy packet received */
332#define RXRPC_CALL_RCVD_ABORT 2 /* abort packet received */
333#define RXRPC_CALL_RCVD_ERROR 3 /* network error received */
334#define RXRPC_CALL_ACK_FINAL 4 /* need to generate final ACK (and release call) */
335#define RXRPC_CALL_ACK 5 /* need to generate ACK */
336#define RXRPC_CALL_REJECT_BUSY 6 /* need to generate busy message */
337#define RXRPC_CALL_ABORT 7 /* need to generate abort */
338#define RXRPC_CALL_CONN_ABORT 8 /* local connection abort generated */
339#define RXRPC_CALL_RESEND_TIMER 9 /* Tx resend timer expired */
340#define RXRPC_CALL_RESEND 10 /* Tx resend required */
341#define RXRPC_CALL_DRAIN_RX_OOS 11 /* drain the Rx out of sequence queue */
342#define RXRPC_CALL_LIFE_TIMER 12 /* call's lifetimer ran out */
343#define RXRPC_CALL_ACCEPTED 13 /* incoming call accepted by userspace app */
344#define RXRPC_CALL_SECURED 14 /* incoming call's connection is now secure */
345#define RXRPC_CALL_POST_ACCEPT 15 /* need to post an "accept?" message to the app */
346#define RXRPC_CALL_RELEASE 16 /* need to release the call's resources */
347
348 spinlock_t lock; 398 spinlock_t lock;
349 rwlock_t state_lock; /* lock for state transition */ 399 rwlock_t state_lock; /* lock for state transition */
350 atomic_t usage; 400 atomic_t usage;
351 atomic_t sequence; /* Tx data packet sequence counter */ 401 atomic_t sequence; /* Tx data packet sequence counter */
352 u32 abort_code; /* local/remote abort code */ 402 u32 abort_code; /* local/remote abort code */
353 enum { /* current state of call */ 403 enum rxrpc_call_state state : 8; /* current state of call */
354 RXRPC_CALL_CLIENT_SEND_REQUEST, /* - client sending request phase */
355 RXRPC_CALL_CLIENT_AWAIT_REPLY, /* - client awaiting reply */
356 RXRPC_CALL_CLIENT_RECV_REPLY, /* - client receiving reply phase */
357 RXRPC_CALL_CLIENT_FINAL_ACK, /* - client sending final ACK phase */
358 RXRPC_CALL_SERVER_SECURING, /* - server securing request connection */
359 RXRPC_CALL_SERVER_ACCEPTING, /* - server accepting request */
360 RXRPC_CALL_SERVER_RECV_REQUEST, /* - server receiving request */
361 RXRPC_CALL_SERVER_ACK_REQUEST, /* - server pending ACK of request */
362 RXRPC_CALL_SERVER_SEND_REPLY, /* - server sending reply */
363 RXRPC_CALL_SERVER_AWAIT_ACK, /* - server awaiting final ACK */
364 RXRPC_CALL_COMPLETE, /* - call completed */
365 RXRPC_CALL_SERVER_BUSY, /* - call rejected by busy server */
366 RXRPC_CALL_REMOTELY_ABORTED, /* - call aborted by peer */
367 RXRPC_CALL_LOCALLY_ABORTED, /* - call aborted locally on error or close */
368 RXRPC_CALL_NETWORK_ERROR, /* - call terminated by network error */
369 RXRPC_CALL_DEAD, /* - call is dead */
370 } state;
371 int debug_id; /* debug ID for printks */ 404 int debug_id; /* debug ID for printks */
372 u8 channel; /* connection channel occupied by this call */ 405 u8 channel; /* connection channel occupied by this call */
373 406
@@ -389,9 +422,9 @@ struct rxrpc_call {
389 rxrpc_seq_t rx_data_eaten; /* last data seq ID consumed by recvmsg */ 422 rxrpc_seq_t rx_data_eaten; /* last data seq ID consumed by recvmsg */
390 rxrpc_seq_t rx_first_oos; /* first packet in rx_oos_queue (or 0) */ 423 rxrpc_seq_t rx_first_oos; /* first packet in rx_oos_queue (or 0) */
391 rxrpc_seq_t ackr_win_top; /* top of ACK window (rx_data_eaten is bottom) */ 424 rxrpc_seq_t ackr_win_top; /* top of ACK window (rx_data_eaten is bottom) */
392 rxrpc_seq_net_t ackr_prev_seq; /* previous sequence number received */ 425 rxrpc_seq_t ackr_prev_seq; /* previous sequence number received */
393 u8 ackr_reason; /* reason to ACK */ 426 u8 ackr_reason; /* reason to ACK */
394 __be32 ackr_serial; /* serial of packet being ACK'd */ 427 rxrpc_serial_t ackr_serial; /* serial of packet being ACK'd */
395 atomic_t ackr_not_idle; /* number of packets in Rx queue */ 428 atomic_t ackr_not_idle; /* number of packets in Rx queue */
396 429
397 /* received packet records, 1 bit per record */ 430 /* received packet records, 1 bit per record */
@@ -403,11 +436,10 @@ struct rxrpc_call {
403 u8 in_clientflag; /* Copy of conn->in_clientflag for hashing */ 436 u8 in_clientflag; /* Copy of conn->in_clientflag for hashing */
404 struct rxrpc_local *local; /* Local endpoint. Used for hashing. */ 437 struct rxrpc_local *local; /* Local endpoint. Used for hashing. */
405 sa_family_t proto; /* Frame protocol */ 438 sa_family_t proto; /* Frame protocol */
406 /* the following should all be in net order */ 439 u32 call_id; /* call ID on connection */
407 __be32 cid; /* connection ID + channel index */ 440 u32 cid; /* connection ID plus channel index */
408 __be32 call_id; /* call ID on connection */ 441 u32 epoch; /* epoch of this connection */
409 __be32 epoch; /* epoch of this connection */ 442 u16 service_id; /* service ID */
410 __be16 service_id; /* service ID */
411 union { /* Peer IP address for hashing */ 443 union { /* Peer IP address for hashing */
412 __be32 ipv4_addr; 444 __be32 ipv4_addr;
413 __u8 ipv6_addr[16]; /* Anticipates eventual IPv6 support */ 445 __u8 ipv6_addr[16]; /* Anticipates eventual IPv6 support */
@@ -423,7 +455,7 @@ static inline void rxrpc_abort_call(struct rxrpc_call *call, u32 abort_code)
423 if (call->state < RXRPC_CALL_COMPLETE) { 455 if (call->state < RXRPC_CALL_COMPLETE) {
424 call->abort_code = abort_code; 456 call->abort_code = abort_code;
425 call->state = RXRPC_CALL_LOCALLY_ABORTED; 457 call->state = RXRPC_CALL_LOCALLY_ABORTED;
426 set_bit(RXRPC_CALL_ABORT, &call->events); 458 set_bit(RXRPC_CALL_EV_ABORT, &call->events);
427 } 459 }
428 write_unlock_bh(&call->state_lock); 460 write_unlock_bh(&call->state_lock);
429} 461}
@@ -432,7 +464,7 @@ static inline void rxrpc_abort_call(struct rxrpc_call *call, u32 abort_code)
432 * af_rxrpc.c 464 * af_rxrpc.c
433 */ 465 */
434extern atomic_t rxrpc_n_skbs; 466extern atomic_t rxrpc_n_skbs;
435extern __be32 rxrpc_epoch; 467extern u32 rxrpc_epoch;
436extern atomic_t rxrpc_debug_id; 468extern atomic_t rxrpc_debug_id;
437extern struct workqueue_struct *rxrpc_workqueue; 469extern struct workqueue_struct *rxrpc_workqueue;
438 470
@@ -446,35 +478,35 @@ int rxrpc_reject_call(struct rxrpc_sock *);
446/* 478/*
447 * ar-ack.c 479 * ar-ack.c
448 */ 480 */
449extern unsigned rxrpc_requested_ack_delay; 481extern unsigned int rxrpc_requested_ack_delay;
450extern unsigned rxrpc_soft_ack_delay; 482extern unsigned int rxrpc_soft_ack_delay;
451extern unsigned rxrpc_idle_ack_delay; 483extern unsigned int rxrpc_idle_ack_delay;
452extern unsigned rxrpc_rx_window_size; 484extern unsigned int rxrpc_rx_window_size;
453extern unsigned rxrpc_rx_mtu; 485extern unsigned int rxrpc_rx_mtu;
454extern unsigned rxrpc_rx_jumbo_max; 486extern unsigned int rxrpc_rx_jumbo_max;
455 487
456void __rxrpc_propose_ACK(struct rxrpc_call *, u8, __be32, bool); 488void __rxrpc_propose_ACK(struct rxrpc_call *, u8, u32, bool);
457void rxrpc_propose_ACK(struct rxrpc_call *, u8, __be32, bool); 489void rxrpc_propose_ACK(struct rxrpc_call *, u8, u32, bool);
458void rxrpc_process_call(struct work_struct *); 490void rxrpc_process_call(struct work_struct *);
459 491
460/* 492/*
461 * ar-call.c 493 * ar-call.c
462 */ 494 */
463extern unsigned rxrpc_max_call_lifetime; 495extern unsigned int rxrpc_max_call_lifetime;
464extern unsigned rxrpc_dead_call_expiry; 496extern unsigned int rxrpc_dead_call_expiry;
465extern struct kmem_cache *rxrpc_call_jar; 497extern struct kmem_cache *rxrpc_call_jar;
466extern struct list_head rxrpc_calls; 498extern struct list_head rxrpc_calls;
467extern rwlock_t rxrpc_call_lock; 499extern rwlock_t rxrpc_call_lock;
468 500
469struct rxrpc_call *rxrpc_find_call_hash(u8, __be32, __be32, __be32, 501struct rxrpc_call *rxrpc_find_call_hash(struct rxrpc_host_header *,
470 __be16, void *, sa_family_t, const u8 *); 502 void *, sa_family_t, const void *);
471struct rxrpc_call *rxrpc_get_client_call(struct rxrpc_sock *, 503struct rxrpc_call *rxrpc_get_client_call(struct rxrpc_sock *,
472 struct rxrpc_transport *, 504 struct rxrpc_transport *,
473 struct rxrpc_conn_bundle *, 505 struct rxrpc_conn_bundle *,
474 unsigned long, int, gfp_t); 506 unsigned long, int, gfp_t);
475struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *, 507struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *,
476 struct rxrpc_connection *, 508 struct rxrpc_connection *,
477 struct rxrpc_header *, gfp_t); 509 struct rxrpc_host_header *, gfp_t);
478struct rxrpc_call *rxrpc_find_server_call(struct rxrpc_sock *, unsigned long); 510struct rxrpc_call *rxrpc_find_server_call(struct rxrpc_sock *, unsigned long);
479void rxrpc_release_call(struct rxrpc_call *); 511void rxrpc_release_call(struct rxrpc_call *);
480void rxrpc_release_calls_on_socket(struct rxrpc_sock *); 512void rxrpc_release_calls_on_socket(struct rxrpc_sock *);
@@ -484,22 +516,22 @@ void __exit rxrpc_destroy_all_calls(void);
484/* 516/*
485 * ar-connection.c 517 * ar-connection.c
486 */ 518 */
487extern unsigned rxrpc_connection_expiry; 519extern unsigned int rxrpc_connection_expiry;
488extern struct list_head rxrpc_connections; 520extern struct list_head rxrpc_connections;
489extern rwlock_t rxrpc_connection_lock; 521extern rwlock_t rxrpc_connection_lock;
490 522
491struct rxrpc_conn_bundle *rxrpc_get_bundle(struct rxrpc_sock *, 523struct rxrpc_conn_bundle *rxrpc_get_bundle(struct rxrpc_sock *,
492 struct rxrpc_transport *, 524 struct rxrpc_transport *,
493 struct key *, __be16, gfp_t); 525 struct key *, u16, gfp_t);
494void rxrpc_put_bundle(struct rxrpc_transport *, struct rxrpc_conn_bundle *); 526void rxrpc_put_bundle(struct rxrpc_transport *, struct rxrpc_conn_bundle *);
495int rxrpc_connect_call(struct rxrpc_sock *, struct rxrpc_transport *, 527int rxrpc_connect_call(struct rxrpc_sock *, struct rxrpc_transport *,
496 struct rxrpc_conn_bundle *, struct rxrpc_call *, gfp_t); 528 struct rxrpc_conn_bundle *, struct rxrpc_call *, gfp_t);
497void rxrpc_put_connection(struct rxrpc_connection *); 529void rxrpc_put_connection(struct rxrpc_connection *);
498void __exit rxrpc_destroy_all_connections(void); 530void __exit rxrpc_destroy_all_connections(void);
499struct rxrpc_connection *rxrpc_find_connection(struct rxrpc_transport *, 531struct rxrpc_connection *rxrpc_find_connection(struct rxrpc_transport *,
500 struct rxrpc_header *); 532 struct rxrpc_host_header *);
501extern struct rxrpc_connection * 533extern struct rxrpc_connection *
502rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_header *, 534rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_host_header *,
503 gfp_t); 535 gfp_t);
504 536
505/* 537/*
@@ -547,7 +579,7 @@ int rxrpc_get_server_data_key(struct rxrpc_connection *, const void *, time_t,
547/* 579/*
548 * ar-output.c 580 * ar-output.c
549 */ 581 */
550extern unsigned rxrpc_resend_timeout; 582extern unsigned int rxrpc_resend_timeout;
551 583
552int rxrpc_send_packet(struct rxrpc_transport *, struct sk_buff *); 584int rxrpc_send_packet(struct rxrpc_transport *, struct sk_buff *);
553int rxrpc_client_sendmsg(struct rxrpc_sock *, struct rxrpc_transport *, 585int rxrpc_client_sendmsg(struct rxrpc_sock *, struct rxrpc_transport *,
@@ -595,7 +627,7 @@ void rxrpc_packet_destructor(struct sk_buff *);
595/* 627/*
596 * ar-transport.c 628 * ar-transport.c
597 */ 629 */
598extern unsigned rxrpc_transport_expiry; 630extern unsigned int rxrpc_transport_expiry;
599 631
600struct rxrpc_transport *rxrpc_get_transport(struct rxrpc_local *, 632struct rxrpc_transport *rxrpc_get_transport(struct rxrpc_local *,
601 struct rxrpc_peer *, gfp_t); 633 struct rxrpc_peer *, gfp_t);
@@ -694,7 +726,7 @@ do { \
694 printk(KERN_ERR "RxRPC: Assertion failed\n"); \ 726 printk(KERN_ERR "RxRPC: Assertion failed\n"); \
695 BUG(); \ 727 BUG(); \
696 } \ 728 } \
697} while(0) 729} while (0)
698 730
699#define ASSERTCMP(X, OP, Y) \ 731#define ASSERTCMP(X, OP, Y) \
700do { \ 732do { \
@@ -707,7 +739,7 @@ do { \
707 (unsigned long)(X), (unsigned long)(Y)); \ 739 (unsigned long)(X), (unsigned long)(Y)); \
708 BUG(); \ 740 BUG(); \
709 } \ 741 } \
710} while(0) 742} while (0)
711 743
712#define ASSERTIF(C, X) \ 744#define ASSERTIF(C, X) \
713do { \ 745do { \
@@ -716,7 +748,7 @@ do { \
716 printk(KERN_ERR "RxRPC: Assertion failed\n"); \ 748 printk(KERN_ERR "RxRPC: Assertion failed\n"); \
717 BUG(); \ 749 BUG(); \
718 } \ 750 } \
719} while(0) 751} while (0)
720 752
721#define ASSERTIFCMP(C, X, OP, Y) \ 753#define ASSERTIFCMP(C, X, OP, Y) \
722do { \ 754do { \
@@ -729,25 +761,25 @@ do { \
729 (unsigned long)(X), (unsigned long)(Y)); \ 761 (unsigned long)(X), (unsigned long)(Y)); \
730 BUG(); \ 762 BUG(); \
731 } \ 763 } \
732} while(0) 764} while (0)
733 765
734#else 766#else
735 767
736#define ASSERT(X) \ 768#define ASSERT(X) \
737do { \ 769do { \
738} while(0) 770} while (0)
739 771
740#define ASSERTCMP(X, OP, Y) \ 772#define ASSERTCMP(X, OP, Y) \
741do { \ 773do { \
742} while(0) 774} while (0)
743 775
744#define ASSERTIF(C, X) \ 776#define ASSERTIF(C, X) \
745do { \ 777do { \
746} while(0) 778} while (0)
747 779
748#define ASSERTIFCMP(C, X, OP, Y) \ 780#define ASSERTIFCMP(C, X, OP, Y) \
749do { \ 781do { \
750} while(0) 782} while (0)
751 783
752#endif /* __KDEBUGALL */ 784#endif /* __KDEBUGALL */
753 785
@@ -804,9 +836,9 @@ do { \
804 CHECK_SLAB_OKAY(&(CALL)->usage); \ 836 CHECK_SLAB_OKAY(&(CALL)->usage); \
805 if (atomic_inc_return(&(CALL)->usage) == 1) \ 837 if (atomic_inc_return(&(CALL)->usage) == 1) \
806 BUG(); \ 838 BUG(); \
807} while(0) 839} while (0)
808 840
809#define rxrpc_put_call(CALL) \ 841#define rxrpc_put_call(CALL) \
810do { \ 842do { \
811 __rxrpc_put_call(CALL); \ 843 __rxrpc_put_call(CALL); \
812} while(0) 844} while (0)