1. 10 Aug, 2024 4 commits
    • Nick Child's avatar
      ibmvnic: Only replenish rx pool when resources are getting low · dda10fc8
      Nick Child authored
      Previously, the driver would replenish the rx pool if the polling
      function consumed less than the budget. The logic being that the driver
      did not exhaust its budget so that must mean that the driver is not busy
      and has cycles to spare for replenishing the pool.
      
      So pool replenishment happens on every poll which did not consume
      the budget. This can very costly during request-response tests.
      
      In fact, an extra ~100pps can be seen in TCP_RR_150 tests when we remove
      this conditional. Trace results (ftrace, graph-time=1) for the poll
      function are below:
      Previous results:
          ibmvnic_poll = 64951846.0 us / 4167628.0 hits = AVG 15.58
          replenish_rx_pool = 17602846.0 us / 4710437.0 hits = AVG 3.74
      Now:
          ibmvnic_poll = 57673941.0 us / 4791737.0 hits = AVG 12.04
          replenish_rx_pool = 3938171.6 us / 4314.0 hits = AVG 912.88
      
      While the replenish function takes longer, it is hit less frequently
      meaning the ibmvnic_poll function, on average, is faster.
      
      Furthermore, this change does not have a negative effect on
      performance bandwidth/latency measurements.
      Signed-off-by: default avatarNick Child <nnac123@linux.ibm.com>
      Link: https://patch.msgid.link/20240807211809.1259563-2-nnac123@linux.ibm.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dda10fc8
    • Christophe Leroy's avatar
      net: fs_enet: Fix warning due to wrong type · c146f3d1
      Christophe Leroy authored
      Building fs_enet on powerpc e500 leads to following warning:
      
          CC      drivers/net/ethernet/freescale/fs_enet/mac-scc.o
        In file included from ./include/linux/build_bug.h:5,
                         from ./include/linux/container_of.h:5,
                         from ./include/linux/list.h:5,
                         from ./include/linux/module.h:12,
                         from drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15:
        drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd':
        ./include/linux/err.h:28:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           28 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
              |                                                 ^
        ./include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
           77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
              |                                             ^
        drivers/net/ethernet/freescale/fs_enet/mac-scc.c:138:13: note: in expansion of macro 'IS_ERR_VALUE'
          138 |         if (IS_ERR_VALUE(fep->ring_mem_addr))
              |             ^~~~~~~~~~~~
      
      This is due to fep->ring_mem_addr not being a pointer but a DMA
      address which is 64 bits on that platform while pointers are
      32 bits as this is a 32 bits platform with wider physical bus.
      
      However, using fep->ring_mem_addr is just wrong because
      cpm_muram_alloc() returns an offset within the muram and not
      a physical address directly. So use fpi->dpram_offset instead.
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://patch.msgid.link/ec67ea3a3bef7e58b8dc959f7c17d405af0d27e4.1723101144.git.christophe.leroy@csgroup.euSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c146f3d1
    • zhangxiangqian's avatar
      net: usb: cdc_ether: don't spew notifications · 2d5c9dd2
      zhangxiangqian authored
      The usbnet_link_change function is not called, if the link has not changed.
      
      ...
      [16913.807393][ 3] cdc_ether 1-2:2.0 enx00e0995fd1ac: kevent 12 may have been dropped
      [16913.822266][ 2] cdc_ether 1-2:2.0 enx00e0995fd1ac: kevent 12 may have been dropped
      [16913.826296][ 2] cdc_ether 1-2:2.0 enx00e0995fd1ac: kevent 11 may have been dropped
      ...
      
      kevent 11 is scheduled too frequently and may affect other event schedules.
      Signed-off-by: default avatarzhangxiangqian <zhangxiangqian@kylinos.cn>
      Acked-by: default avatarOliver Neukum <oneukum@suse.com>
      Link: https://patch.msgid.link/1723109985-11996-1-git-send-email-zhangxiangqian@kylinos.cnSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2d5c9dd2
    • Mina Almasry's avatar
      ethtool: refactor checking max channels · 916b7d31
      Mina Almasry authored
      Currently ethtool_set_channel calls separate functions to check whether
      the new channel number violates rss configuration or flow steering
      configuration.
      
      Very soon we need to check whether the new channel number violates
      memory provider configuration as well.
      
      To do all 3 checks cleanly, add a wrapper around
      ethtool_get_max_rxnfc_channel() and ethtool_get_max_rxfh_channel(),
      which does both checks. We can later extend this wrapper to add the
      memory provider check in one place.
      
      Note that in the current code, we put a descriptive genl error message
      when we run into issues. To preserve the error message, we pass the
      genl_info* to the common helper. The ioctl calls can pass NULL instead.
      Suggested-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
      Link: https://patch.msgid.link/20240808205345.2141858-1-almasrymina@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      916b7d31
  2. 09 Aug, 2024 11 commits
  3. 08 Aug, 2024 25 commits