Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
rds.h File Reference
#include <net/sock.h>
#include <linux/scatterlist.h>
#include <linux/highmem.h>
#include <rdma/rdma_cm.h>
#include <linux/mutex.h>
#include <linux/rds.h>
#include "info.h"

Go to the source code of this file.

Data Structures

struct  rds_connection
 
struct  rds_header
 
struct  rds_ext_header_version
 
struct  rds_ext_header_rdma
 
struct  rds_ext_header_rdma_dest
 
struct  rds_incoming
 
struct  rds_mr
 
struct  rds_message
 
struct  rds_notifier
 
struct  rds_transport
 
struct  rds_sock
 
struct  rds_statistics
 

Macros

#define RDS_PROTOCOL_3_0   0x0300
 
#define RDS_PROTOCOL_3_1   0x0301
 
#define RDS_PROTOCOL_VERSION   RDS_PROTOCOL_3_1
 
#define RDS_PROTOCOL_MAJOR(v)   ((v) >> 8)
 
#define RDS_PROTOCOL_MINOR(v)   ((v) & 255)
 
#define RDS_PROTOCOL(maj, min)   (((maj) << 8) | min)
 
#define RDS_PORT   18634
 
#define ceil(x, y)   ({ unsigned long __x = (x), __y = (y); (__x + __y - 1) / __y; })
 
#define RDS_FRAG_SHIFT   12
 
#define RDS_FRAG_SIZE   ((unsigned int)(1 << RDS_FRAG_SHIFT))
 
#define RDS_CONG_MAP_BYTES   (65536 / 8)
 
#define RDS_CONG_MAP_PAGES   (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE)
 
#define RDS_CONG_MAP_PAGE_BITS   (PAGE_SIZE * 8)
 
#define RDS_LL_SEND_FULL   0
 
#define RDS_RECONNECT_PENDING   1
 
#define RDS_IN_XMIT   2
 
#define RDS_FLAG_CONG_BITMAP   0x01
 
#define RDS_FLAG_ACK_REQUIRED   0x02
 
#define RDS_FLAG_RETRANSMITTED   0x04
 
#define RDS_MAX_ADV_CREDIT   255
 
#define RDS_HEADER_EXT_SPACE   16
 
#define RDS_EXTHDR_NONE   0
 
#define RDS_EXTHDR_VERSION   1
 
#define RDS_EXTHDR_RDMA   2
 
#define RDS_EXTHDR_RDMA_DEST   3
 
#define __RDS_EXTHDR_MAX   16 /* for now */
 
#define RDS_MR_DEAD   0
 
#define RDS_ATOMIC_TYPE_CSWP   0
 
#define RDS_ATOMIC_TYPE_FADD   1
 
#define RDS_MSG_ON_SOCK   1
 
#define RDS_MSG_ON_CONN   2
 
#define RDS_MSG_HAS_ACK_SEQ   3
 
#define RDS_MSG_ACK_REQUIRED   4
 
#define RDS_MSG_RETRANSMITTED   5
 
#define RDS_MSG_MAPPED   6
 
#define RDS_MSG_PAGEVEC   7
 
#define RDS_TRANS_IB   0
 
#define RDS_TRANS_IWARP   1
 
#define RDS_TRANS_TCP   2
 
#define RDS_TRANS_COUNT   3
 
#define rds_conn_error(conn, fmt...)   __rds_conn_error(conn, KERN_WARNING "RDS: " fmt)
 
#define rds_page_copy_to_user(page, offset, ptr, bytes)   rds_page_copy_user(page, offset, ptr, bytes, 1)
 
#define rds_page_copy_from_user(page, offset, ptr, bytes)   rds_page_copy_user(page, offset, ptr, bytes, 0)
 
#define rds_stats_inc_which(which, member)
 
#define rds_stats_inc(member)   rds_stats_inc_which(rds_stats, member)
 
#define rds_stats_add_which(which, member, count)
 
#define rds_stats_add(member, count)   rds_stats_add_which(rds_stats, member, count)
 

Typedefs

