1. 23 Apr, 2021 29 commits
  2. 22 Apr, 2021 11 commits
    • David S. Miller's avatar
      Merge branch 'stmmac-swmac-desc-prefetch' · cad4162a
      David S. Miller authored
      Mohammad Athari Bin Ismail says:
      
      ====================
      Enable DWMAC HW descriptor prefetch
      
      This patch series to add setting for HW descriptor prefetch for DWMAC
      version 5.20 onwards. For Intel platform, enable the capability by
      default.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cad4162a
    • Mohammad Athari Bin Ismail's avatar
      stmmac: intel: Enable HW descriptor prefetch by default · 676b7ec6
      Mohammad Athari Bin Ismail authored
      Enable HW descriptor prefetch by default by setting plat->dma_cfg->dche =
      true in intel_mgbe_common_data(). Need to be noted that this capability
      only be supported in DWMAC core version 5.20 onwards. In stmmac, there is
      a checking to check the core version. If the core version is below 5.20,
      this capability wouldn`t be configured.
      
      Below is the iperf result comparison between HW descriptor prefetch
      disabled(DCHE=0b) and enabled(DCHE=1b). Tested on Intel Elkhartlake
      platform with DWMAC Core 5.20. Observed line rate performance
      improvement with HW descriptor prefetch enabled.
      
      DCHE = 0b
      [  5] local 169.254.1.162 port 42123 connected to 169.254.244.142 port 5201
      [ ID] Interval           Transfer     Bitrate         Total Datagrams
      [  5]   0.00-1.00   sec  96.7 MBytes   811 Mbits/sec  70050
      [  5]   1.00-2.00   sec  96.5 MBytes   809 Mbits/sec  69850
      [  5]   2.00-3.00   sec  96.3 MBytes   808 Mbits/sec  69720
      [  5]   3.00-4.00   sec  95.9 MBytes   804 Mbits/sec  69450
      [  5]   4.00-5.00   sec  96.0 MBytes   806 Mbits/sec  69530
      [  5]   5.00-6.00   sec  96.8 MBytes   812 Mbits/sec  70080
      [  5]   6.00-7.00   sec  96.9 MBytes   813 Mbits/sec  70140
      [  5]   7.00-8.00   sec  96.8 MBytes   812 Mbits/sec  70080
      [  5]   8.00-9.00   sec  97.0 MBytes   814 Mbits/sec  70230
      [  5]   9.00-10.00  sec  96.9 MBytes   813 Mbits/sec  70170
      - - - - - - - - - - - - - - - - - - - - - - - - -
      [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
      [  5]   0.00-10.00  sec   966 MBytes   810 Mbits/sec  0.000 ms  0/699300 (0%)  sender
      [  5]   0.00-10.00  sec   966 MBytes   810 Mbits/sec  0.011 ms  0/699265 (0%)  receiver
      
      DCHE = 1b
      [  5] local 169.254.1.162 port 49740 connected to 169.254.244.142 port 5201
      [ ID] Interval           Transfer     Bitrate         Total Datagrams
      [  5]   0.00-1.00   sec  97.9 MBytes   821 Mbits/sec  70880
      [  5]   1.00-2.00   sec  98.1 MBytes   823 Mbits/sec  71060
      [  5]   2.00-3.00   sec  98.2 MBytes   824 Mbits/sec  71140
      [  5]   3.00-4.00   sec  98.2 MBytes   824 Mbits/sec  71090
      [  5]   4.00-5.00   sec  98.1 MBytes   823 Mbits/sec  71050
      [  5]   5.00-6.00   sec  98.1 MBytes   823 Mbits/sec  71040
      [  5]   6.00-7.00   sec  98.1 MBytes   823 Mbits/sec  71050
      [  5]   7.00-8.00   sec  98.2 MBytes   824 Mbits/sec  71140
      [  5]   8.00-9.00   sec  98.2 MBytes   824 Mbits/sec  71120
      [  5]   9.00-10.00  sec  98.3 MBytes   824 Mbits/sec  71150
      - - - - - - - - - - - - - - - - - - - - - - - - -
      [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
      [  5]   0.00-10.00  sec   981 MBytes   823 Mbits/sec  0.000 ms  0/710720 (0%)  sender
      [  5]   0.00-10.00  sec   981 MBytes   823 Mbits/sec  0.041 ms  0/710650 (0%) receiver
      Signed-off-by: default avatarMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      676b7ec6
    • Mohammad Athari Bin Ismail's avatar
      net: stmmac: Add HW descriptor prefetch setting for DWMAC Core 5.20 onwards · 96874c61
      Mohammad Athari Bin Ismail authored
      DWMAC Core 5.20 onwards supports HW descriptor prefetching.
      Additionally, it also depends on platform specific RTL configuration.
      This capability could be enabled by setting DMA_Mode bit-19 (DCHE).
      
      So, to enable this cability, platform must set plat->dma_cfg->dche = true
      and the DWMAC core version must be 5.20 onwards. Else, this capability
      wouldn`t be configured
      Signed-off-by: default avatarMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96874c61
    • Hans Westgaard Ry's avatar
      net/mlx4: Treat VFs fair when handling comm_channel_events · 79ebfb11
      Hans Westgaard Ry authored
      Handling comm_channel_event in mlx4_master_comm_channel uses a double
      loop to determine which slaves have requested work. The search is
      always started at lowest slave. This leads to unfairness; lower VFs
      tends to be prioritized over higher VFs.
      
      The patch uses find_next_bit to determine which slaves to handle.
      Fairness is implemented by always starting at the next to the last
      start.
      
      An MPI program has been used to measure improvements. It runs 500
      ibv_reg_mr, synchronizes with all other instances and then runs 500
      ibv_dereg_mr.
      
      The results running 500 processes, time reported is for running 500
      calls:
      
      ibv_reg_mr:
                   Mod.   Org.
      mlx4_1    403.356ms 424.674ms
      mlx4_2    403.355ms 424.674ms
      mlx4_3    403.354ms 424.674ms
      mlx4_4    403.355ms 424.674ms
      mlx4_5    403.357ms 424.677ms
      mlx4_6    403.354ms 424.676ms
      mlx4_7    403.357ms 424.675ms
      mlx4_8    403.355ms 424.675ms
      
      ibv_dereg_mr:
                   Mod.   Org.
      mlx4_1    116.408ms 142.818ms
      mlx4_2    116.434ms 142.793ms
      mlx4_3    116.488ms 143.247ms
      mlx4_4    116.679ms 143.230ms
      mlx4_5    112.017ms 107.204ms
      mlx4_6    112.032ms 107.516ms
      mlx4_7    112.083ms 184.195ms
      mlx4_8    115.089ms 190.618ms
      Suggested-by: default avatarHåkon Bugge <haakon.bugge@oracle.com>
      Signed-off-by: default avatarHans Westgaard Ry <hans.westgaard.ry@oracle.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79ebfb11
    • Hayes Wang's avatar
      r8152: replace return with break for ram code speedup mode timeout · f49c35b8
      Hayes Wang authored
      When the timeout occurs, we still have to run the following process
      for releasing patch request. Otherwise, the PHY would keep no link.
      Therefore, use break to stop the loop of loading firmware and
      release the patch request rather than return the function directly.
      
      Fixes: 4a51b0e8 ("r8152: support PHY firmware for RTL8156 series")
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f49c35b8
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 9904e1ee
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2021-04-22
      
      This series contains updates to virtchnl header file, ice, and iavf
      drivers.
      
      Vignesh adds support to warn about potentially malicious VFs; those that
      are overflowing the mailbox for the ice driver.
      
      Michal adds support for an allowlist/denylist of VF commands based on
      supported capabilities for the ice driver.
      
      Brett adds support for iavf UDP segmentation offload by adding the
      capability bit to virtchnl, advertising support in the ice driver, and
      enabling it in the iavf driver. He also adds a helper function for
      getting the VF VSI for ice.
      
      Colin Ian King removes an unneeded pointer assignment.
      
      Qi enables support in the ice driver to support virtchnl requests from
      the iavf to configure its own RSS input set. This includes adding new
      capability bits, structures, and commands to virtchnl header file.
      
      Haiyue enables configuring RSS flow hash via ethtool to support TCP, UDP
      and SCTP protocols in iavf.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9904e1ee
    • Arnd Bergmann's avatar
      vxge: avoid -Wemtpy-body warnings · 3197a98c
      Arnd Bergmann authored
      There are a few warnings about empty debug macros in this driver:
      
      drivers/net/ethernet/neterion/vxge/vxge-main.c: In function 'vxge_probe':
      drivers/net/ethernet/neterion/vxge/vxge-main.c:4480:76: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
       4480 |                                 "Failed in enabling SRIOV mode: %d\n", ret);
      
      Change them to proper 'do { } while (0)' expressions to make the
      code a little more robust and avoid the warnings.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3197a98c
    • Loic Poulain's avatar
      net: wwan: core: Return poll error in case of port removal · 57e22247
      Loic Poulain authored
      Ensure that the poll system call returns proper error flags when port
      is removed (nullified port ops), allowing user side to properly fail,
      without further read or write.
      
      Fixes: 9a44c1cc ("net: Add a WWAN subsystem")
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57e22247
    • Ido Schimmel's avatar
      netdevsim: Only use sampling truncation length when valid · a9b5d871
      Ido Schimmel authored
      When the sampling truncation length is invalid (zero), pass the length
      of the packet. Without the fix, no payload is reported to user space
      when the truncation length is zero.
      
      Fixes: a8700c3d ("netdevsim: Add dummy psample implementation")
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9b5d871
    • Arnd Bergmann's avatar
      net: enetc: fix link error again · 74c97ea3
      Arnd Bergmann authored
      A link time bug that I had fixed before has come back now that
      another sub-module was added to the enetc driver:
      
      ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!
      
      The problem is that the enetc Makefile is not actually used for
      the ierb module if that is the only built-in driver in there
      and everything else is a loadable module.
      
      Fix it by always entering the directory this time, regardless
      of which symbols are configured. This should reliably fix the
      problem and prevent it from coming back another time.
      
      Fixes: 112463dd ("net: dsa: felix: fix link error")
      Fixes: e7d48e5f ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74c97ea3
    • Arnd Bergmann's avatar
      net: mana: fix PCI_HYPERV dependency · 45b102dd
      Arnd Bergmann authored
      The MANA driver causes a build failure in some configurations when
      it selects an unavailable symbol:
      
      WARNING: unmet direct dependencies detected for PCI_HYPERV
        Depends on [n]: PCI [=y] && X86_64 [=y] && HYPERV [=n] && PCI_MSI [=y] && PCI_MSI_IRQ_DOMAIN [=y] && SYSFS [=y]
        Selected by [y]:
        - MICROSOFT_MANA [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROSOFT [=y] && PCI_MSI [=y] && X86_64 [=y]
      drivers/pci/controller/pci-hyperv.c: In function 'hv_irq_unmask':
      drivers/pci/controller/pci-hyperv.c:1217:9: error: implicit declaration of function 'hv_set_msi_entry_from_desc' [-Werror=implicit-function-declaration]
       1217 |         hv_set_msi_entry_from_desc(&params->int_entry.msi_entry, msi_desc);
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      
      A PCI driver should never depend on a particular host bridge
      implementation in the first place, but if we have this dependency
      it's better to express it as a 'depends on' rather than 'select'.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarDexuan Cui <decui@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45b102dd