path: root/net/rds/transport.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-18net: rds: fix coding style issuesJoshua Houghton1-2/+1
Fix coding style issues in the following files: ib_cm.c: add space loop.c: convert spaces to tabs sysctl.c: add space tcp.h: convert spaces to tabs tcp_connect.c:remove extra indentation in switch statement tcp_recv.c: convert spaces to tabs tcp_send.c: convert spaces to tabs transport.c: move brace up one line on for statement Signed-off-by: Joshua Houghton <> Acked-by: Santosh Shilimkar <> Signed-off-by: David S. Miller <>
2015-08-07RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than ↵Sowmini Varadhan1-2/+2
init_net Open the sockets calling sock_create_kern() with the correct struct net pointer, and use that struct net pointer when verifying the address passed to rds_bind(). Signed-off-by: Sowmini Varadhan <> Signed-off-by: David S. Miller <>
2015-07-03net-RDS: Delete an unnecessary check before the function call "module_put"Markus Elfring1-1/+1
The module_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <> Signed-off-by: David S. Miller <>
2015-05-31net/rds: Add setsockopt support for SO_RDS_TRANSPORTSowmini Varadhan1-0/+21
An application may deterministically attach the underlying transport for a PF_RDS socket by invoking setsockopt(2) with the SO_RDS_TRANSPORT option at the SOL_RDS level. The integer argument to setsockopt must be one of the RDS_TRANS_* transport types, e.g., RDS_TRANS_TCP. The option must be specified before invoking bind(2) on the socket, and may only be used once on the socket. An attempt to set the option on a bound socket, or to invoke the option after a successful SO_RDS_TRANSPORT attachment, will return EOPNOTSUPP. Signed-off-by: Sowmini Varadhan <> Signed-off-by: David S. Miller <>
2010-09-08RDS: have sockets get transport module referencesZach Brown1-5/+14
Right now there's nothing to stop the various paths that use rs->rs_transport from racing with rmmod and executing freed transport code. The simple fix is to have binding to a transport also hold a reference to the transport's module, removing this class of races. We already had an unused t_owner field which was set for the modular transports and which wasn't set for the built-in loop transport. Signed-off-by: Zach Brown <>
2009-08-23RDS: Track transports via an array, not a listAndy Grover1-10/+19
Now that transports can be loaded in arbitrary order, it is important for rds_trans_get_preferred() to look for them in a particular order, instead of walking the list until it finds a transport that works for a given address. Now, each transport registers for a specific transport slot, and these are ordered so that preferred transports come first, and then if they are not loaded, other transports are queried. Signed-off-by: Andy Grover <> Signed-off-by: David S. Miller <>
2009-08-23RDS: Export symbols from core RDSAndy Grover1-0/+2
Now that rdma and tcp transports will be modularized, we need to export a number of functions so they can call them. Signed-off-by: Andy Grover <> Signed-off-by: David S. Miller <>
2009-02-26RDS: Transport codeAndy Grover1-0/+117
RDS supports multiple transports. While this initial submission only supports Infiniband transport, this abstraction allows others to be added. We're working on an iWARP transport, and also see UDP over DCB as another possibility. This code handles transport registration. Signed-off-by: Andy Grover <> Signed-off-by: David S. Miller <>