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.h44
1 files changed, 17 insertions, 27 deletions
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 7bfbf471c81e..cb1eb492ee48 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -19,8 +19,6 @@
19#define CHECK_SLAB_OKAY(X) do {} while(0) 19#define CHECK_SLAB_OKAY(X) do {} while(0)
20#endif 20#endif
21 21
22extern atomic_t rxrpc_n_skbs;
23
24#define FCRYPT_BSIZE 8 22#define FCRYPT_BSIZE 8
25struct rxrpc_crypt { 23struct rxrpc_crypt {
26 union { 24 union {
@@ -29,8 +27,12 @@ struct rxrpc_crypt {
29 }; 27 };
30} __attribute__((aligned(8))); 28} __attribute__((aligned(8)));
31 29
32extern __be32 rxrpc_epoch; /* local epoch for detecting local-end reset */ 30#define rxrpc_queue_work(WS) queue_work(rxrpc_workqueue, (WS))
33extern atomic_t rxrpc_debug_id; /* current debugging ID */ 31#define rxrpc_queue_delayed_work(WS,D) \
32 queue_delayed_work(rxrpc_workqueue, (WS), (D))
33
34#define rxrpc_queue_call(CALL) rxrpc_queue_work(&(CALL)->processor)
35#define rxrpc_queue_conn(CONN) rxrpc_queue_work(&(CONN)->processor)
34 36
35/* 37/*
36 * sk_state for RxRPC sockets 38 * sk_state for RxRPC sockets
@@ -50,6 +52,7 @@ enum {
50struct rxrpc_sock { 52struct rxrpc_sock {
51 /* WARNING: sk has to be the first member */ 53 /* WARNING: sk has to be the first member */
52 struct sock sk; 54 struct sock sk;
55 rxrpc_interceptor_t interceptor; /* kernel service Rx interceptor function */
53 struct rxrpc_local *local; /* local endpoint */ 56 struct rxrpc_local *local; /* local endpoint */
54 struct rxrpc_transport *trans; /* transport handler */ 57 struct rxrpc_transport *trans; /* transport handler */
55 struct rxrpc_conn_bundle *bundle; /* virtual connection bundle */ 58 struct rxrpc_conn_bundle *bundle; /* virtual connection bundle */
@@ -91,16 +94,6 @@ struct rxrpc_skb_priv {
91 94
92#define rxrpc_skb(__skb) ((struct rxrpc_skb_priv *) &(__skb)->cb) 95#define rxrpc_skb(__skb) ((struct rxrpc_skb_priv *) &(__skb)->cb)
93 96
94enum {
95 RXRPC_SKB_MARK_DATA, /* data message */
96 RXRPC_SKB_MARK_FINAL_ACK, /* final ACK received message */
97 RXRPC_SKB_MARK_BUSY, /* server busy message */
98 RXRPC_SKB_MARK_REMOTE_ABORT, /* remote abort message */
99 RXRPC_SKB_MARK_NET_ERROR, /* network error message */
100 RXRPC_SKB_MARK_LOCAL_ERROR, /* local error message */
101 RXRPC_SKB_MARK_NEW_CALL, /* local error message */
102};
103
104enum rxrpc_command { 97enum rxrpc_command {
105 RXRPC_CMD_SEND_DATA, /* send data message */ 98 RXRPC_CMD_SEND_DATA, /* send data message */
106 RXRPC_CMD_SEND_ABORT, /* request abort generation */ 99 RXRPC_CMD_SEND_ABORT, /* request abort generation */
@@ -439,25 +432,20 @@ static inline void rxrpc_abort_call(struct rxrpc_call *call, u32 abort_code)
439} 432}
440 433
441/* 434/*
442 * put a packet up for transport-level abort 435 * af_rxrpc.c
443 */ 436 */
444static inline 437extern atomic_t rxrpc_n_skbs;
445void rxrpc_reject_packet(struct rxrpc_local *local, struct sk_buff *skb) 438extern __be32 rxrpc_epoch;
446{ 439extern atomic_t rxrpc_debug_id;
447 CHECK_SLAB_OKAY(&local->usage); 440extern struct workqueue_struct *rxrpc_workqueue;
448 if (!atomic_inc_not_zero(&local->usage)) {
449 printk("resurrected on reject\n");
450 BUG();
451 }
452 skb_queue_tail(&local->reject_queue, skb);
453 schedule_work(&local->rejecter);
454}
455 441
456/* 442/*
457 * ar-accept.c 443 * ar-accept.c
458 */ 444 */
459extern void rxrpc_accept_incoming_calls(struct work_struct *); 445extern void rxrpc_accept_incoming_calls(struct work_struct *);
460extern int rxrpc_accept_call(struct rxrpc_sock *, unsigned long); 446extern struct rxrpc_call *rxrpc_accept_call(struct rxrpc_sock *,
447 unsigned long);
448extern int rxrpc_reject_call(struct rxrpc_sock *);
461 449
462/* 450/*
463 * ar-ack.c 451 * ar-ack.c
@@ -514,6 +502,7 @@ rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_header *,
514 * ar-connevent.c 502 * ar-connevent.c
515 */ 503 */
516extern void rxrpc_process_connection(struct work_struct *); 504extern void rxrpc_process_connection(struct work_struct *);
505extern void rxrpc_reject_packet(struct rxrpc_local *, struct sk_buff *);
517extern void rxrpc_reject_packets(struct work_struct *); 506extern void rxrpc_reject_packets(struct work_struct *);
518 507
519/* 508/*
@@ -583,6 +572,7 @@ extern struct file_operations rxrpc_connection_seq_fops;
583/* 572/*
584 * ar-recvmsg.c 573 * ar-recvmsg.c
585 */ 574 */
575extern void rxrpc_remove_user_ID(struct rxrpc_sock *, struct rxrpc_call *);
586extern int rxrpc_recvmsg(struct kiocb *, struct socket *, struct msghdr *, 576extern int rxrpc_recvmsg(struct kiocb *, struct socket *, struct msghdr *,
587 size_t, int); 577 size_t, int);
588 578