typedef int(* is_acked_func )(struct rds_message *rm, uint64_t ack)
 

Enumerations

enum  {
  RDS_CONN_DOWN = 0, RDS_CONN_CONNECTING, RDS_CONN_DISCONNECTING, RDS_CONN_UP,
  RDS_CONN_ERROR
}
 

Functions

charrds_str_array (char **array, size_t elements, size_t index)
 
void rds_sock_addref (struct rds_sock *rs)
 
void rds_sock_put (struct rds_sock *rs)
 
void rds_wake_sk_sleep (struct rds_sock *rs)
 
int rds_bind (struct socket *sock, struct sockaddr *uaddr, int addr_len)
 
void rds_remove_bound (struct rds_sock *rs)
 
struct rds_sockrds_find_bound (__be32 addr, __be16 port)
 
int rds_cong_get_maps (struct rds_connection *conn)
 
void rds_cong_add_conn (struct rds_connection *conn)
 
void rds_cong_remove_conn (struct rds_connection *conn)
 
void rds_cong_set_bit (struct rds_cong_map *map, __be16 port)
 
void rds_cong_clear_bit (struct rds_cong_map *map, __be16 port)
 
int rds_cong_wait (struct rds_cong_map *map, __be16 port, int nonblock, struct rds_sock *rs)
 
void rds_cong_queue_updates (struct rds_cong_map *map)
 
void rds_cong_map_updated (struct rds_cong_map *map, uint64_t)
 
int rds_cong_updated_since (unsigned long *recent)
 
void rds_cong_add_socket (struct rds_sock *)
 
void rds_cong_remove_socket (struct rds_sock *)
 
void rds_cong_exit (void)
 
struct rds_messagerds_cong_update_alloc (struct rds_connection *conn)
 
int rds_conn_init (void)
 
void rds_conn_exit (void)
 
struct rds_connectionrds_conn_create (__be32 laddr, __be32 faddr, struct rds_transport *trans, gfp_t gfp)
 
struct rds_connectionrds_conn_create_outgoing (__be32 laddr, __be32 faddr, struct rds_transport *trans, gfp_t gfp)
 
void rds_conn_shutdown (struct rds_connection *conn)
 
void rds_conn_destroy (struct rds_connection *conn)
 
void rds_conn_drop (struct rds_connection *conn)
 
void rds_conn_connect_if_down (struct rds_connection *conn)
 
