13 Apr, 2019
1 commit
-
For nonblocking sockets move the kernel_connect() from the connect
worker into the initial smc_connect part to return kernel_connect()
errors other than -EINPROGRESS to user space.Reviewed-by: Karsten Graul
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
22 Feb, 2019
1 commit
-
smc_poll() returns with mask bit EPOLLPRI if the connection urg_state
is SMC_URG_VALID. Since SMC_URG_VALID is zero, smc_poll signals
EPOLLPRI errorneously if called in state SMC_INIT before the connection
is created, for instance in a non-blocking connect scenario.This patch switches to non-zero values for the urg states.
Reviewed-by: Karsten Graul
Fixes: de8474eb9d50 ("net/smc: urgent data support")
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
19 Dec, 2018
1 commit
-
clcsock can be released while kernel_accept() references it in TCP
listen worker. Also, clcsock needs to wake up before released if TCP
fallback is used and the clcsock is blocked by accept. Add a lock to
safely release clcsock and call kernel_sock_shutdown() to wake up
clcsock from accept in smc_release().Reported-by: syzbot+0bf2e01269f1274b4b03@syzkaller.appspotmail.com
Reported-by: syzbot+e3132895630f957306bc@syzkaller.appspotmail.com
Signed-off-by: Myungho Jung
Signed-off-by: David S. Miller
26 Jul, 2018
1 commit
-
Remember the fallback reason code and the peer diagnosis code for
smc sockets, and provide them in smc_diag.c to the netlink interface.
And add more detailed reason codes.Signed-off-by: Karsten Graul
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
03 Jul, 2018
1 commit
-
Simple overlapping changes in stmmac driver.
Adjust skb_gro_flush_final_remcsum function signature to make GRO list
changes in net-next, as per Stephen Rothwell's example merge
resolution.Signed-off-by: David S. Miller
30 Jun, 2018
2 commits
-
The data transfer and CDC message headers differ in SMC-R and SMC-D.
This patch adds support for the SMC-D data transfer to the existing SMC
code. It consists of the following:* SMC-D CDC support
* SMC-D tx support
* SMC-D rx supportThe CDC header is stored at the beginning of the receive buffer. Thus, a
rx_offset variable is added for the CDC header offset within the buffer
(0 for SMC-R).Signed-off-by: Hans Wippel
Signed-off-by: Ursula Braun
Suggested-by: Thomas Richter
Signed-off-by: David S. Miller -
For SMC it is important to know the current port state of RoCE devices.
Monitoring port states has been triggered, when a RoCE device was added
to the pnet table. To support future alternatives to the pnet table the
monitoring of ports is made independent of the existence of a pnet table.
It starts once the smc_ib_device is established.Due to this change smc_ib_remember_port_attr() is now a local function
and shuffling its location and the location of its used functions
makes any forward references obsolete.And the duplicate SMC_MAX_PORTS definition is removed.
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
28 Jun, 2018
1 commit
-
The recent poll change may lead to stalls for non-blocking connecting
SMC sockets, since sock_poll_wait is no longer performed on the
internal CLC socket, but on the outer SMC socket. kernel_connect() on
the internal CLC socket returns with -EINPROGRESS, but the wake up
logic does not work in all cases. If the internal CLC socket is still
in state TCP_SYN_SENT when polled, sock_poll_wait() from sock_poll()
does not sleep. It is supposed to sleep till the state of the internal
CLC socket switches to TCP_ESTABLISHED.This problem triggered a redesign of the SMC nonblocking connect logic.
This patch introduces a connect worker covering all connect steps
followed by a wake up of socket waiters. It allows to get rid of all
delays and locks in smc_poll().Fixes: c0129a061442 ("smc: convert to ->poll_mask")
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
24 May, 2018
1 commit
-
Add support for out of band data send and receive.
Signed-off-by: Stefan Raspl
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
19 May, 2018
4 commits
-
SMC connection and buffer handling belong to smc_core. So, this patch
moves this code from smc.h to smc_core.Signed-off-by: Hans Wippel
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
Currently, the write offset within the RMB is calculated on each write
operation although it is fixed for each connection. With this patch, the
offset is calculated once and stored in a connection specific variable.Signed-off-by: Hans Wippel
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
The connection index is actually a RMBE index. So, this patch changes
the name accordingly.Signed-off-by: Hans Wippel
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
In addition to the buffer references, SMC currently stores the sizes of
the receive and send buffers in each connection as separate variables.
This patch introduces a buffer length variable in the common buffer
descriptor and uses this length instead.Signed-off-by: Hans Wippel
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
04 May, 2018
1 commit
-
Provide an implementation for splice() when we are using SMC. See
smc_splice_read() for further details.Signed-off-by: Stefan Raspl
Signed-off-by: Ursula Braun <
Signed-off-by: David S. Miller
28 Apr, 2018
1 commit
-
If sockopt TCP_DEFER_ACCEPT is set, the accept is delayed till
data is available.Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
17 Mar, 2018
1 commit
-
Add ipv6 support to the smc socket layer functions. Make use of the
updated clc layer functions to retrieve and match ipv6 information.
The indicator for ipv4 or ipv6 is the protocol constant that is provided
in the socket() call with address family AF_SMC.Based-on-patch-by: Takanori Ueda
Signed-off-by: Karsten Graul
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
02 Mar, 2018
2 commits
-
The daddr field holds the destination IPv4 address. The field was set but
never used and can be removed. The addr field was a left-over from an
earlier version of non-blocking connects and can be removed.
The result of the call to kernel_getpeername is not used, the call can be
removed. Non-blocking connects are working, so remove restriction comment.Signed-off-by: Karsten Graul
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
The function smc_netinfo_by_tcpsk() belongs to CLC handling.
Move it to smc_clc.c and rename to smc_clc_netinfo_by_tcpsk.Signed-off-by: Karsten Graul
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
26 Jan, 2018
2 commits
-
Return statements in functions returning bool should use
true/false instead of 1/0.This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
Proper socket refcounting makes the sock_put worker obsolete.
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
22 Sep, 2017
1 commit
-
The number of outstanding work requests is limited. If all work
requests are in use, tx processing is postponed to another scheduling
of the tx worker. Switch to a delayed worker to have a gap for tx
completion queue events before the next retry.Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller
12 Apr, 2017
1 commit
-
Several state changes occur during SMC socket closing. Currently
state changes triggered locally occur in process context with
lock_sock() taken while state changes triggered by peer occur in
tasklet context with bh_lock_sock() taken. bh_lock_sock() does not
wait till a lock_sock(() task in process context is finished. This
may lead to races in socket state transitions resulting in dangling
SMC-sockets, or it may lead to duplicate SMC socket freeing.
This patch introduces a closing worker to run all state changes under
lock_sock().Signed-off-by: Ursula Braun
Reviewed-by: Thomas Richter
Reported-by: Dave Jones
Signed-off-by: David S. Miller
10 Jan, 2017
12 commits
-
Support for SMC socket monitoring via netlink sockets of protocol
NETLINK_SOCK_DIAG.Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
smc_shutdown() and smc_release() handling
delayed linkgroup cleanup for linkgroups without connectionsSigned-off-by: Ursula Braun
Signed-off-by: David S. Miller -
move RMBE data into user space buffer and update managing cursors
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
copy data to kernel send buffer, and trigger RDMA write
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
send and receive CDC messages (via IB message send and CQE)
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
Prepare the link for RDMA transport:
Create a queue pair (QP) and move it into the state Ready-To-Receive (RTR).Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
The base containers for RDMA transport are work requests and completion
queue entries processed through Infiniband verbs:
* allocate and initialize these areas
* map these areas to DMA
* implement the basic communication consisting of work request posting
and receival of completion queue eventsSigned-off-by: Ursula Braun
Signed-off-by: David S. Miller -
* allocate data RMB memory for sending and receiving
* size depends on the maximum socket send and receive buffers
* allocated RMBs are kept during life time of the owning link group
* map the allocated RMBs to DMASigned-off-by: Ursula Braun
Signed-off-by: David S. Miller -
* create smc_connection for SMC-sockets
* determine suitable link group for a connection
* create a new link group if necessarySigned-off-by: Ursula Braun
Signed-off-by: David S. Miller -
* CLC (Connection Layer Control) handshake
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
* create a list of SMC IB-devices
Signed-off-by: Ursula Braun
Signed-off-by: David S. Miller -
* enable smc module loading and unloading
* register new socket family
* basic smc socket creation and deletion
* use backing TCP socket to run CLC (Connection Layer Control)
handshake of SMC protocol
* Setup for infiniband traffic is implemented in follow-on patches.
For now fallback to TCP socket is always used.Signed-off-by: Ursula Braun
Reviewed-by: Utz Bacher
Signed-off-by: David S. Miller