Skip to content
  1. May 18, 2018
    • Eric Dumazet's avatar
      tcp: add SACK compression · 5d9f4262
      Eric Dumazet authored
      
      
      When TCP receives an out-of-order packet, it immediately sends
      a SACK packet, generating network load but also forcing the
      receiver to send 1-MSS pathological packets, increasing its
      RTX queue length/depth, and thus processing time.
      
      Wifi networks suffer from this aggressive behavior, but generally
      speaking, all these SACK packets add fuel to the fire when networks
      are under congestion.
      
      This patch adds a high resolution timer and tp->compressed_ack counter.
      
      Instead of sending a SACK, we program this timer with a small delay,
      based on RTT and capped to 1 ms :
      
      	delay = min ( 5 % of RTT, 1 ms)
      
      If subsequent SACKs need to be sent while the timer has not yet
      expired, we simply increment tp->compressed_ack.
      
      When timer expires, a SACK is sent with the latest information.
      Whenever an ACK is sent (if data is sent, or if in-order
      data is received) timer is canceled.
      
      Note that tcp_sack_new_ofo_skb() is able to force a SACK to be sent
      if the sack blocks need to be shuffled, even if the timer has not
      expired.
      
      A new SNMP counter is added in the following patch.
      
      Two other patches add sysctls to allow changing the 1,000,000 and 44
      values that this commit hard-coded.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d9f4262
    • Eric Dumazet's avatar
      tcp: do not force quickack when receiving out-of-order packets · a3893637
      Eric Dumazet authored
      As explained in commit 9f9843a7
      
       ("tcp: properly handle stretch
      acks in slow start"), TCP stacks have to consider how many packets
      are acknowledged in one single ACK, because of GRO, but also
      because of ACK compression or losses.
      
      We plan to add SACK compression in the following patch, we
      must therefore not call tcp_enter_quickack_mode()
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3893637
    • Eric Dumazet's avatar
      tcp: use __sock_put() instead of sock_put() in tcp_clear_xmit_timers() · cf0dd203
      Eric Dumazet authored
      
      
      Socket can not disappear under us.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf0dd203
    • Alexandre Belloni's avatar
      net: mscc: Add SPDX identifier · 64a2658b
      Alexandre Belloni authored
      
      
      ocelot_qsys.h is missing the SPDX identfier, fix that.
      
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Reviewed-by: default avatarAllan W. Nielsen <allan.nielsen@microsemi.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64a2658b
    • David S. Miller's avatar
      Merge branch 'stmmac-Clean-up-and-tune-up' · 10151339
      David S. Miller authored
      
      
      Jose Abreu says:
      
      ====================
      net: stmmac: Clean-up and tune-up
      
      This targets to uniformize the handling of the different GMAC versions in
      stmmac_main.c file and also tune-up the HW.
      
      Currently there are some if/else conditions in the main source file which
      calls different callbacks depending on the ID of GMAC.
      
      With the introducion of a generic HW interface handling which automatically
      selects the GMAC callbacks to be used, it is now unpleasant to see if
      conditions in the main code because this should be completely agnostic of the
      GMAC version.
      
      This series removes most of these conditions. There are some if conditions
      that remain untouched but the callbacks handling are now uniformized.
      
      Tested in GMAC5, hope I didn't break any previous versions.
      
      Please check [1] for performance analisys of patches 3-12.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10151339
    • Jose Abreu's avatar
      net: stmmac: Remove if condition by taking advantage of hwif return code · 61fac60a
      Jose Abreu authored
      
      
      We can remove the if condition and check if return code is different
      than -EINVAL, meaning callback is present.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61fac60a
    • Jose Abreu's avatar
      net: stmmac: Let descriptor code get skbuff address · d2df9ea0
      Jose Abreu authored
      
      
      Stop using if conditions depending on the GMAC version for getting the
      descriptor skbuff address and use instead a helper implemented in the
      descriptor files.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2df9ea0
    • Jose Abreu's avatar
      net: stmmac: Uniformize set_rx_owner() · 357951cd
      Jose Abreu authored
      
      
      Currently an if condition is used to select the correct callback to set
      rx_onwer in descriptor. Lets keep this simple and always use the same
      callback.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      357951cd
    • Jose Abreu's avatar
      net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit · f1565c60
      Jose Abreu authored
      
      
      We either have .enable_dma_transmission or .set_tx_tail_ptr in the HW
      table callbacks, we can never have both so there is no need to check for
      GMAC version.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1565c60
    • Jose Abreu's avatar
      net: stmmac: Uniformize the use of dma_init_* callbacks · 24aaed0c
      Jose Abreu authored
      
      
      Instead of relying on the GMAC version for choosing if we need to use
      dma_init or dma_init_{rx/tx}_chan callback, lets uniformize this and
      always use the dma_init_{rx/tx}_chan callbacks.
      
      While at it, fix the use of dma_init_chan callback, which shall be
      called for as many channels as the max of rx/tx channels.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      24aaed0c
    • Jose Abreu's avatar
      net: stmmac: Move PTP and MMC base address calculation to hwif.c · 758d5c73
      Jose Abreu authored
      
      
      PTP and MMC modules base address can depend on the GMAC version. As this
      is HW specific lets move this base address calculation to hwif.c. Also,
      add an entry in the HW table so that we can specify the module offset.
      This can later be extended to more modules, if deemed necessary.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      758d5c73
    • Jose Abreu's avatar
      net: stmmac: Remove uneeded checks for GMAC version · 63a550fc
      Jose Abreu authored
      
      
      With the introducion of callbacks check in hwif.h we only call the
      callback if HW supports it so there is no longer need to check for GMAC
      version.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63a550fc
    • Jose Abreu's avatar
      net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks · ab0204e3
      Jose Abreu authored
      
      
      Instead of relying on the GMAC version for choosing if we need to use
      dma_{rx/tx}_mode or just dma_mode callback lets uniformize this and
      always use the dma_{rx/tx}_mode callbacks.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab0204e3
    • Jose Abreu's avatar
      net: stmmac: Let descriptor code clear the descriptor · 44c67f85
      Jose Abreu authored
      
      
      Stop using if conditions depending on the GMAC version for clearing the
      descriptor and use instead a helper implemented in the descriptor files.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44c67f85
    • Jose Abreu's avatar
      net: stmmac: Let descriptor code set skbuff address · 6844171d
      Jose Abreu authored
      
      
      Stop using if conditions depending on the GMAC version for setting the
      the descriptor skbuff address and use instead a helper implemented in
      the descriptor files.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6844171d
    • Jose Abreu's avatar
      net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit · 4ae0169f
      Jose Abreu authored
      
      
      This is cutting down performance. Once the timer is armed it should run
      after the time expires for the first packet sent and not the last one.
      
      After this change, running iperf, the performance gain is +/- 24%.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ae0169f
    • Jose Abreu's avatar
      net: stmmac: Enable OSP for GMAC4 · 67e1c406
      Jose Abreu authored
      
      
      This enables OSP (Operate on Second Packet) for GMAC4. The feature
      allows DMA to fetch second descriptor while its still processing the
      first one.
      
      Running iperf, the performance gain is +/- 38%.
      
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Vitor Soares <soares@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67e1c406
    • David S. Miller's avatar
      Merge branch 'net-Allow-more-drivers-with-COMPILE_TEST' · 538e2de1
      David S. Miller authored
      
      
      Florian Fainelli says:
      
      ====================
      net: Allow more drivers with COMPILE_TEST
      
      This patch series includes more drivers to be build tested with COMPILE_TEST
      enabled. This helps cover some of the issues I just ran into with missing
      a driver *sigh*.
      
      Chanves in v3:
      
      - drop the TI Keystone NETCP driver from the COMPILE_TEST additions
      
      Changes in v2:
      
      - allow FEC to build outside of CONFIG_ARM/ARM64 by defining a layout of
        registers, this is not meant to run, so this is not a real issue if we
        are not matching the correct register layout
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      538e2de1
    • Florian Fainelli's avatar
      net: phy: Allow MDIO_MOXART and MDIO_SUN4I with COMPILE_TEST · 3c0596f8
      Florian Fainelli authored
      
      
      Those drivers build just fine with COMPILE_TEST, so make that possible.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c0596f8
    • Florian Fainelli's avatar
      net: ethernet: freescale: Allow FEC with COMPILE_TEST · 78cc6e7e
      Florian Fainelli authored
      
      
      The Freescale FEC driver builds fine with COMPILE_TEST, so make that
      possible.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78cc6e7e
    • Florian Fainelli's avatar
      net: ethernet: ti: Allow most drivers with COMPILE_TEST · 2652113f
      Florian Fainelli authored
      
      
      Most of the TI drivers build just fine with COMPILE_TEST, cpmac (AR7) is
      the exception because it uses a header file from
      arch/mips/include/asm/mach-ar7/ar7.h and keystone netcp which requires
      help from drivers/soc/ti/ for queue management helpers.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2652113f
    • David Ahern's avatar
      vlan: Add extack messages for link create · 33fa3823
      David Ahern authored
      
      
      Add informative messages for error paths related to adding a
      VLAN to a device.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33fa3823
    • Manish Chopra's avatar
      qede: Add build_skb() support. · 8a863397
      Manish Chopra authored
      
      
      This patch makes use of build_skb() throughout in driver's receieve
      data path [HW gro flow and non HW gro flow]. With this, driver can
      build skb directly from the page segments which are already mapped
      to the hardware instead of allocating new SKB via netdev_alloc_skb()
      and memcpy the data which is quite costly.
      
      This really improves performance (keeping same or slight gain in rx
      throughput) in terms of CPU utilization which is significantly reduced
      [almost half] in non HW gro flow where for every incoming MTU sized
      packet driver had to allocate skb, memcpy headers etc. Additionally
      in that flow, it also gets rid of bunch of additional overheads
      [eth_get_headlen() etc.] to split headers and data in the skb.
      
      Tested with:
      system: 2 sockets, 4 cores per socket, hyperthreading, 2x4x2=16 cores
      iperf [server]: iperf -s
      iperf [client]: iperf -c <server_ip> -t 500 -i 10 -P 32
      
      HW GRO off – w/o build_skb(), throughput: 36.8 Gbits/sec
      
      Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
      Average:     all    0.59    0.00   32.93    0.00    0.00   43.07    0.00    0.00   23.42
      
      HW GRO off - with build_skb(), throughput: 36.9 Gbits/sec
      
      Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
      Average:     all    0.70    0.00   31.70    0.00    0.00   25.68    0.00    0.00   41.92
      
      HW GRO on - w/o build_skb(), throughput: 36.9 Gbits/sec
      
      Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
      Average:     all    0.86    0.00   24.14    0.00    0.00    6.59    0.00    0.00   68.41
      
      HW GRO on - with build_skb(), throughput: 37.5 Gbits/sec
      
      Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
      Average:     all    0.87    0.00   23.75    0.00    0.00    6.19    0.00    0.00   69.19
      
      Signed-off-by: default avatarAriel Elior <ariel.elior@cavium.com>
      Signed-off-by: default avatarManish Chopra <manish.chopra@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8a863397
    • David S. Miller's avatar
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 56a9a9e7
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      10GbE Intel Wired LAN Driver Updates 2018-05-17
      
      This series contains updates to ixgbe, ixgbevf and ice drivers.
      
      Cathy Zhou resolves sparse warnings by using the force attribute.
      
      Mauro S M Rodrigues fixes a bug where IRQs were not freed if a PCI error
      recovery system opts to remove the device which causes
      ixgbe_io_error_detected() to return PCI_ERS_RESULT_DISCONNECT before
      calling ixgbe_close_suspend() which results in IRQs not freed and
      crashing when the remove handler calls pci_disable_device().  Resolved
      this by calling ixgbe_close_suspend() before evaluating the PCI channel
      state.
      
      Pavel Tatashin releases the rtnl_lock during the call to
      ixgbe_close_suspend() to allow scaling if device_shutdown() is
      multi-threaded.
      
      Emil modifies ixgbe to not validate the MAC address during a reset,
      unless the MAC was set on the host so that the VF will get a new MAC
      address every time it reloads.  Also updates ixgbevf to set
      hw->mac.perm_addr in order to retain the custom MAC on a reset.
      
      Anirudh updates the ice NVM read/erase/update AQ commands to align with
      the latest specification.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56a9a9e7
    • Roman Mashak's avatar
    • Dan Carpenter's avatar
      net/ncsi: prevent a couple array underflows · 990a9d49
      Dan Carpenter authored
      We recently refactored this code and introduced a static checker
      warning.  Smatch complains that if cmd->index is zero then we would
      underflow the arrays.  That's obviously true.
      
      The question is whether we prevent cmd->index from being zero at a
      different level.  I've looked at the code and I don't immediately see
      a check for that.
      
      Fixes: 062b3e1b
      
       ("net/ncsi: Refactor MAC, VLAN filters")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      990a9d49
    • Eric Dumazet's avatar
      net/smc: init conn.tx_work & conn.send_lock sooner · be7f3e59
      Eric Dumazet authored
      syzkaller found that following program crashes the host :
      
      {
        int fd = socket(AF_SMC, SOCK_STREAM, 0);
        int val = 1;
      
        listen(fd, 0);
        shutdown(fd, SHUT_RDWR);
        setsockopt(fd, 6, TCP_NODELAY, &val, 4);
      }
      
      Simply initialize conn.tx_work & conn.send_lock at socket creation,
      rather than deeper in the stack.
      
      ODEBUG: assert_init not available (active state 0) object type: timer_list hint:           (null)
      WARNING: CPU: 1 PID: 13988 at lib/debugobjects.c:329 debug_print_object+0x16a/0x210 lib/debugobjects.c:326
      Kernel panic - not syncing: panic_on_warn set ...
      
      CPU: 1 PID: 13988 Comm: syz-executor0 Not tainted 4.17.0-rc4+ #46
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x1b9/0x294 lib/dump_stack.c:113
       panic+0x22f/0x4de kernel/panic.c:184
       __warn.cold.8+0x163/0x1b3 kernel/panic.c:536
       report_bug+0x252/0x2d0 lib/bug.c:186
       fixup_bug arch/x86/kernel/traps.c:178 [inline]
       do_error_trap+0x1de/0x490 arch/x86/kernel/traps.c:296
       do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
       invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
      RIP: 0010:debug_print_object+0x16a/0x210 lib/debugobjects.c:326
      RSP: 0018:ffff880197a37880 EFLAGS: 00010086
      RAX: 0000000000000061 RBX: 0000000000000005 RCX: ffffc90001ed0000
      RDX: 0000000000004aaf RSI: ffffffff8160f6f1 RDI: 0000000000000001
      RBP: ffff880197a378c0 R08: ffff8801aa7a0080 R09: ffffed003b5e3eb2
      R10: ffffed003b5e3eb2 R11: ffff8801daf1f597 R12: 0000000000000001
      R13: ffffffff88d96980 R14: ffffffff87fa19a0 R15: ffffffff81666ec0
       debug_object_assert_init+0x309/0x500 lib/debugobjects.c:692
       debug_timer_assert_init kernel/time/timer.c:724 [inline]
       debug_assert_init kernel/time/timer.c:776 [inline]
       del_timer+0x74/0x140 kernel/time/timer.c:1198
       try_to_grab_pending+0x439/0x9a0 kernel/workqueue.c:1223
       mod_delayed_work_on+0x91/0x250 kernel/workqueue.c:1592
       mod_delayed_work include/linux/workqueue.h:541 [inline]
       smc_setsockopt+0x387/0x6d0 net/smc/af_smc.c:1367
       __sys_setsockopt+0x1bd/0x390 net/socket.c:1903
       __do_sys_setsockopt net/socket.c:1914 [inline]
       __se_sys_setsockopt net/socket.c:1911 [inline]
       __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911
       do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: 01d2f7e2
      
       ("net/smc: sockopts TCP_NODELAY and TCP_CORK")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ursula Braun <ubraun@linux.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be7f3e59
    • Jiri Pirko's avatar
      nfp: flower: fix error path during representor creation · 3b734ff6
      Jiri Pirko authored
      
      
      Don't store repr pointer to reprs array until the representor is
      successfully created. This avoids message about "representor
      destruction" even when it was never created. Also it cleans-up the flow.
      Also, check return value after port alloc.
      
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b734ff6
    • David S. Miller's avatar
      Merge branch 'mvpp2-small-improvements' · 6d9f868f
      David S. Miller authored
      
      
      Antoine Tenart says:
      
      ====================
      net: mvpp2: small improvements
      
      Those 3 patches are small improvements to the Marvell PPv2 driver. The
      series does not conflict with the one sent about phylink and
      1000/2500baseX support, so the two series can live in parallel.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d9f868f
    • Yan Markman's avatar
      net: mvpp2: print rx error with rate-limit · 934e0f83
      Yan Markman authored
      
      
      Prevent flood of RX error prints during heavy traffic with weak signal
      in link by checking net_ratelimit() before using netdev_err().
      
      Signed-off-by: default avatarYan Markman <ymarkman@marvell.com>
      [Antoine: small rework, commit message]
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      934e0f83
    • Yan Markman's avatar
      net: mvpp2: set mac address does not require the stop/start sequence · 5b0ab2f4
      Yan Markman authored
      
      
      Remove special stop/start handling from the set_mac_address callback.
      All this special care is not needed, and can be removed. It also
      simplifies the up/down status in the driver and helps avoiding possible
      link status mismatch issues.
      
      Signed-off-by: default avatarYan Markman <ymarkman@marvell.com>
      [Antoine: commit message]
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b0ab2f4
    • Yan Markman's avatar
      net: mvpp2: avoid checking for free aggregated descriptors twice · 914365f1
      Yan Markman authored
      
      
      Avoid repeating the check for free aggregated descriptors when it
      already failed at the beginning of the function.
      
      Signed-off-by: default avatarYan Markman <ymarkman@marvell.com>
      [Antoine: commit message]
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      914365f1
    • David S. Miller's avatar
      Merge branch 'mvpp2-phylink-conversion' · 808e2fc3
      David S. Miller authored
      
      
      Antoine Tenart says:
      
      ====================
      net: mvpp2: phylink conversion
      
      This series convert the Marvell PPv2 driver to phylink (models the MAC
      to PHY link).
      
      One important point is the PPv2 driver supports two probe modes: device
      tree and ACPI. This series only brings phylink support for the device
      tree mode, as the ACPI one will need further work. Still, the driver
      should be working as before when using ACPI. This split should be
      temporary, and was discussed with Marcin (in Cc.) who added ACPI support
      to the driver.
      
      Also as the SFP cages on both DB boards can be considered as non-wired.
      We thus chose not to describe those SFP cages and we use fixed-link.
      
      The rest of the series uses phylink to add support for 1000BaseX and
      2500BaseX modes in the PPv2 driver. To do this, two patches are needed
      in the common PHY framework (patches 3 and 4). The last 4 patches modify
      the device tree to use the new PPv2 functionalities.
      
      The series has been tested for the device tree mode on the 7040-db,
      8040-db and 8040-mcbin boards, to ensure all the interface where working
      as expected.
      
      @Dave: patches 7 to 10 should go through the mvebu tree (Gregory in
      Cc.) to avoid any conflict with the other mvebu dt patches taken during
      this cycle.
      
      The series is based on today's net-next.
      
      Since v2:
        - Removed the SFP description from the DB boards, as their SFP cages
          are wired properly. We now use fixed-link.
        - Because of this rework, split the series in two, so that the SFP
          part is reviewed separately.
        - Small fixes in the phylink patch.
        - Rebased on the latest net-next branch.
      
      Since v1:
        - Chose a different approach to the SFP changes, as the previous ones
          weren't valid and reworked both BD boards device trees.
        - Misc fixes.
        - Added Kishon's acked-by on one patch.
        - Rebaed on latest net-next branch.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      808e2fc3
    • Antoine Tenart's avatar
      net: mvpp2: 2500baseX support · a6fe31de
      Antoine Tenart authored
      
      
      This patch adds the 2500Base-X PHY mode support in the Marvell PPv2
      driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses
      nearly the same code path.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6fe31de
    • Antoine Tenart's avatar
      net: mvpp2: 1000baseX support · d97c9f4a
      Antoine Tenart authored
      
      
      This patch adds the 1000Base-X PHY mode support in the Marvell PPv2
      driver. 1000Base-X is quite close the SGMII and uses nearly the same
      code path.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d97c9f4a
    • Antoine Tenart's avatar
      phy: cp110-comphy: 2.5G SGMII mode · 9ad8bd81
      Antoine Tenart authored
      
      
      This patch allow the CP110 comphy to configure some lanes in the
      2.5G SGMII mode. This mode is quite close to SGMII and uses nearly the
      same code path.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ad8bd81
    • Antoine Tenart's avatar
      phy: add 2.5G SGMII mode to the phy_mode enum · 5490b872
      Antoine Tenart authored
      
      
      This patch adds one more generic PHY mode to the phy_mode enum, to allow
      configuring generic PHYs to the 2.5G SGMII mode by using the set_mode
      callback.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5490b872
    • Antoine Tenart's avatar
      net: mvpp2: phylink support · 4bb04326
      Antoine Tenart authored
      
      
      Convert the PPv2 driver to implement phylink helpers, and use phylink in
      DT mode. The other mode supported is ACPI, which will need further work
      in order to be entirely compatible with phylink.
      
      The MAC and GoP configuration functions were completely moved to fit
      into the phylink helpers. When a PHY is always present between the MAC
      and the physical port, phylink only is used, but when this is not the
      case (the MAC directly is connected to the physical port) the link IRQ
      is used to detect changes in the link state and call phylink_mac_change.
      
      The ACPI mode do not uses phylink as of now, and the changes shouldn't
      impact its use.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4bb04326
    • Antoine Tenart's avatar
      net: mvpp2: align the ethtool ops definition · dcd3e73a
      Antoine Tenart authored
      
      
      Cosmetic patch to align the ethtool functions to ops definitions. This
      patch does not change in any way the driver's behaviour.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dcd3e73a
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2018-05-17' of... · a564b659
      David S. Miller authored
      
      Merge tag 'wireless-drivers-next-for-davem-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for 4.18
      
      The first pull request for 4.18. As usual new features and bug fixes
      but nothing really special.
      
      I also merged wireless-drivers due to an iwlwifi patch dependency.
      
      Major changes:
      
      iwlwifi
      
      * implement Traffic Condition Monitor and use it for scan, BT coex and
        to detect when the AP doesn't support UAPSD properly
      
      * some more work for the 22000 family of devices;
      
      * introduce AMSDU rate control offload
      
      qtnfmac
      
      * DFS offload support
      
      rsi
      
      * roaming enhancements
      
      * increase max supported aggregation subframes
      
      * don't advertise 5 GHz support if the device doesn't support it
      
      brcmfmac
      
      * add support for BCM4366E chipset
      
      * add support for bcm43364 wireless chipset
      
      ath10k
      
      * enable temperature reads for QCA6174 and QCA9377
      
      * add firmware memory dump support for QCA9984
      
      * continue adding WCN3990 support via SNOC bus
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a564b659