void rds_for_each_conn_info (struct socket *sock, unsigned int len, struct rds_info_iterator *iter, struct rds_info_lengths *lens, int(*visitor)(struct rds_connection *, void *), size_t item_len)
 
 __printf (2, 3) void __rds_conn_error(struct rds_connection *conn
 
struct rds_messagerds_message_alloc (unsigned int nents, gfp_t gfp)
 
struct scatterlistrds_message_alloc_sgs (struct rds_message *rm, int nents)
 
int rds_message_copy_from_user (struct rds_message *rm, struct iovec *first_iov, size_t total_len)
 
struct rds_messagerds_message_map_pages (unsigned long *page_addrs, unsigned int total_len)
 
void rds_message_populate_header (struct rds_header *hdr, __be16 sport, __be16 dport, u64 seq)
 
int rds_message_add_extension (struct rds_header *hdr, unsigned int type, const void *data, unsigned int len)
 
int rds_message_next_extension (struct rds_header *hdr, unsigned int *pos, void *buf, unsigned int *buflen)
 
int rds_message_add_rdma_dest_extension (struct rds_header *hdr, u32 r_key, u32 offset)
 
int rds_message_inc_copy_to_user (struct rds_incoming *inc, struct iovec *first_iov, size_t size)
 
void rds_message_inc_free (struct rds_incoming *inc)
 
void rds_message_addref (struct rds_message *rm)
 
void rds_message_put (struct rds_message *rm)
 
void rds_message_wait (struct rds_message *rm)
 
void rds_message_unmapped (struct rds_message *rm)
 
int rds_page_remainder_alloc (struct scatterlist *scat, unsigned long bytes, gfp_t gfp)
 
int rds_page_copy_user (struct page *page, unsigned long offset, void __user *ptr, unsigned long bytes, int to_user)
 
void rds_page_exit (void)
 
void rds_inc_init (struct rds_incoming *inc, struct rds_connection *conn, __be32 saddr)
 
void rds_inc_put (struct rds_incoming *inc)
 
void rds_recv_incoming (struct rds_connection *conn, __be32 saddr, __be32 daddr, struct rds_incoming *inc, gfp_t gfp)
 
int rds_recvmsg (struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int msg_flags)
 
void rds_clear_recv_queue (struct rds_sock *rs)
 
int rds_notify_queue_get (struct rds_sock *rs, struct msghdr *msg)
 
void rds_inc_info_copy (struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip)
 
int rds_sendmsg (struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t payload_len)
 
void rds_send_reset (struct rds_connection *conn)
 
int rds_send_xmit (struct rds_connection *conn)
 
void rds_send_drop_to (struct rds_sock *rs, struct sockaddr_in *dest)
 
void rds_send_drop_acked (struct rds_connection *conn, u64 ack, is_acked_func is_acked)
 
int rds_send_pong (struct rds_connection *conn, __be16 dport)
 
struct rds_messagerds_send_get_message (struct rds_connection *, struct rm_rdma_op *)
 
void rds_rdma_unuse (struct rds_sock *rs, u32 r_key, int force)
 
int rds_get_mr (struct rds_sock *rs, char __user *optval, int optlen)
 
int rds_get_mr_for_dest (struct rds_sock *rs, char __user *optval, int optlen)
 
int rds_free_mr (struct rds_sock *rs, char __user *optval, int optlen)
 
void rds_rdma_drop_keys (struct rds_sock *rs)
 
int rds_rdma_extra_size (struct rds_rdma_args *args)
 
int rds_cmsg_rdma_args (struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg)
 
int rds_cmsg_rdma_dest (struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg)
 
int rds_cmsg_rdma_map (struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg)
 
void rds_rdma_free_op (struct rm_rdma_op *ro)
 
void rds_atomic_free_op (struct rm_atomic_op *ao)
 
void rds_rdma_send_complete (struct rds_message *rm, int wc_status)
 
void rds_atomic_send_complete (struct rds_message *rm, int wc_status)
 
int rds_cmsg_atomic (struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg)
 
void __rds_put_mr_final (struct rds_mr *mr)
 
 DECLARE_PER_CPU_SHARED_ALIGNED (struct rds_statistics, rds_stats)
 
int rds_stats_init (void)
 
void rds_stats_exit (void)
 
void rds_stats_info_copy (struct rds_info_iterator *iter, uint64_t *values, const char *const *names, size_t nr)
 
int rds_sysctl_init (void)
 
void rds_sysctl_exit (void)
 
int rds_threads_init (void)
 
void rds_threads_exit (void)
 
void rds_queue_reconnect (struct rds_connection *conn)
 
void rds_connect_worker (struct work_struct *)
 
void rds_shutdown_worker (struct work_struct *)
 
void rds_send_worker (struct work_struct *)
 
void rds_recv_worker (struct work_struct *)
 
void rds_connect_complete (struct rds_connection *conn)
 
int rds_trans_register (struct rds_transport *trans)
 
void rds_trans_unregister (struct rds_transport *trans)
 
struct rds_transportrds_trans_get_preferred (__be32 addr)
 
void rds_trans_put (struct rds_transport *trans)
 
unsigned int rds_trans_stats_info_copy (struct rds_info_iterator *iter, unsigned int avail)
 
int rds_trans_init (void)
 
void rds_trans_exit (void)
 

Variables

wait_queue_head_t rds_poll_waitq
 
unsigned long rds_sysctl_sndbuf_min
 
unsigned long rds_sysctl_sndbuf_default
 
unsigned long rds_sysctl_sndbuf_max
 
unsigned long rds_sysctl_reconnect_min_jiffies
 
unsigned long rds_sysctl_reconnect_max_jiffies
 
unsigned int rds_sysctl_max_unacked_packets
 
unsigned int rds_sysctl_max_unacked_bytes
 
unsigned int rds_sysctl_ping_enable
 
unsigned long rds_sysctl_trace_flags
 
unsigned int rds_sysctl_trace_level
 
struct workqueue_structrds_wq
 

Macro Definition Documentation

#define __RDS_EXTHDR_MAX   16 /* for now */

Definition at line 196 of file rds.h.

#define ceil (   x,
  y 
)    ({ unsigned long __x = (x), __y = (y); (__x + __y - 1) / __y; })
#define RDS_ATOMIC_TYPE_CSWP   0

