Skip to content

Commit 242b233

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma updates from Jason Gunthorpe: "A more active cycle than most of the recent past, with a few large, long discussed works this time. The RNBD block driver has been posted for nearly two years now, and flowing through RDMA due to it also introducing a new ULP. The removal of FMR has been a recurring discussion theme for a long time. And the usual smattering of features and bug fixes. Summary: - Various small driver bugs fixes in rxe, mlx5, hfi1, and efa - Continuing driver cleanups in bnxt_re, hns - Big cleanup of mlx5 QP creation flows - More consistent use of src port and flow label when LAG is used and a mlx5 implementation - Additional set of cleanups for IB CM - 'RNBD' network block driver and target. This is a network block RDMA device specific to ionos's cloud environment. It brings strong multipath and resiliency capabilities. - Accelerated IPoIB for HFI1 - QP/WQ/SRQ ioctl migration for uverbs, and support for multiple async fds - Support for exchanging the new IBTA defiend ECE data during RDMA CM exchanges - Removal of the very old and insecure FMR interface from all ULPs and drivers. FRWR should be preferred for at least a decade now" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (247 commits) RDMA/cm: Spurious WARNING triggered in cm_destroy_id() RDMA/mlx5: Return ECE DC support RDMA/mlx5: Don't rely on FW to set zeros in ECE response RDMA/mlx5: Return an error if copy_to_user fails IB/hfi1: Use free_netdev() in hfi1_netdev_free() RDMA/hns: Uninitialized variable in modify_qp_init_to_rtr() RDMA/core: Move and rename trace_cm_id_create() IB/hfi1: Fix hfi1_netdev_rx_init() error handling RDMA: Remove 'max_map_per_fmr' RDMA: Remove 'max_fmr' RDMA/core: Remove FMR device ops RDMA/rdmavt: Remove FMR memory registration RDMA/mthca: Remove FMR support for memory registration RDMA/mlx4: Remove FMR support for memory registration RDMA/i40iw: Remove FMR leftovers RDMA/bnxt_re: Remove FMR leftovers RDMA/mlx5: Remove FMR leftovers RDMA/core: Remove FMR pool API RDMA/rds: Remove FMR support for memory registration RDMA/srp: Remove support for FMR memory registration ...
2 parents 3f7e823 + fba97dc commit 242b233

244 files changed

