1. 02 10月, 2019 2 次提交
  2. 26 9月, 2019 1 次提交
    • T
      net: stmmac: Fix page pool size · 4f28bd95
      Thierry Reding 提交于
      The size of individual pages in the page pool in given by an order. The
      order is the binary logarithm of the number of pages that make up one of
      the pages in the pool. However, the driver currently passes the number
      of pages rather than the order, so it ends up wasting quite a bit of
      memory.
      
      Fix this by taking the binary logarithm and passing that in the order
      field.
      
      Fixes: 2af6106a ("net: stmmac: Introducing support for Page Pool")
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f28bd95
  3. 16 9月, 2019 1 次提交
  4. 11 9月, 2019 2 次提交
  5. 07 9月, 2019 1 次提交
  6. 05 9月, 2019 3 次提交
  7. 23 8月, 2019 1 次提交
  8. 18 8月, 2019 6 次提交
    • J
      net: stmmac: Add support for VLAN Insertion Offload · 30d93227
      Jose Abreu 提交于
      Adds the logic to insert a given VLAN ID in a packet. This is offloaded
      to HW and its descriptor based. For now, only XGMAC implements the
      necessary callbacks.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30d93227
    • J
      net: stmmac: Add support for SA Insertion/Replacement in XGMAC cores · 8000ddc0
      Jose Abreu 提交于
      Add the support for Source Address Insertion and Replacement in XGMAC
      cores. Two methods are supported: Descriptor based and register based.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8000ddc0
    • J
      net: stmmac: Add a counter for Split Header packets · b5418e13
      Jose Abreu 提交于
      Add a counter that increments each time a packet with split header is
      received.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5418e13
    • J
      net: stmmac: Add Split Header support and enable it in XGMAC cores · 67afd6d1
      Jose Abreu 提交于
      Add the support for Split Header feature in the RX path and enable it in
      XGMAC cores.
      
      This does not impact neither beneficts bandwidth but it does reduces CPU
      usage because without the feature all the entire packet is memcpy'ed,
      while that with the feature only the header is.
      
      With Split Header disabled 'perf stat -d' gives:
      86870.624945 task-clock (msec)      #    0.429 CPUs utilized
           1073352 context-switches       #    0.012 M/sec
                 1 cpu-migrations         #    0.000 K/sec
               213 page-faults            #    0.002 K/sec
      327113872376 cycles                 #    3.766 GHz (62.53%)
       56618161216 instructions           #    0.17  insn per cycle (75.06%)
       10742205071 branches               #  123.658 M/sec (75.36%)
         584309242 branch-misses          #    5.44% of all branches (75.19%)
       17594787965 L1-dcache-loads        #  202.540 M/sec (74.88%)
        4003773131 L1-dcache-load-misses  #   22.76% of all L1-dcache hits (74.89%)
        1313301468 LLC-loads              #   15.118 M/sec (49.75%)
         355906510 LLC-load-misses        #   27.10% of all LL-cache hits (49.92%)
      
      With Split Header enabled 'perf stat -d' gives:
      49324.456539 task-clock (msec)     #    0.245 CPUs utilized
           2542387 context-switches      #    0.052 M/sec
                 1 cpu-migrations        #    0.000 K/sec
               213 page-faults           #    0.004 K/sec
      177092791469 cycles                #    3.590 GHz (62.30%)
       68555756017 instructions          #    0.39  insn per cycle (75.16%)
       12697019382 branches              #  257.418 M/sec (74.81%)
         442081897 branch-misses         #    3.48% of all branches (74.79%)
       20337958358 L1-dcache-loads       #  412.330 M/sec (75.46%)
        3820210140 L1-dcache-load-misses #   18.78% of all L1-dcache hits (75.35%)
        1257719198 LLC-loads             #   25.499 M/sec (49.73%)
         685543923 LLC-load-misses       #   54.51% of all LL-cache hits (49.86%)
      
      Changes from v2:
      	- Reword commit message (Jakub)
      Changes from v1:
      	- Add performance info (David)
      	- Add misssing dma_sync_single_for_device()
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67afd6d1
    • J
      net: stmmac: Prepare to add Split Header support · ec222003
      Jose Abreu 提交于
      In order to add Split Header support, stmmac_rx() needs to take into
      account that packet may be split accross multiple descriptors.
      
      Refactor the logic of this function in order to support this scenario.
      
      Changes from v2:
      	- Fixup if condition detection (Jakub)
      	- Don't stop NAPI with unfinished packet (Jakub)
      	- Use napi_alloc_skb() (Jakub)
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec222003
    • J
      net: stmmac: Get correct timestamp values from XGMAC · 25e80cd0
      Jose Abreu 提交于
      TX Timestamp in XGMAC comes from MAC instead of descriptors. Implement
      this in a new callback.
      
      Also, RX Timestamp in XGMAC must be cheked against corruption and we need
      a barrier to make sure that descriptor fields are read correctly.
      
      Changes from v2:
      	- Rework return code check (Jakub)
      Changes from v1:
      	- Rework the get timestamp function (David)
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25e80cd0
  9. 11 8月, 2019 1 次提交
    • G
      stmmac: no need to check return value of debugfs_create functions · 8d72ab11
      Greg Kroah-Hartman 提交于
      When calling debugfs functions, there is no need to ever check the
      return value.  The function can work or not, but the code logic should
      never do something different based on this.
      
      Because we don't care about the individual files, we can remove the
      stored dentry for the files, as they are not needed to be kept track of
      at all.
      
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-stm32@st-md-mailman.stormreply.com
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d72ab11
  10. 09 8月, 2019 2 次提交
  11. 01 8月, 2019 1 次提交
  12. 31 7月, 2019 1 次提交
    • J
      net: stmmac: Sync RX Buffer upon allocation · 3caa61c2
      Jose Abreu 提交于
      With recent changes that introduced support for Page Pool in stmmac, Jon
      reported that NFS boot was no longer working on an ARM64 based platform
      that had the IP behind an IOMMU.
      
      As Page Pool API does not guarantee DMA syncing because of the use of
      DMA_ATTR_SKIP_CPU_SYNC flag, we have to explicit sync the whole buffer upon
      re-allocation because we are always re-using same pages.
      
      In fact, ARM64 code invalidates the DMA area upon two situations [1]:
      	- sync_single_for_cpu(): Invalidates if direction != DMA_TO_DEVICE
      	- sync_single_for_device(): Invalidates if direction == DMA_FROM_DEVICE
      
      So, as we must invalidate both the current RX buffer and the newly allocated
      buffer we propose this fix.
      
      [1] arch/arm64/mm/cache.S
      Reported-by: NJon Hunter <jonathanh@nvidia.com>
      Tested-by: NJon Hunter <jonathanh@nvidia.com>
      Fixes: 2af6106a ("net: stmmac: Introducing support for Page Pool")
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Tested-by: NEzequiel Garcia <ezequiel@collabora.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3caa61c2
  13. 23 7月, 2019 3 次提交
  14. 10 7月, 2019 5 次提交
  15. 09 7月, 2019 1 次提交
  16. 29 6月, 2019 8 次提交
  17. 27 6月, 2019 1 次提交
    • J
      net: stmmac: Fix crash observed if PHY does not support EEE · 177d935a
      Jon Hunter 提交于
      If the PHY does not support EEE mode, then a crash is observed when the
      ethernet interface is enabled. The crash occurs, because if the PHY does
      not support EEE, then although the EEE timer is never configured, it is
      still marked as enabled and so the stmmac ethernet driver is still
      trying to update the timer by calling mod_timer(). This triggers a BUG()
      in the mod_timer() because we are trying to update a timer when there is
      no callback function set because timer_setup() was never called for this
      timer.
      
      The problem is caused because we return true from the function
      stmmac_eee_init(), marking the EEE timer as enabled, even when we have
      not configured the EEE timer. Fix this by ensuring that we return false
      if the PHY does not support EEE and hence, 'eee_active' is not set.
      
      Fixes: 74371272 ("net: stmmac: Convert to phylink and remove phylib logic")
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Tested-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      177d935a