Definition at line 248 of file rds.h.

#define RDS_ATOMIC_TYPE_FADD   1

Definition at line 249 of file rds.h.

#define RDS_CONG_MAP_BYTES   (65536 / 8)
#define RDS_CONG_MAP_PAGE_BITS   (PAGE_SIZE * 8)
#define RDS_CONG_MAP_PAGES   (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE)
#define rds_conn_error (   conn,
  fmt... 
)    __rds_conn_error(conn, KERN_WARNING "RDS: " fmt)

Definition at line 630 of file rds.h.

#define RDS_EXTHDR_NONE   0

Definition at line 159 of file rds.h.

#define RDS_EXTHDR_RDMA   2

Definition at line 180 of file rds.h.

#define RDS_EXTHDR_RDMA_DEST   3

Definition at line 190 of file rds.h.

#define RDS_EXTHDR_VERSION   1

Definition at line 171 of file rds.h.

#define RDS_FLAG_ACK_REQUIRED   0x02

Definition at line 133 of file rds.h.

#define RDS_FLAG_CONG_BITMAP   0x01

Definition at line 132 of file rds.h.

#define RDS_FLAG_RETRANSMITTED   0x04

Definition at line 134 of file rds.h.

#define RDS_FRAG_SHIFT   12
#define RDS_FRAG_SIZE   ((unsigned int)(1 << RDS_FRAG_SHIFT))
#define RDS_HEADER_EXT_SPACE   16

Definition at line 140 of file rds.h.

#define RDS_IN_XMIT   2

Definition at line 82 of file rds.h.

#define RDS_LL_SEND_FULL   0

Definition at line 80 of file rds.h.

#define RDS_MAX_ADV_CREDIT   255

Definition at line 135 of file rds.h.

#define RDS_MR_DEAD   0

Definition at line 230 of file rds.h.

#define RDS_MSG_ACK_REQUIRED   4

Definition at line 283 of file rds.h.

#define RDS_MSG_HAS_ACK_SEQ   3

Definition at line 282 of file rds.h.

#define RDS_MSG_MAPPED   6

Definition at line 285 of file rds.h.

#define RDS_MSG_ON_CONN   2

Definition at line 281 of file rds.h.

#define RDS_MSG_ON_SOCK   1

Definition at line 280 of file rds.h.

#define RDS_MSG_PAGEVEC   7

Definition at line 286 of file rds.h.

#define RDS_MSG_RETRANSMITTED   5

Definition at line 284 of file rds.h.

#define rds_page_copy_from_user (   page,
  offset,
  ptr,
  bytes 
)    rds_page_copy_user(page, offset, ptr, bytes, 0)

Definition at line 698 of file rds.h.

#define rds_page_copy_to_user (   page,
  offset,
  ptr,
  bytes 
)    rds_page_copy_user(page, offset, ptr, bytes, 1)

Definition at line 696 of file rds.h.

#define RDS_PORT   18634

Definition at line 29 of file rds.h.

#define RDS_PROTOCOL (   maj,
  min 
)    (((maj) << 8) | min)

Definition at line 21 of file rds.h.

#define RDS_PROTOCOL_3_0   0x0300

Definition at line 16 of file rds.h.

#define RDS_PROTOCOL_3_1   0x0301

Definition at line 17 of file rds.h.

