Commit bad5b6e2 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by David S. Miller

docs: networking: convert rds.txt to ReST

- add SPDX header;
- add a document title;
- mark code blocks and literals as such;
- mark tables as such;
- mark lists as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8c6e1720
...@@ -97,6 +97,7 @@ Contents: ...@@ -97,6 +97,7 @@ Contents:
proc_net_tcp proc_net_tcp
radiotap-headers radiotap-headers
ray_cs ray_cs
rds
.. only:: subproject and html .. only:: subproject and html
......
.. SPDX-License-Identifier: GPL-2.0
==
RDS
===
Overview Overview
======== ========
...@@ -24,6 +29,7 @@ as IB. ...@@ -24,6 +29,7 @@ as IB.
The high-level semantics of RDS from the application's point of view are The high-level semantics of RDS from the application's point of view are
* Addressing * Addressing
RDS uses IPv4 addresses and 16bit port numbers to identify RDS uses IPv4 addresses and 16bit port numbers to identify
the end point of a connection. All socket operations that involve the end point of a connection. All socket operations that involve
passing addresses between kernel and user space generally passing addresses between kernel and user space generally
...@@ -38,6 +44,7 @@ The high-level semantics of RDS from the application's point of view are ...@@ -38,6 +44,7 @@ The high-level semantics of RDS from the application's point of view are
protocol. protocol.
* Socket interface * Socket interface
RDS sockets work *mostly* as you would expect from a BSD RDS sockets work *mostly* as you would expect from a BSD
socket. The next section will cover the details. At any rate, socket. The next section will cover the details. At any rate,
all I/O is performed through the standard BSD socket API. all I/O is performed through the standard BSD socket API.
...@@ -53,6 +60,7 @@ The high-level semantics of RDS from the application's point of view are ...@@ -53,6 +60,7 @@ The high-level semantics of RDS from the application's point of view are
doesn't move to a different transport. doesn't move to a different transport.
* sysctls * sysctls
RDS supports a number of sysctls in /proc/sys/net/rds RDS supports a number of sysctls in /proc/sys/net/rds
...@@ -147,8 +155,7 @@ Socket Interface ...@@ -147,8 +155,7 @@ Socket Interface
operation. In this case, it would use RDS_CANCEL_SENT_TO to operation. In this case, it would use RDS_CANCEL_SENT_TO to
nuke any pending messages. nuke any pending messages.
setsockopt(fd, SOL_RDS, SO_RDS_TRANSPORT, (int *)&transport ..) ``setsockopt(fd, SOL_RDS, SO_RDS_TRANSPORT, (int *)&transport ..), getsockopt(fd, SOL_RDS, SO_RDS_TRANSPORT, (int *)&transport ..)``
getsockopt(fd, SOL_RDS, SO_RDS_TRANSPORT, (int *)&transport ..)
Set or read an integer defining the underlying Set or read an integer defining the underlying
encapsulating transport to be used for RDS packets on the encapsulating transport to be used for RDS packets on the
socket. When setting the option, integer argument may be socket. When setting the option, integer argument may be
...@@ -180,7 +187,9 @@ RDS Protocol ...@@ -180,7 +187,9 @@ RDS Protocol
Message header Message header
The message header is a 'struct rds_header' (see rds.h): The message header is a 'struct rds_header' (see rds.h):
Fields: Fields:
h_sequence: h_sequence:
per-packet sequence number per-packet sequence number
h_ack: h_ack:
...@@ -192,9 +201,14 @@ RDS Protocol ...@@ -192,9 +201,14 @@ RDS Protocol
h_dport: h_dport:
destination port destination port
h_flags: h_flags:
CONG_BITMAP - this is a congestion update bitmap Can be:
ACK_REQUIRED - receiver must ack this packet
RETRANSMITTED - packet has previously been sent ============= ==================================
CONG_BITMAP this is a congestion update bitmap
ACK_REQUIRED receiver must ack this packet
RETRANSMITTED packet has previously been sent
============= ==================================
h_credit: h_credit:
indicate to other end of connection that indicate to other end of connection that
it has more credits available (i.e. there is it has more credits available (i.e. there is
...@@ -260,7 +274,7 @@ RDS Protocol ...@@ -260,7 +274,7 @@ RDS Protocol
RDS Transport Layer RDS Transport Layer
================== ===================
As mentioned above, RDS is not IB-specific. Its code is divided As mentioned above, RDS is not IB-specific. Its code is divided
into a general RDS layer and a transport layer. into a general RDS layer and a transport layer.
...@@ -281,19 +295,25 @@ RDS Kernel Structures ...@@ -281,19 +295,25 @@ RDS Kernel Structures
be sent and sets header fields as needed, based on the socket API. be sent and sets header fields as needed, based on the socket API.
This is then queued for the individual connection and sent by the This is then queued for the individual connection and sent by the
connection's transport. connection's transport.
struct rds_incoming struct rds_incoming
a generic struct referring to incoming data that can be handed from a generic struct referring to incoming data that can be handed from
the transport to the general code and queued by the general code the transport to the general code and queued by the general code
while the socket is awoken. It is then passed back to the transport while the socket is awoken. It is then passed back to the transport
code to handle the actual copy-to-user. code to handle the actual copy-to-user.
struct rds_socket struct rds_socket
per-socket information per-socket information
struct rds_connection struct rds_connection
per-connection information per-connection information
struct rds_transport struct rds_transport
pointers to transport-specific functions pointers to transport-specific functions
struct rds_statistics struct rds_statistics
non-transport-specific statistics non-transport-specific statistics
struct rds_cong_map struct rds_cong_map
wraps the raw congestion bitmap, contains rbnode, waitq, etc. wraps the raw congestion bitmap, contains rbnode, waitq, etc.
...@@ -317,53 +337,58 @@ The send path ...@@ -317,53 +337,58 @@ The send path
============= =============
rds_sendmsg() rds_sendmsg()
struct rds_message built from incoming data - struct rds_message built from incoming data
CMSGs parsed (e.g. RDMA ops) - CMSGs parsed (e.g. RDMA ops)
transport connection alloced and connected if not already - transport connection alloced and connected if not already
rds_message placed on send queue - rds_message placed on send queue
send worker awoken - send worker awoken
rds_send_worker() rds_send_worker()
calls rds_send_xmit() until queue is empty - calls rds_send_xmit() until queue is empty
rds_send_xmit() rds_send_xmit()
transmits congestion map if one is pending - transmits congestion map if one is pending
may set ACK_REQUIRED - may set ACK_REQUIRED
calls transport to send either non-RDMA or RDMA message - calls transport to send either non-RDMA or RDMA message
(RDMA ops never retransmitted) (RDMA ops never retransmitted)
rds_ib_xmit() rds_ib_xmit()
allocs work requests from send ring - allocs work requests from send ring
adds any new send credits available to peer (h_credits) - adds any new send credits available to peer (h_credits)
maps the rds_message's sg list - maps the rds_message's sg list
piggybacks ack - piggybacks ack
populates work requests - populates work requests
post send to connection's queue pair - post send to connection's queue pair
The recv path The recv path
============= =============
rds_ib_recv_cq_comp_handler() rds_ib_recv_cq_comp_handler()
looks at write completions - looks at write completions
unmaps recv buffer from device - unmaps recv buffer from device
no errors, call rds_ib_process_recv() - no errors, call rds_ib_process_recv()
refill recv ring - refill recv ring
rds_ib_process_recv() rds_ib_process_recv()
validate header checksum - validate header checksum
copy header to rds_ib_incoming struct if start of a new datagram - copy header to rds_ib_incoming struct if start of a new datagram
add to ibinc's fraglist - add to ibinc's fraglist
if competed datagram: - if competed datagram:
update cong map if datagram was cong update - update cong map if datagram was cong update
call rds_recv_incoming() otherwise - call rds_recv_incoming() otherwise
note if ack is required - note if ack is required
rds_recv_incoming() rds_recv_incoming()
drop duplicate packets - drop duplicate packets
respond to pings - respond to pings
find the sock associated with this datagram - find the sock associated with this datagram
add to sock queue - add to sock queue
wake up sock - wake up sock
do some congestion calculations - do some congestion calculations
rds_recvmsg rds_recvmsg
copy data into user iovec - copy data into user iovec
handle CMSGs - handle CMSGs
return to application - return to application
Multipath RDS (mprds) Multipath RDS (mprds)
===================== =====================
......
...@@ -14219,7 +14219,7 @@ L: linux-rdma@vger.kernel.org ...@@ -14219,7 +14219,7 @@ L: linux-rdma@vger.kernel.org
L: rds-devel@oss.oracle.com (moderated for non-subscribers) L: rds-devel@oss.oracle.com (moderated for non-subscribers)
S: Supported S: Supported
W: https://oss.oracle.com/projects/rds/ W: https://oss.oracle.com/projects/rds/
F: Documentation/networking/rds.txt F: Documentation/networking/rds.rst
F: net/rds/ F: net/rds/
RDT - RESOURCE ALLOCATION RDT - RESOURCE ALLOCATION
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment