1. 18 Apr, 2019 23 commits
  2. 17 Apr, 2019 17 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6b0a7f84
      David S. Miller authored
      Conflict resolution of af_smc.c from Stephen Rothwell.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6b0a7f84
    • David S. Miller's avatar
      Merge branch 's390-next' · cea0aa9c
      David S. Miller authored
      Julian Wiedmann says:
      
      ====================
      s390/qeth: updates 2019-04-17
      
      please apply some additional qeth patches to net-next. This patchset
      converts the driver to use the kernel's multiqueue model.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cea0aa9c
    • Julian Wiedmann's avatar
      s390/qeth: stop/wake TX queues based on their fill level · 54a50941
      Julian Wiedmann authored
      Current xmit code only stops the txq after attempting to fill an
      IO buffer that hasn't been TX-completed yet. In many-connection
      scenarios, this can result in frequent rejected TX attempts, requeuing
      of skbs with NETDEV_TX_BUSY and extra overhead.
      
      Now that we have a proper 1-to-1 relation between stack-side txqs and
      our HW Queues, overhaul the stop/wake logic so that the xmit code
      stops the txq as needed.
      Given that we might map multiple skbs into a single buffer, it's crucial
      to ensure that the queue always provides an _entirely_ empty IO buffer.
      Otherwise large skbs (eg TSO) might not fit into the last available
      buffer. So whenever qeth_do_send_packet() first utilizes an _empty_
      buffer, it updates & checks the used_buffers count.
      
      This now ensures that an skb passed to qeth_xmit() can always be mapped
      into an IO buffer, so remove all of the -EBUSY roll-back handling in the
      TX path. We preserve the minimal safety-checks ("Is this IO buffer
      really available?"), just in case some nasty future bug ever attempts to
      corrupt an in-use buffer.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54a50941
    • Julian Wiedmann's avatar
      s390/qeth: simplify QoS code · e6c15b5f
      Julian Wiedmann authored
      qeth_get_priority_queue() is no longer used for IQD devices, remove the
      special-casing of their mcast queue.
      
      This effectively reverts
      commit 70deb016 ("qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSockets").
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6c15b5f
    • Julian Wiedmann's avatar
      s390/qeth: add TX multiqueue support for OSA devices · 73dc2daf
      Julian Wiedmann authored
      This adds trivial support for multiple TX queues on OSA-style devices
      (both real HW and z/VM NICs). For now we expose the driver's existing
      QoS mechanism via .ndo_select_queue, and adjust the number of available
      TX queues when qeth_update_from_chp_desc() detects that the
      HW configuration has changed.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      73dc2daf
    • Julian Wiedmann's avatar
      s390/qeth: add TX multiqueue support for IQD devices · 3a18d754
      Julian Wiedmann authored
      qeth has been supporting multiple HW Output Queues for a long time. But
      rather than exposing those queues to the stack, it uses its own queue
      selection logic in .ndo_start_xmit... with all the drawbacks that
      entails.
      Start off by switching IQD devices over to a proper mqs net_device,
      and converting all the netdev_queue management code.
      
      One oddity with IQD devices is the requirement to place all mcast
      traffic on the _highest_ established HW queue. Doing so via
      .ndo_select_queue seems straight-forward - but that won't work if only
      some of the HW queues are active
      (ie. when dev->real_num_tx_queues < dev->num_tx_queues), since
      netdev_cap_txqueue() will not allow us to put skbs on the higher queues.
      
      To make this work, we
      1. let .ndo_select_queue() map all mcast traffic to netdev_queue 0, and
      2. later re-map the netdev_queue and HW queue indices in
         .ndo_start_xmit and the TX completion handler.
      
      With this patch we default to a fixed set of 1 ucast and 1 mcast queue.
      Support for dynamic reconfiguration is added at a later time.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a18d754
    • Julian Wiedmann's avatar
      s390/qeth: don't keep statistics for tx timeout · 333ef9d1
      Julian Wiedmann authored
      struct netdev_queue contains a counter for tx timeouts, which gets
      updated by dev_watchdog(). So let's not attempt to maintain our own
      statistics, in particular not by overloading the skb-error counter.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      333ef9d1
    • Julian Wiedmann's avatar
      s390/qeth: don't bother updating the last-tx time · fdd1a530
      Julian Wiedmann authored
      As the documentation for netif_trans_update() says, netdev_start_xmit()
      already updates the last-tx time after every good xmit. So don't
      duplicate that effort.
      
      One odd case is that qeth_flush_buffers() also gets called from our
      TX completion handler, to flush out any partially filled buffer when
      we switch the queue to non-packing mode. But as the TX completion
      handler will _always_ wake the txq, we don't have to worry about
      the TX watchdog there.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdd1a530
    • Julian Wiedmann's avatar
      s390/qeth: handle error from qeth_update_from_chp_desc() · a4cdc9ba
      Julian Wiedmann authored
      Subsequent code relies on the values that qeth_update_from_chp_desc()
      reads from the CHP descriptor. Rather than dealing with weird errors
      later on, just handle it properly here.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4cdc9ba
    • Julian Wiedmann's avatar
      s390/qeth: clarify naming for some QDIO helpers · 41c47da3
      Julian Wiedmann authored
      The naming of several QDIO helpers doesn't match their actual
      functionality, or the structures they operate on. Clean this up.
      
      s/qeth_alloc_qdio_buffers/qeth_alloc_qdio_queues
      s/qeth_free_qdio_buffers/qeth_free_qdio_queues
      s/qeth_alloc_qdio_out_buf/qeth_alloc_output_queue
      s/qeth_clear_outq_buffers/qeth_drain_output_queue
      s/qeth_clear_qdio_buffers/qeth_drain_output_queues
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41c47da3
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 3a6f7892
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2019-04-16
      
      This series contains updates to i40e driver only.
      
      Adam fixes i40e so that queues can be restored to its original value if
      configuring queue channels fails.  Bumped the maximum API version
      supported and added the API version to error messages to clarify
      supported firmware API versions.  Fixed the problem with the driver
      being able to add only 7 multicast MAC address filters instead of 16.
      
      Aleksandr adds support for Dynamic Device Personalization (DDP) which
      allows loading profiles that change the way internal parser interprets
      processed frames.
      
      Nick fixes an issue where if we modify the VLAN stripping options when a
      port VLAN is configured, it will break traffic for the VSI, so prevent
      changes from being made.
      
      Jake fixes an issue where a device reset can mess up the clock time
      because we reset the clock time based on the kernel time every reset.
      This causes us to potentially completely reset the PTP time, and can
      cause unexpected behavior in programs like ptp4l.
      
      Piotr fixes an LED blink issue with the 'ethtool -p' command, so that
      identification blinking will work on all hardware.
      
      Chinh fixed the error returned to correctly reflect the current state
      when LLDP or DCBx is not in an operational state.
      
      Grzegorz cleans up a misleading error message when untrusted VF tries to
      exceed addresses beyond the NIC limit.
      
      Carolyn fixes the error return code to correctly reflect the error case.
      
      v2: updated the URL provided in the DDP patch (#2)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a6f7892
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi · fe5cdef2
      Linus Torvalds authored
      Pull IPMI fixes from Corey Minyard:
       "Fixes for some bugs cause by recent changes. One crash if you feed bad
        data to the module parameters, one BUG that sometimes occurs when a
        user closes the connection, and one bug that cause the driver to not
        work if the configuration information only comes in from SMBIOS"
      
      * tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi:
        ipmi: fix sleep-in-atomic in free_user at cleanup SRCU user->release_barrier
        ipmi: ipmi_si_hardcode.c: init si_type array to fix a crash
        ipmi: Fix failure on SMBIOS specified devices
      fe5cdef2
    • David S. Miller's avatar
      Merge branch 'stmmac-Enable-Flow-Control' · e77b8ba6
      David S. Miller authored
      Jose Abreu says:
      
      ====================
      net: stmmac: Enable Flow Control
      
      I don't know of any specific reason why Flow Control is off by default but
      do let me know if there is any.
      
      Tested in B2B between XGMAC2 and GMAC5.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e77b8ba6
    • Jose Abreu's avatar
      net: stmmac: Set Flow Control to automatic mode in the driver · e9989339
      Jose Abreu authored
      By default Flow Control feature is not being enabled in stmmac.
      
      This is a useful feature that can prevent loss of packets and now that
      XGMAC already supports it (along with GMAC and QoS) it makes sense to
      activate it.
      
      Switch the module parameter to FLOW_AUTO so that Flow Control is
      activated.
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9989339
    • Jose Abreu's avatar
      net: stmmac: dwxgmac: Finish the Flow Control implementation · ff82cfc7
      Jose Abreu authored
      Finish the implementation of Flow Control feature. In order for it to
      work correctly we need to set EHFC bit and the correct threshold values
      for activating and deactivating it.
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff82cfc7
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2a3a028f
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Handle init flow failures properly in iwlwifi driver, from Shahar S
          Matityahu.
      
       2) mac80211 TXQs need to be unscheduled on powersave start, from Felix
          Fietkau.
      
       3) SKB memory accounting fix in A-MDSU aggregation, from Felix Fietkau.
      
       4) Increase RCU lock hold time in mlx5 FPGA code, from Saeed Mahameed.
      
       5) Avoid checksum complete with XDP in mlx5, also from Saeed.
      
       6) Fix netdev feature clobbering in ibmvnic driver, from Thomas Falcon.
      
       7) Partial sent TLS record leak fix from Jakub Kicinski.
      
       8) Reject zero size iova range in vhost, from Jason Wang.
      
       9) Allow pending work to complete before clcsock release from Karsten
          Graul.
      
      10) Fix XDP handling max MTU in thunderx, from Matteo Croce.
      
      11) A lot of protocols look at the sa_family field of a sockaddr before
          validating it's length is large enough, from Tetsuo Handa.
      
      12) Don't write to free'd pointer in qede ptp error path, from Colin Ian
          King.
      
      13) Have to recompile IP options in ipv4_link_failure because it can be
          invoked from ARP, from Stephen Suryaputra.
      
      14) Doorbell handling fixes in qed from Denis Bolotin.
      
      15) Revert net-sysfs kobject register leak fix, it causes new problems.
          From Wang Hai.
      
      16) Spectre v1 fix in ATM code, from Gustavo A. R. Silva.
      
      17) Fix put of BROPT_VLAN_STATS_PER_PORT in bridging code, from Nikolay
          Aleksandrov.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (111 commits)
        socket: fix compat SO_RCVTIMEO_NEW/SO_SNDTIMEO_NEW
        tcp: tcp_grow_window() needs to respect tcp_space()
        ocelot: Clean up stats update deferred work
        ocelot: Don't sleep in atomic context (irqs_disabled())
        net: bridge: fix netlink export of vlan_stats_per_port option
        qed: fix spelling mistake "faspath" -> "fastpath"
        tipc: set sysctl_tipc_rmem and named_timeout right range
        tipc: fix link established but not in session
        net: Fix missing meta data in skb with vlan packet
        net: atm: Fix potential Spectre v1 vulnerabilities
        net/core: work around section mismatch warning for ptp_classifier
        net: bridge: fix per-port af_packet sockets
        bnx2x: fix spelling mistake "dicline" -> "decline"
        route: Avoid crash from dereferencing NULL rt->from
        MAINTAINERS: normalize Woojung Huh's email address
        bonding: fix event handling for stacked bonds
        Revert "net-sysfs: Fix memory leak in netdev_register_kobject"
        rtnetlink: fix rtnl_valid_stats_req() nlmsg_len check
        qed: Fix the DORQ's attentions handling
        qed: Fix missing DORQ attentions
        ...
      2a3a028f
    • Corey Minyard's avatar
      ipmi: fix sleep-in-atomic in free_user at cleanup SRCU user->release_barrier · 3b9a9072
      Corey Minyard authored
      free_user() could be called in atomic context.
      
      This patch pushed the free operation off into a workqueue.
      
      Example:
      
       BUG: sleeping function called from invalid context at kernel/workqueue.c:2856
       in_atomic(): 1, irqs_disabled(): 0, pid: 177, name: ksoftirqd/27
       CPU: 27 PID: 177 Comm: ksoftirqd/27 Not tainted 4.19.25-3 #1
       Hardware name: AIC 1S-HV26-08/MB-DPSB04-06, BIOS IVYBV060 10/21/2015
       Call Trace:
        dump_stack+0x5c/0x7b
        ___might_sleep+0xec/0x110
        __flush_work+0x48/0x1f0
        ? try_to_del_timer_sync+0x4d/0x80
        _cleanup_srcu_struct+0x104/0x140
        free_user+0x18/0x30 [ipmi_msghandler]
        ipmi_free_recv_msg+0x3a/0x50 [ipmi_msghandler]
        deliver_response+0xbd/0xd0 [ipmi_msghandler]
        deliver_local_response+0xe/0x30 [ipmi_msghandler]
        handle_one_recv_msg+0x163/0xc80 [ipmi_msghandler]
        ? dequeue_entity+0xa0/0x960
        handle_new_recv_msgs+0x15c/0x1f0 [ipmi_msghandler]
        tasklet_action_common.isra.22+0x103/0x120
        __do_softirq+0xf8/0x2d7
        run_ksoftirqd+0x26/0x50
        smpboot_thread_fn+0x11d/0x1e0
        kthread+0x103/0x140
        ? sort_range+0x20/0x20
        ? kthread_destroy_worker+0x40/0x40
        ret_from_fork+0x1f/0x40
      
      Fixes: 77f82696 ("ipmi: fix use-after-free of user->release_barrier.rda")
      Reported-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Cc: stable@vger.kernel.org # 5.0
      Cc: Yang Yingliang <yangyingliang@huawei.com>
      3b9a9072