#define RDS_PROTOCOL_MAJOR (   v)    ((v) >> 8)

Definition at line 19 of file rds.h.

#define RDS_PROTOCOL_MINOR (   v)    ((v) & 255)

Definition at line 20 of file rds.h.

#define RDS_PROTOCOL_VERSION   RDS_PROTOCOL_3_1

Definition at line 18 of file rds.h.

#define RDS_RECONNECT_PENDING   1

Definition at line 81 of file rds.h.

#define rds_stats_add (   member,
  count 
)    rds_stats_add_which(rds_stats, member, count)

Definition at line 770 of file rds.h.

#define rds_stats_add_which (   which,
  member,
  count 
)
Value:
do { \
per_cpu(which, get_cpu()).member += count; \
put_cpu(); \
} while (0)

Definition at line 766 of file rds.h.

#define rds_stats_inc (   member)    rds_stats_inc_which(rds_stats, member)

Definition at line 765 of file rds.h.

#define rds_stats_inc_which (   which,
  member 
)
Value:
do { \
per_cpu(which, get_cpu()).member++; \
put_cpu(); \
} while (0)

Definition at line 761 of file rds.h.

#define RDS_TRANS_COUNT   3

Definition at line 413 of file rds.h.

#define RDS_TRANS_IB   0

struct rds_transport - transport specific behavioural hooks

: .xmit is called by rds_send_xmit() to tell the transport to send part of a message. The caller serializes on the send_sem so this doesn't need to be reentrant for a given conn. The header must be sent before the data payload. .xmit must be prepared to send a message with no data payload. .xmit should return the number of bytes that were sent down the connection, including header bytes. Returning 0 tells the caller that it doesn't need to perform any additional work now. This is usually the case when the transport has filled the sending queue for its connection and will handle triggering the rds thread to continue the send when space becomes available. Returning -EAGAIN tells the caller to retry the send immediately. Returning -ENOMEM tells the caller to retry the send at some point in the future.

: conn_shutdown stops traffic on the given connection. Once it returns the connection can not call rds_recv_incoming(). This will only be called once after conn_connect returns non-zero success and will The caller serializes this with the send and connecting paths (xmit_* and conn_*). The transport is responsible for other serialization, including rds_recv_incoming(). This is called in process context but should try hard not to block.

Definition at line 410 of file rds.h.

#define RDS_TRANS_IWARP   1

Definition at line 411 of file rds.h.

#define RDS_TRANS_TCP   2

Definition at line 412 of file rds.h.

Typedef Documentation

typedef int(* is_acked_func)(struct rds_message *rm, uint64_t ack)

Definition at line 723 of file rds.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
RDS_CONN_DOWN 
RDS_CONN_CONNECTING 
RDS_CONN_DISCONNECTING 
RDS_CONN_UP 
RDS_CONN_ERROR 

Definition at line 71 of file rds.h.

Function Documentation

__printf ( ,
 
)
void __rds_put_mr_final ( struct rds_mr mr)

Definition at line 119 of file rdma.c.

DECLARE_PER_CPU_SHARED_ALIGNED ( struct rds_statistics  ,
rds_stats   
)
void rds_atomic_free_op ( struct rm_atomic_op *  ao)

Definition at line 465 of file rdma.c.

void rds_atomic_send_complete ( struct rds_message rm,
int  wc_status 
)

Definition at line 458 of file send.c.

int rds_bind ( struct socket sock,
struct sockaddr uaddr,
int  addr_len 
)

Definition at line 163 of file bind.c.

void rds_clear_recv_queue ( struct rds_sock rs)

Definition at line 507 of file recv.c.

int rds_cmsg_atomic ( struct rds_sock rs,
struct rds_message rm,
struct cmsghdr cmsg 
)

Definition at line 766 of file rdma.c.

int rds_cmsg_rdma_args ( struct rds_sock rs,
struct rds_message rm,
struct cmsghdr cmsg 
)

Definition at line 546 of file rdma.c.

