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

    Ursula Braun
     

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

    Ursula Braun
     

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

    Myungho Jung
     

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

    Karsten Graul
     

03 Jul, 2018

1 commit


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 support

    The 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

    Hans Wippel
     
  • 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

    Ursula Braun
     

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

    Ursula Braun
     

24 May, 2018

1 commit


19 May, 2018

4 commits


04 May, 2018

1 commit


28 Apr, 2018

1 commit


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

    Karsten Graul
     

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

    Karsten Graul
     
  • 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

    Karsten Graul
     

26 Jan, 2018

2 commits


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

    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

    Ursula Braun
     

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

    Ursula Braun
     

10 Jan, 2017

12 commits