14 Apr, 2017

10 commits


12 Apr, 2017

30 commits

  • Ursula Braun says:

    ====================
    net/smc: patches for net-next

    here are some patches for net/smc. Most important are
    improvements for socket closing.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • smc specifies IB_SEND_INLINE for IB_WR_SEND ib_post_send calls, but
    provides a mapped buffer to be sent. This is inconsistent, since
    IB_SEND_INLINE works without mapped buffer. Problem has not been
    detected in the past, because tests had been limited to Connect X3 cards
    from Mellanox, whose mlx4 driver just ignored the IB_SEND_INLINE flag.
    For now, the IB_SEND_INLINE flag is removed.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • Make sure sockets never accepted are removed cleanly.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • unhash is already called in sock_put_work. Remove the second call.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • State SMC_CLOSED should be reached only, if ConnClosed has been sent to
    the peer. If ConnClosed is received from the peer, a socket with
    shutdown SHUT_WR done, switches errorneously to state SMC_CLOSED, which
    means the peer socket is dangling. The local SMC socket is supposed to
    switch to state APPFINCLOSEWAIT to make sure smc_close_final() is called
    during socket close.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • 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
     
  • Wake up reading file descriptors for a closing socket as well, otherwise
    some socket applications may stall.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • If peer indicates write_blocked, the cursor state of the received data
    should be send to the peer immediately (in smc_tx_consumer_update()).
    Afterwards the write_blocked indicator is cleared.

    If there is no free slot for another write request, sending is postponed
    to worker smc_tx_work, and the write_blocked indicator is not cleared.
    Therefore another clearing check is needed in smc_tx_work().

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • SMC requires an active ib port on the RoCE device.
    smc_pnet_find_roce_resource() determines the matching RoCE device port
    according to the configured PNET table. Do not return the found
    RoCE device port, if it is not flagged active.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • The global event handler is created only, if the ib_device has already
    been used by at least one link group. It is guaranteed that there exists
    the corresponding entry in the smc_ib_devices list. Get rid of this
    superfluous check.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • This patch removes an outdated comment.

    Signed-off-by: Ursula Braun
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • In the submission of the lastest multiple buffer patch set, this fix was lost.
    I am sending this patch to put it right again. The fix was originally proposed
    by Arnd Bergmann.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Joao Pinto
    Signed-off-by: David S. Miller

    Joao Pinto
     
  • BPF helper functions access socket fields through skb->sk. This is not
    set in ingress cgroup and socket filters. The association is only made
    in skb_set_owner_r once the filter has accepted the packet. Sk is
    available as socket lookup has taken place.

    Temporarily set skb->sk to sk in these cases.

    Signed-off-by: Willem de Bruijn
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Willem de Bruijn
     
  • Fix the return value check which testing the wrong variable
    in devlink_dpipe_header_put().

    Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")
    Signed-off-by: Wei Yongjun
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • Julian Wiedmann says:

    ====================
    more s390/net updates

    here's a second batch of s390/net patches for net-next.
    A mixed bunch of qeth cleanups, and a few patches to add support for
    ETHTOOL_GLINKSETTINGS.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • prepare() and complete() are not implemented by any discipline, so just
    drop all the indirection.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Hans Wippel
    Reviewed-by: Thomas Richter
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • LINK_MODE_* replaces the u32-limited SUPPORTED_* / ENABLED_*
    definitions.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Thomas Richter
    Reviewed-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • get_settings() is deprecated and lacks support for higher link
    speeds, so implement get_link_ksettings() instead.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Thomas Richter
    Reviewed-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • In preparation for moving to get_link_ksettings(), clean up how
    we build the supported and advertised port/speed masks.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Thomas Richter
    Reviewed-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • 1. a buffer has 16 is_header flags, because that's its # of elements
    2. replace the last occurrence of QETH_HEADER_SIZE, and remove it

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • ndo_start_xmit() expects us to return netdev_tx_t here...

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • 'elements_needed' is not used in qeth_do_send_packet_fast(),
    so consequently remove it.

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • Duplicated code.

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • Identical code, we just need to call a layer-specific hook
    to process any received buffer.

    qeth_buffer_reclaim_work() is shuffled around to avoid a
    forward declaration for qeth_queue_input_buffer().

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • There's a number of layer-independent ioctls that we can handle
    in core, and reduce code duplication. For layer-specific ioctls,
    add a do_ioctl() discipline hook.

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • There's no need to have struct bpf_map_type_list since
    it just contains a list_head, the type, and the ops
    pointer. Since the types are densely packed and not
    actually dynamically registered, it's much easier and
    smaller to have an array of type->ops pointer. Also
    initialize this array statically to remove code needed
    to initialize it.

    In order to save duplicating the list, move it to the
    types header file added by the previous patch and
    include it in the same fashion.

    Signed-off-by: Johannes Berg
    Acked-by: Alexei Starovoitov
    Acked-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • There's no need to have struct bpf_prog_type_list since
    it just contains a list_head, the type, and the ops
    pointer. Since the types are densely packed and not
    actually dynamically registered, it's much easier and
    smaller to have an array of type->ops pointer. Also
    initialize this array statically to remove code needed
    to initialize it.

    In order to save duplicating the list, move it to a new
    header file and include it in the places needing it.

    Signed-off-by: Johannes Berg
    Acked-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Fugang Duan says:

    ====================
    net: fec: driver code clean

    The patch series are for fec ethernet driver code clean up, each patch is
    independent.
    Patch #1,#4,#5 are code clean up.
    Patch #2,#3 are for aarch64 platform.
    Patch #6 is for i.MX6UL to add lost errata workaround.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The errata ERR007885 HW fix don't add to i.MX6ul ENET IP version,
    so add sw workaroud for the chip.

    Signed-off-by: Fugang Duan
    Signed-off-by: David S. Miller

    Fugang Duan
     
  • Correct the errata number ERR006358 comment typo.

    Signed-off-by: Fugang Duan
    Signed-off-by: David S. Miller

    Fugang Duan