int rds_cmsg_rdma_dest ( struct rds_sock rs,
struct rds_message rm,
struct cmsghdr cmsg 
)

Definition at line 711 of file rdma.c.

int rds_cmsg_rdma_map ( struct rds_sock rs,
struct rds_message rm,
struct cmsghdr cmsg 
)

Definition at line 753 of file rdma.c.

void rds_cong_add_conn ( struct rds_connection conn)

Definition at line 183 of file cong.c.

void rds_cong_add_socket ( struct rds_sock )

Definition at line 316 of file cong.c.

void rds_cong_clear_bit ( struct rds_cong_map *  map,
__be16  port 
)

Definition at line 291 of file cong.c.

void rds_cong_exit ( void  )

Definition at line 377 of file cong.c.

int rds_cong_get_maps ( struct rds_connection conn)

Definition at line 203 of file cong.c.

void rds_cong_map_updated ( struct rds_cong_map *  map,
uint64_t   
)

Definition at line 231 of file cong.c.

void rds_cong_queue_updates ( struct rds_cong_map *  map)

Definition at line 214 of file cong.c.

void rds_cong_remove_conn ( struct rds_connection conn)

Definition at line 193 of file cong.c.

void rds_cong_remove_socket ( struct rds_sock )

Definition at line 326 of file cong.c.

void rds_cong_set_bit ( struct rds_cong_map *  map,
__be16  port 
)

Definition at line 277 of file cong.c.

struct rds_message* rds_cong_update_alloc ( struct rds_connection conn)
read

Definition at line 396 of file cong.c.

int rds_cong_updated_since ( unsigned long recent)

Definition at line 260 of file cong.c.

int rds_cong_wait ( struct rds_cong_map *  map,
__be16  port,
int  nonblock,
struct rds_sock rs 
)

Definition at line 346 of file cong.c.

void rds_conn_connect_if_down ( struct rds_connection conn)

Definition at line 553 of file connection.c.

struct rds_connection* rds_conn_create ( __be32  laddr,
__be32  faddr,
struct rds_transport trans,
gfp_t  gfp 
)
read

Definition at line 244 of file connection.c.

struct rds_connection* rds_conn_create_outgoing ( __be32  laddr,
__be32  faddr,
struct rds_transport trans,
gfp_t  gfp 
)
read

Definition at line 251 of file connection.c.

void rds_conn_destroy ( struct rds_connection conn)

Definition at line 321 of file connection.c.

void rds_conn_drop ( struct rds_connection conn)

Definition at line 542 of file connection.c.

void rds_conn_exit ( void  )

Definition at line 524 of file connection.c.

int rds_conn_init ( void  )

Definition at line 507 of file connection.c.

void rds_conn_shutdown ( struct rds_connection conn)

Definition at line 258 of file connection.c.

void rds_connect_complete ( struct rds_connection conn)

Definition at line 74 of file threads.c.

void rds_connect_worker ( struct work_struct )

Definition at line 140 of file threads.c.

struct rds_sock* rds_find_bound ( __be32  addr,
__be16  port 
)
read

Definition at line 94 of file bind.c.

void rds_for_each_conn_info ( struct socket sock,
unsigned int  len,
struct rds_info_iterator iter,
struct rds_info_lengths lens,
int(*)(struct rds_connection *, void *)  visitor,
size_t  item_len 
)

Definition at line 434 of file connection.c.

int rds_free_mr ( struct rds_sock rs,
char __user optval,
int  optlen 
)

Definition at line 356 of file rdma.c.

int rds_get_mr ( struct rds_sock rs,
char __user optval,
int  optlen 
)

Definition at line 315 of file rdma.c.

int rds_get_mr_for_dest ( struct rds_sock rs,
char __user optval,
int  optlen 
)

Definition at line 329 of file rdma.c.

void rds_inc_info_copy ( struct rds_incoming inc,
struct rds_info_iterator iter,
__be32  saddr,
__be32  daddr,
int  flip 
)

Definition at line 528 of file recv.c.

void rds_inc_init ( struct rds_incoming inc,
struct rds_connection conn,
__be32  saddr 
)

