1. 09 2月, 2022 6 次提交
    • I
      dpaa2-eth: add support for software TSO · 3dc709e0
      Ioana Ciornei 提交于
      This patch adds support for driver level TSO in the enetc driver using
      the TSO API.
      
      There is not much to say about this specific implementation. We are
      using the usual tso_build_hdr(), tso_build_data() to create each data
      segment, we create an array of S/G FDs where the first S/G entry is
      referencing the header data and the remaining ones the data portion.
      
      For the S/G Table buffer we use the same cache of buffers used on the
      other non-GSO cases - dpaa2_eth_sgt_get() and dpaa2_eth_sgt_recycle().
      
      We cannot keep a DMA coherent buffer for all the TSO headers because the
      DPAA2 architecture does not work in a ring based fashion so we just
      allocate a buffer each time.
      
      Even with these limitations we get the following improvement in TCP
      termination on the LX2160A SoC, on a single A72 core running at 2.2GHz.
      
      before: 6.38Gbit/s
      after:  8.48Gbit/s
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dc709e0
    • I
      dpaa2-eth: work with an array of FDs · a4ca448e
      Ioana Ciornei 提交于
      Up until now, the __dpaa2_eth_tx function used a single FD on the stack
      to construct the structure to be enqueued. Since we are now preparing
      the ground work to add support for TSO done in software at the driver
      level, the same function needs to work with an array of FDs and enqueue
      as many as the build_*_fd functions create.
      
      Make the necessary adjustments in order to do this. These include:
      keeping an array of FDs in a percpu structure, cleaning up the necessary
      FDs before populating it and then, retrying the enqueue process up till
      all the generated FDs were enqueued or until we reach the maximum number
      retries.
      
      This patch does not change the fact that only a single FD will result
      from a __dpaa2_eth_tx call but rather just creates the necessary changes
      for the next patch.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4ca448e
    • I
      dpaa2-eth: use the S/G table cache also for the normal S/G path · a4218aef
      Ioana Ciornei 提交于
      Instead of allocating memory for an S/G table each time a nonlinear skb
      is processed, and then freeing it on the Tx confirmation path, use the
      S/G table cache in order to reuse the memory.
      
      For this to work we have to change the size of the cached buffers so
      that it can hold the maximum number of scatterlist entries.
      
      Other than that, each allocate/free call is replaced by a call to the
      dpaa2_eth_sgt_get/dpaa2_eth_sgt_recycle functions, introduced in the
      previous patch.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4218aef
    • I
      dpaa2-eth: extract the S/G table buffer cache interaction into functions · ae3b0817
      Ioana Ciornei 提交于
      The dpaa2-eth driver uses in certain circumstances a buffer cache for
      the S/G tables needed in case of a S/G FD. At the moment, the
      interraction with the cache is open-coded and couldn't be reused easily.
      
      Add two new functions - dpaa2_eth_sgt_get and dpaa2_eth_sgt_recycle -
      which help with code reusability.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae3b0817
    • I
      dpaa2-eth: allocate a fragment already aligned · 8378a791
      Ioana Ciornei 提交于
      Instead of allocating memory and then manually aligning it to the
      desired value use napi_alloc_frag_align() directly to streamline the
      process.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8378a791
    • I
      dpaa2-eth: rearrange variable declaration in __dpaa2_eth_tx · 035dd64d
      Ioana Ciornei 提交于
      In the next patches we'll be moving things arroung in the mentioned
      function and also add some new variable declarations. Before all this,
      cleanup the variable declaration order.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      035dd64d
  2. 27 1月, 2022 1 次提交
  3. 07 1月, 2022 3 次提交
  4. 03 1月, 2022 1 次提交
  5. 17 12月, 2021 1 次提交
  6. 16 12月, 2021 1 次提交
  7. 14 12月, 2021 1 次提交
  8. 30 11月, 2021 1 次提交
  9. 18 11月, 2021 3 次提交
  10. 17 11月, 2021 1 次提交
  11. 15 10月, 2021 2 次提交
  12. 05 10月, 2021 1 次提交
  13. 04 10月, 2021 1 次提交
  14. 27 9月, 2021 1 次提交
  15. 22 9月, 2021 1 次提交
  16. 19 9月, 2021 1 次提交
  17. 31 8月, 2021 1 次提交
    • J
      dpaa2-eth: Replace strlcpy with strscpy · 995786ba
      Jason Wang 提交于
      The strlcpy should not be used because it doesn't limit the source
      length. As linus says, it's a completely useless function if you
      can't implicitly trust the source string - but that is almost always
      why people think they should use it! All in all the BSD function
      will lead some potential bugs.
      
      But the strscpy doesn't require reading memory from the src string
      beyond the specified "count" bytes, and since the return value is
      easier to error-check than strlcpy()'s. In addition, the implementation
      is robust to the string changing out from underneath it, unlike the
      current strlcpy() implementation.
      
      Thus, We prefer using strscpy instead of strlcpy.
      Signed-off-by: NJason Wang <wangborong@cdjrlc.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      995786ba
  18. 20 8月, 2021 3 次提交
  19. 09 8月, 2021 1 次提交
    • L
      devlink: Set device as early as possible · 919d13a7
      Leon Romanovsky 提交于
      All kernel devlink implementations call to devlink_alloc() during
      initialization routine for specific device which is used later as
      a parent device for devlink_register().
      
      Such late device assignment causes to the situation which requires us to
      call to device_register() before setting other parameters, but that call
      opens devlink to the world and makes accessible for the netlink users.
      
      Any attempt to move devlink_register() to be the last call generates the
      following error due to access to the devlink->dev pointer.
      
      [    8.758862]  devlink_nl_param_fill+0x2e8/0xe50
      [    8.760305]  devlink_param_notify+0x6d/0x180
      [    8.760435]  __devlink_params_register+0x2f1/0x670
      [    8.760558]  devlink_params_register+0x1e/0x20
      
      The simple change of API to set devlink device in the devlink_alloc()
      instead of devlink_register() fixes all this above and ensures that
      prior to call to devlink_register() everything already set.
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      919d13a7
  20. 04 8月, 2021 8 次提交
  21. 03 8月, 2021 1 次提交