Lines changed: 24030 additions & 11025 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
What: /sys/block/rnbd<N>/rnbd/unmap_device
2+
Date: Feb 2020
3+
KernelVersion: 5.7
4+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
5+
Description: To unmap a volume, "normal" or "force" has to be written to:
6+
/sys/block/rnbd<N>/rnbd/unmap_device
7+
8+
When "normal" is used, the operation will fail with EBUSY if any process
9+
is using the device. When "force" is used, the device is also unmapped
10+
when device is in use. All I/Os that are in progress will fail.
11+
12+
Example:
13+
14+
# echo "normal" > /sys/block/rnbd0/rnbd/unmap_device
15+
16+
What: /sys/block/rnbd<N>/rnbd/state
17+
Date: Feb 2020
18+
KernelVersion: 5.7
19+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
20+
Description: The file contains the current state of the block device. The state file
21+
returns "open" when the device is successfully mapped from the server
22+
and accepting I/O requests. When the connection to the server gets
23+
disconnected in case of an error (e.g. link failure), the state file
24+
returns "closed" and all I/O requests submitted to it will fail with -EIO.
25+
26+
What: /sys/block/rnbd<N>/rnbd/session
27+
Date: Feb 2020
28+
KernelVersion: 5.7
29+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
30+
Description: RNBD uses RTRS session to transport the data between client and
31+
server. The entry "session" contains the name of the session, that
32+
was used to establish the RTRS session. It's the same name that
33+
was passed as server parameter to the map_device entry.
34+
35+
What: /sys/block/rnbd<N>/rnbd/mapping_path
36+
Date: Feb 2020
37+
KernelVersion: 5.7
38+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
39+
Description: Contains the path that was passed as "device_path" to the map_device
40+
operation.
41+
42+
What: /sys/block/rnbd<N>/rnbd/access_mode
43+
Date: Feb 2020
44+
KernelVersion: 5.7
45+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
46+
Description: Contains the device access mode: ro, rw or migration.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
What: /sys/class/rnbd-client
2+
Date: Feb 2020
3+
KernelVersion: 5.7
4+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
5+
Description: Provide information about RNBD-client.
6+
All sysfs files that are not read-only provide the usage information on read:
7+
8+
Example:
9+
# cat /sys/class/rnbd-client/ctl/map_device
10+
11+
> Usage: echo "sessname=<name of the rtrs session> path=<[srcaddr,]dstaddr>
12+
> [path=<[srcaddr,]dstaddr>] device_path=<full path on remote side>
13+
> [access_mode=<ro|rw|migration>] > map_device
14+
>
15+
> addr ::= [ ip:<ipv4> | ip:<ipv6> | gid:<gid> ]
16+
17+
What: /sys/class/rnbd-client/ctl/map_device
18+
Date: Feb 2020
19+
KernelVersion: 5.7
20+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
21+
Description: Expected format is the following:
22+
23+
sessname=<name of the rtrs session>
24+
path=<[srcaddr,]dstaddr> [path=<[srcaddr,]dstaddr> ...]
25+
device_path=<full path on remote side>
26+
[access_mode=<ro|rw|migration>]
27+
28+
Where:
29+
30+
sessname: accepts a string not bigger than 256 chars, which identifies
31+
a given session on the client and on the server.
32+
I.e. "clt_hostname-srv_hostname" could be a natural choice.
33+
34+
path: describes a connection between the client and the server by
35+
specifying destination and, when required, the source address.
36+
The addresses are to be provided in the following format:
37+
38+
ip:<IPv6>
39+
ip:<IPv4>
40+
gid:<GID>
41+
42+
for example:
43+
44+
path=ip:10.0.0.66
45+
The single addr is treated as the destination.
46+
The connection will be established to this server from any client IP address.
47+
48+
path=ip:10.0.0.66,ip:10.0.1.66
49+
First addr is the source address and the second is the destination.
50+
51+
If multiple "path=" options are specified multiple connection
52+
will be established and data will be sent according to
53+
the selected multipath policy (see RTRS mp_policy sysfs entry description).
54+
55+
device_path: Path to the block device on the server side. Path is specified
56+
relative to the directory on server side configured in the
57+
'dev_search_path' module parameter of the rnbd_server.
58+
The rnbd_server prepends the <device_path> received from client
59+
with <dev_search_path> and tries to open the
60+
<dev_search_path>/<device_path> block device. On success,
61+
a /dev/rnbd<N> device file, a /sys/block/rnbd_client/rnbd<N>/
62+
directory and an entry in /sys/class/rnbd-client/ctl/devices
63+
will be created.
64+
65+
If 'dev_search_path' contains '%SESSNAME%', then each session can
66+
have different devices namespace, e.g. server was configured with
67+
the following parameter "dev_search_path=/run/rnbd-devs/%SESSNAME%",
68+
client has this string "sessname=blya device_path=sda", then server
69+
will try to open: /run/rnbd-devs/blya/sda.
70+
71+
access_mode: the access_mode parameter specifies if the device is to be
72+
mapped as "ro" read-only or "rw" read-write. The server allows
73+
a device to be exported in rw mode only once. The "migration"
74+
access mode has to be specified if a second mapping in read-write
75+
mode is desired.
76+
77+
By default "rw" is used.
78+
79+
Exit Codes:
80+
81+
If the device is already mapped it will fail with EEXIST. If the input
82+
has an invalid format it will return EINVAL. If the device path cannot
83+
be found on the server, it will fail with ENOENT.
84+
85+
Finding device file after mapping
86+
---------------------------------
87+
88+
After mapping, the device file can be found by:
89+
o The symlink /sys/class/rnbd-client/ctl/devices/<device_id>
90+
points to /sys/block/<dev-name>. The last part of the symlink destination
91+
is the same as the device name. By extracting the last part of the
92+
path the path to the device /dev/<dev-name> can be build.
93+
94+
o /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>/dev)
95+
96+
How to find the <device_id> of the device is described on the next
97+
section.
98+
99+
What: /sys/class/rnbd-client/ctl/devices/
100+
Date: Feb 2020
101+
KernelVersion: 5.7
102+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
103+
Description: For each device mapped on the client a new symbolic link is created as
104+
/sys/class/rnbd-client/ctl/devices/<device_id>, which points
105+
to the block device created by rnbd (/sys/block/rnbd<N>/).
106+
The <device_id> of each device is created as follows:
107+
108+
- If the 'device_path' provided during mapping contains slashes ("/"),
109+
they are replaced by exclamation mark ("!") and used as as the
110+
<device_id>. Otherwise, the <device_id> will be the same as the
111+
"device_path" provided.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
What: /sys/class/rnbd-server
2+
Date: Feb 2020
3+
KernelVersion: 5.7
4+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
5+
Description: provide information about RNBD-server.
6+
7+
What: /sys/class/rnbd-server/ctl/
8+
Date: Feb 2020
9+
KernelVersion: 5.7
10+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
11+
Description: When a client maps a device, a directory entry with the name of the
12+
block device is created under /sys/class/rnbd-server/ctl/devices/.
13+
14+
What: /sys/class/rnbd-server/ctl/devices/<device_name>/block_dev
15+
Date: Feb 2020
16+
KernelVersion: 5.7
17+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
18+
Description: Is a symlink to the sysfs entry of the exported device.
19+
20+
Example:
21+
block_dev -> ../../../../class/block/ram0
22+
23+
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/
24+
Date: Feb 2020
25+
KernelVersion: 5.7
26+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
27+
Description: For each client a particular device is exported to, following directory will be
28+
created:
29+
30+
/sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/
31+
32+
When the device is unmapped by that client, the directory will be removed.
33+
34+
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/read_only
35+
Date: Feb 2020
36+
KernelVersion: 5.7
37+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
38+
Description: Contains '1' if device is mapped read-only, otherwise '0'.
39+
40+
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/mapping_path
41+
Date: Feb 2020
42+
KernelVersion: 5.7
43+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
44+
Description: Contains the relative device path provided by the user during mapping.
45+
46+
What: /sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/access_mode
47+
Date: Feb 2020
48+
KernelVersion: 5.7
49+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
50+
Description: Contains the device access mode: ro, rw or migration.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
What: /sys/class/rtrs-client
2+
Date: Feb 2020
3+
KernelVersion: 5.7
4+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
5+
Description: When a user of RTRS API creates a new session, a directory entry with
6+
the name of that session is created under /sys/class/rtrs-client/<session-name>/
7+
8+
What: /sys/class/rtrs-client/<session-name>/add_path
9+
Date: Feb 2020
10+
KernelVersion: 5.7
11+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
12+
Description: RW, adds a new path (connection) to an existing session. Expected format is the
13+
following:
14+
15+
<[source addr,]destination addr>
16+
*addr ::= [ ip:<ipv4|ipv6> | gid:<gid> ]
17+
18+
What: /sys/class/rtrs-client/<session-name>/max_reconnect_attempts
19+
Date: Feb 2020
20+
KernelVersion: 5.7
21+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
22+
Description: Maximum number reconnect attempts the client should make before giving up
23+
after connection breaks unexpectedly.
24+
25+
What: /sys/class/rtrs-client/<session-name>/mp_policy
26+
Date: Feb 2020
27+
KernelVersion: 5.7
28+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
29+
Description: Multipath policy specifies which path should be selected on each IO:
30+
31+
round-robin (0):
32+
select path in per CPU round-robin manner.
33+
34+
min-inflight (1):
35+
select path with minimum inflights.
36+
37+
What: /sys/class/rtrs-client/<session-name>/paths/
38+
Date: Feb 2020
39+
KernelVersion: 5.7
40+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
41+
Description: Each path belonging to a given session is listed here by its source and
42+
destination address. When a new path is added to a session by writing to
43+
the "add_path" entry, a directory <src@dst> is created.
44+
45+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/state
46+
Date: Feb 2020
47+
KernelVersion: 5.7
48+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
49+
Description: RO, Contains "connected" if the session is connected to the peer and fully
50+
functional. Otherwise the file contains "disconnected"
51+
52+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/reconnect
53+
Date: Feb 2020
54+
KernelVersion: 5.7
55+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
56+
Description: Write "1" to the file in order to reconnect the path.
57+
Operation is blocking and returns 0 if reconnect was successful.
58+
59+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/disconnect
60+
Date: Feb 2020
61+
KernelVersion: 5.7
62+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
63+
Description: Write "1" to the file in order to disconnect the path.
64+
Operation blocks until RTRS path is disconnected.
65+
66+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/remove_path
67+
Date: Feb 2020
68+
KernelVersion: 5.7
69+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
70+
Description: Write "1" to the file in order to disconnected and remove the path
71+
from the session. Operation blocks until the path is disconnected
72+
and removed from the session.
73+
74+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/hca_name
75+
Date: Feb 2020
76+
KernelVersion: 5.7
77+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
78+
Description: RO, Contains the the name of HCA the connection established on.
79+
80+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/hca_port
81+
Date: Feb 2020
82+
KernelVersion: 5.7
83+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
84+
Description: RO, Contains the port number of active port traffic is going through.
85+
86+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/src_addr
87+
Date: Feb 2020
88+
KernelVersion: 5.7
89+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
90+
Description: RO, Contains the source address of the path
91+
92+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/dst_addr
93+
Date: Feb 2020
94+
KernelVersion: 5.7
95+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
96+
Description: RO, Contains the destination address of the path
97+
98+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/reset_all
99+
Date: Feb 2020
100+
KernelVersion: 5.7
101+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
102+
Description: RW, Read will return usage help, write 0 will clear all the statistics.
103+
104+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/cpu_migration
105+
Date: Feb 2020
106+
KernelVersion: 5.7
107+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
108+
Description: RTRS expects that each HCA IRQ is pinned to a separate CPU. If it's
109+
not the case, the processing of an I/O response could be processed on a
110+
different CPU than where it was originally submitted. This file shows
111+
how many interrupts where generated on a non expected CPU.
112+
"from:" is the CPU on which the IRQ was expected, but not generated.
113+
"to:" is the CPU on which the IRQ was generated, but not expected.
114+
115+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/reconnects
116+
Date: Feb 2020
117+
KernelVersion: 5.7
118+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
119+
Description: Contains 2 unsigned int values, the first one records number of successful
120+
reconnects in the path lifetime, the second one records number of failed
121+
reconnects in the path lifetime.
122+
123+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/rdma
124+
Date: Feb 2020
125+
KernelVersion: 5.7
126+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
127+
Description: Contains statistics regarding rdma operations and inflight operations.
128+
The output consists of 6 values:
129+
130+
<read-count> <read-total-size> <write-count> <write-total-size> \
131+
<inflights> <failovered>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
What: /sys/class/rtrs-server
2+
Date: Feb 2020
3+
KernelVersion: 5.7
4+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
5+
Description: When a user of RTRS API creates a new session on a client side, a
6+
directory entry with the name of that session is created in here.
7+
8+
What: /sys/class/rtrs-server/<session-name>/paths/
9+
Date: Feb 2020
10+
KernelVersion: 5.7
11+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
12+
Description: When new path is created by writing to "add_path" entry on client side,
13+
a directory entry named as <source address>@<destination address> is created
14+
on server.
15+
16+
What: /sys/class/rtrs-server/<session-name>/paths/<src@dst>/disconnect
17+
Date: Feb 2020
18+
KernelVersion: 5.7
19+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
20+
Description: When "1" is written to the file, the RTRS session is being disconnected.
21+
Operations is non-blocking and returns control immediately to the caller.
22+
23+
What: /sys/class/rtrs-server/<session-name>/paths/<src@dst>/hca_name
24+
Date: Feb 2020
25+
KernelVersion: 5.7
26+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
27+
Description: RO, Contains the the name of HCA the connection established on.
28+
29+
What: /sys/class/rtrs-server/<session-name>/paths/<src@dst>/hca_port
30+
Date: Feb 2020
31+
KernelVersion: 5.7
32+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
33+
Description: RO, Contains the port number of active port traffic is going through.
34+
35+
What: /sys/class/rtrs-server/<session-name>/paths/<src@dst>/src_addr
36+
Date: Feb 2020
37+
KernelVersion: 5.7
38+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
39+
Description: RO, Contains the source address of the path
40+
41+
What: /sys/class/rtrs-server/<session-name>/paths/<src@dst>/dst_addr
42+
Date: Feb 2020
43+
KernelVersion: 5.7
44+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
45+
Description: RO, Contains the destination address of the path
46+
47+
What: /sys/class/rtrs-server/<session-name>/paths/<src@dst>/stats/rdma
48+
Date: Feb 2020
49+
KernelVersion: 5.7
50+
Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
51+
Description: Contains statistics regarding rdma operations and inflight operations.
52+
The output consists of 5 values:
53+
<read-count> <read-total-size> <write-count> <write-total-size> <inflights>

0 commit comments

Comments
 (0)