Definition at line 41 of file recv.c.

void rds_inc_put ( struct rds_incoming inc)

Definition at line 58 of file recv.c.

int rds_message_add_extension ( struct rds_header hdr,
unsigned int  type,
const void data,
unsigned int  len 
)

Definition at line 110 of file message.c.

int rds_message_add_rdma_dest_extension ( struct rds_header hdr,
u32  r_key,
u32  offset 
)

Definition at line 181 of file message.c.

void rds_message_addref ( struct rds_message rm)

Definition at line 47 of file message.c.

struct rds_message* rds_message_alloc ( unsigned int  nents,
gfp_t  gfp 
)
read

Definition at line 196 of file message.c.

struct scatterlist* rds_message_alloc_sgs ( struct rds_message rm,
int  nents 
)
read

Definition at line 220 of file message.c.

int rds_message_copy_from_user ( struct rds_message rm,
struct iovec first_iov,
size_t  total_len 
)

Definition at line 267 of file message.c.

int rds_message_inc_copy_to_user ( struct rds_incoming inc,
struct iovec first_iov,
size_t  size 
)

Definition at line 328 of file message.c.

void rds_message_inc_free ( struct rds_incoming inc)
struct rds_message* rds_message_map_pages ( unsigned long page_addrs,
unsigned int  total_len 
)
read

Definition at line 238 of file message.c.

int rds_message_next_extension ( struct rds_header hdr,
unsigned int pos,
void buf,
unsigned int buflen 
)

Definition at line 149 of file message.c.

void rds_message_populate_header ( struct rds_header hdr,
__be16  sport,
__be16  dport,
u64  seq 
)

Definition at line 99 of file message.c.

void rds_message_put ( struct rds_message rm)

Definition at line 82 of file message.c.

void rds_message_unmapped ( struct rds_message rm)

Definition at line 396 of file message.c.

void rds_message_wait ( struct rds_message rm)

Definition at line 390 of file message.c.

int rds_notify_queue_get ( struct rds_sock rs,
struct msghdr msg 
)

Definition at line 296 of file recv.c.

int rds_page_copy_user ( struct page page,
unsigned long  offset,
void __user ptr,
unsigned long  bytes,
int  to_user 
)

Definition at line 56 of file page.c.

void rds_page_exit ( void  )

Definition at line 207 of file page.c.

int rds_page_remainder_alloc ( struct scatterlist scat,
unsigned long  bytes,
gfp_t  gfp 
)

rds_page_remainder_alloc - build up regions of a message.

: Scatter list for message : the number of bytes needed. : the waiting behaviour of the allocation

is always ored with __GFP_HIGHMEM. Callers must be prepared to kmap the pages, etc.

If is at least a full page then this just returns a page from alloc_page().

If is a partial page then this stores the unused region of the page in a per-cpu structure. Future partial-page allocations may be satisfied from that cached region. This lets us waste less memory on small allocations with minimal complexity. It works because the transmit path passes read-only page regions down to devices. They hold a page reference until they are done with the region.

Definition at line 97 of file page.c.

void rds_queue_reconnect ( struct rds_connection conn)

Definition at line 114 of file threads.c.

void rds_rdma_drop_keys ( struct rds_sock rs)

Definition at line 129 of file rdma.c.

int rds_rdma_extra_size ( struct rds_rdma_args args)

Definition at line 509 of file rdma.c.

void rds_rdma_free_op ( struct rm_rdma_op *  ro)

Definition at line 443 of file rdma.c.

void rds_rdma_send_complete ( struct rds_message rm,
int  wc_status 
)

Definition at line 422 of file send.c.

void rds_rdma_unuse ( struct rds_sock rs,
u32  r_key,
int  force 
)

Definition at line 409 of file rdma.c.

void rds_recv_incoming ( struct rds_connection conn,
__be32  saddr,
__be32  daddr,
struct rds_incoming inc,
gfp_t  gfp 
)

Definition at line 157 of file recv.c.

void rds_recv_worker ( struct work_struct )

Definition at line 182 of file threads.c.

int rds_recvmsg ( struct kiocb iocb,
struct socket sock,
struct msghdr msg,
size_t  size,
int  msg_flags 
)

Definition at line 398 of file recv.c.

void rds_remove_bound ( struct rds_sock rs)

Definition at line 144 of file bind.c.

void rds_send_drop_acked ( struct rds_connection conn,
u64  ack,
is_acked_func  is_acked 
)

Definition at line 645 of file send.c.

void rds_send_drop_to ( struct rds_sock rs,
struct sockaddr_in dest 
)

Definition at line 673 of file send.c.

struct rds_message* rds_send_get_message ( struct rds_connection ,
struct rm_rdma_op *   
)
read

Definition at line 524 of file send.c.

int rds_send_pong ( struct rds_connection conn,
__be16  dport 
)

Definition at line 1089 of file send.c.

void rds_send_reset ( struct rds_connection conn)

Definition at line 64 of file send.c.

void rds_send_worker ( struct work_struct )

Definition at line 160 of file threads.c.

int rds_send_xmit ( struct rds_connection conn)

Definition at line 135 of file send.c.

int rds_sendmsg ( struct kiocb iocb,
struct socket sock,
struct msghdr msg,
size_t  payload_len 
)

Definition at line 920 of file send.c.

void rds_shutdown_worker ( struct work_struct )

Definition at line 204 of file threads.c.

void rds_sock_addref ( struct rds_sock rs)

Definition at line 450 of file af_rds.c.

void rds_sock_put ( struct rds_sock rs)

Definition at line 455 of file af_rds.c.

void rds_stats_exit ( void  )

Definition at line 142 of file stats.c.

void rds_stats_info_copy ( struct rds_info_iterator iter,
uint64_t values,
const char *const names,
size_t  nr 
)

Definition at line 81 of file stats.c.

int rds_stats_init ( void  )

Definition at line 147 of file stats.c.

char* rds_str_array ( char **  array,
size_t  elements,
size_t  index 
)

Definition at line 43 of file af_rds.c.

void rds_sysctl_exit ( void  )

Definition at line 95 of file sysctl.c.

int rds_sysctl_init ( void  )

Definition at line 101 of file sysctl.c.

void rds_threads_exit ( void  )

Definition at line 211 of file threads.c.

int rds_threads_init ( void  )

Definition at line 216 of file threads.c.

void rds_trans_exit ( void  )
struct rds_transport* rds_trans_get_preferred ( __be32  addr)
read

Definition at line 80 of file transport.c.

int rds_trans_init ( void  )
void rds_trans_put ( struct rds_transport trans)

Definition at line 74 of file transport.c.

int rds_trans_register ( struct rds_transport trans)

Definition at line 43 of file transport.c.

unsigned int rds_trans_stats_info_copy ( struct rds_info_iterator iter,
unsigned int  avail 
)

Definition at line 110 of file transport.c.

void rds_trans_unregister ( struct rds_transport trans)

Definition at line 63 of file transport.c.

void rds_wake_sk_sleep ( struct rds_sock rs)

Definition at line 118 of file af_rds.c.

Variable Documentation

wait_queue_head_t rds_poll_waitq
unsigned int rds_sysctl_max_unacked_bytes

Definition at line 48 of file sysctl.c.

unsigned int rds_sysctl_max_unacked_packets

Definition at line 47 of file sysctl.c.

unsigned int rds_sysctl_ping_enable

Definition at line 50 of file sysctl.c.

unsigned long rds_sysctl_reconnect_max_jiffies

Definition at line 45 of file sysctl.c.

unsigned long rds_sysctl_reconnect_min_jiffies

Definition at line 44 of file sysctl.c.

unsigned long rds_sysctl_sndbuf_default
unsigned long rds_sysctl_sndbuf_max
unsigned long rds_sysctl_sndbuf_min
unsigned long rds_sysctl_trace_flags
unsigned int rds_sysctl_trace_level

Definition at line 71 of file threads.c.