1. 29 12月, 2021 1 次提交
  2. 16 12月, 2021 1 次提交
  3. 05 10月, 2021 1 次提交
  4. 30 9月, 2021 1 次提交
    • J
      ixgbe: let the xdpdrv work with more than 64 cpus · 4fe81585
      Jason Xing 提交于
      Originally, ixgbe driver doesn't allow the mounting of xdpdrv if the
      server is equipped with more than 64 cpus online. So it turns out that
      the loading of xdpdrv causes the "NOMEM" failure.
      
      Actually, we can adjust the algorithm and then make it work through
      mapping the current cpu to some xdp ring with the protect of @tx_lock.
      
      Here are some numbers before/after applying this patch with xdp-example
      loaded on the eth0X:
      
      As client (tx path):
                           Before    After
      TCP_STREAM send-64   734.14    714.20
      TCP_STREAM send-128  1401.91   1395.05
      TCP_STREAM send-512  5311.67   5292.84
      TCP_STREAM send-1k   9277.40   9356.22 (not stable)
      TCP_RR     send-1    22559.75  21844.22
      TCP_RR     send-128  23169.54  22725.13
      TCP_RR     send-512  21670.91  21412.56
      
      As server (rx path):
                           Before    After
      TCP_STREAM send-64   1416.49   1383.12
      TCP_STREAM send-128  3141.49   3055.50
      TCP_STREAM send-512  9488.73   9487.44
      TCP_STREAM send-1k   9491.17   9356.22 (not stable)
      TCP_RR     send-1    23617.74  23601.60
      ...
      
      Notice: the TCP_RR mode is unstable as the official document explains.
      
      I tested many times with different parameters combined through netperf.
      Though the result is not that accurate, I cannot see much influence on
      this patch. The static key is places on the hot path, but it actually
      shouldn't cause a huge regression theoretically.
      Co-developed-by: NShujin Li <lishujin@kuaishou.com>
      Signed-off-by: NShujin Li <lishujin@kuaishou.com>
      Signed-off-by: NJason Xing <xingwanli@kuaishou.com>
      Tested-by: NSandeep Penigalapati <sandeep.penigalapati@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fe81585
  5. 29 9月, 2021 1 次提交
    • F
      ixgbe: Fix NULL pointer dereference in ixgbe_xdp_setup · 513e605d
      Feng Zhou 提交于
      The ixgbe driver currently generates a NULL pointer dereference with
      some machine (online cpus < 63). This is due to the fact that the
      maximum value of num_xdp_queues is nr_cpu_ids. Code is in
      "ixgbe_set_rss_queues"".
      
      Here's how the problem repeats itself:
      Some machine (online cpus < 63), And user set num_queues to 63 through
      ethtool. Code is in the "ixgbe_set_channels",
      	adapter->ring_feature[RING_F_FDIR].limit = count;
      
      It becomes 63.
      
      When user use xdp, "ixgbe_set_rss_queues" will set queues num.
      	adapter->num_rx_queues = rss_i;
      	adapter->num_tx_queues = rss_i;
      	adapter->num_xdp_queues = ixgbe_xdp_queues(adapter);
      
      And rss_i's value is from
      	f = &adapter->ring_feature[RING_F_FDIR];
      	rss_i = f->indices = f->limit;
      
      So "num_rx_queues" > "num_xdp_queues", when run to "ixgbe_xdp_setup",
      	for (i = 0; i < adapter->num_rx_queues; i++)
      		if (adapter->xdp_ring[i]->xsk_umem)
      
      It leads to panic.
      
      Call trace:
      [exception RIP: ixgbe_xdp+368]
      RIP: ffffffffc02a76a0  RSP: ffff9fe16202f8d0  RFLAGS: 00010297
      RAX: 0000000000000000  RBX: 0000000000000020  RCX: 0000000000000000
      RDX: 0000000000000000  RSI: 000000000000001c  RDI: ffffffffa94ead90
      RBP: ffff92f8f24c0c18   R8: 0000000000000000   R9: 0000000000000000
      R10: ffff9fe16202f830  R11: 0000000000000000  R12: ffff92f8f24c0000
      R13: ffff9fe16202fc01  R14: 000000000000000a  R15: ffffffffc02a7530
      ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
       7 [ffff9fe16202f8f0] dev_xdp_install at ffffffffa89fbbcc
       8 [ffff9fe16202f920] dev_change_xdp_fd at ffffffffa8a08808
       9 [ffff9fe16202f960] do_setlink at ffffffffa8a20235
      10 [ffff9fe16202fa88] rtnl_setlink at ffffffffa8a20384
      11 [ffff9fe16202fc78] rtnetlink_rcv_msg at ffffffffa8a1a8dd
      12 [ffff9fe16202fcf0] netlink_rcv_skb at ffffffffa8a717eb
      13 [ffff9fe16202fd40] netlink_unicast at ffffffffa8a70f88
      14 [ffff9fe16202fd80] netlink_sendmsg at ffffffffa8a71319
      15 [ffff9fe16202fdf0] sock_sendmsg at ffffffffa89df290
      16 [ffff9fe16202fe08] __sys_sendto at ffffffffa89e19c8
      17 [ffff9fe16202ff30] __x64_sys_sendto at ffffffffa89e1a64
      18 [ffff9fe16202ff38] do_syscall_64 at ffffffffa84042b9
      19 [ffff9fe16202ff50] entry_SYSCALL_64_after_hwframe at ffffffffa8c0008c
      
      So I fix ixgbe_max_channels so that it will not allow a setting of queues
      to be higher than the num_online_cpus(). And when run to ixgbe_xdp_setup,
      take the smaller value of num_rx_queues and num_xdp_queues.
      
      Fixes: 4a9b32f3 ("ixgbe: fix potential RX buffer starvation for AF_XDP")
      Signed-off-by: NFeng Zhou <zhoufeng.zf@bytedance.com>
      Tested-by: NSandeep Penigalapati <sandeep.penigalapati@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      513e605d
  6. 28 7月, 2021 1 次提交
    • A
      dev_ioctl: split out ndo_eth_ioctl · a7605370
      Arnd Bergmann 提交于
      Most users of ndo_do_ioctl are ethernet drivers that implement
      the MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardware
      timestamping with SIOCSHWTSTAMP/SIOCGHWTSTAMP.
      
      Separate these from the few drivers that use ndo_do_ioctl to
      implement SIOCBOND, SIOCBR and SIOCWANDEV commands.
      
      This is a purely cosmetic change intended to help readers find
      their way through the implementation.
      
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Vivien Didelot <vivien.didelot@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Vladimir Oltean <olteanv@gmail.com>
      Cc: Leon Romanovsky <leon@kernel.org>
      Cc: linux-rdma@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7605370
  7. 21 7月, 2021 1 次提交
    • M
      ixgbe: Fix packet corruption due to missing DMA sync · 09cfae9f
      Markus Boehme 提交于
      When receiving a packet with multiple fragments, hardware may still
      touch the first fragment until the entire packet has been received. The
      driver therefore keeps the first fragment mapped for DMA until end of
      packet has been asserted, and delays its dma_sync call until then.
      
      The driver tries to fit multiple receive buffers on one page. When using
      3K receive buffers (e.g. using Jumbo frames and legacy-rx is turned
      off/build_skb is being used) on an architecture with 4K pages, the
      driver allocates an order 1 compound page and uses one page per receive
      buffer. To determine the correct offset for a delayed DMA sync of the
      first fragment of a multi-fragment packet, the driver then cannot just
      use PAGE_MASK on the DMA address but has to construct a mask based on
      the actual size of the backing page.
      
      Using PAGE_MASK in the 3K RX buffer/4K page architecture configuration
      will always sync the first page of a compound page. With the SWIOTLB
      enabled this can lead to corrupted packets (zeroed out first fragment,
      re-used garbage from another packet) and various consequences, such as
      slow/stalling data transfers and connection resets. For example, testing
      on a link with MTU exceeding 3058 bytes on a host with SWIOTLB enabled
      (e.g. "iommu=soft swiotlb=262144,force") TCP transfers quickly fizzle
      out without this patch.
      
      Cc: stable@vger.kernel.org
      Fixes: 0c5661ec ("ixgbe: fix crash in build_skb Rx code path")
      Signed-off-by: NMarkus Boehme <markubo@amazon.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09cfae9f
  8. 02 7月, 2021 1 次提交
  9. 25 6月, 2021 1 次提交
    • T
      intel: Remove rcu_read_lock() around XDP program invocation · 49589b23
      Toke Høiland-Jørgensen 提交于
      The Intel drivers all have rcu_read_lock()/rcu_read_unlock() pairs around
      XDP program invocations. However, the actual lifetime of the objects
      referred by the XDP program invocation is longer, all the way through to
      the call to xdp_do_flush(), making the scope of the rcu_read_lock() too
      small. This turns out to be harmless because it all happens in a single
      NAPI poll cycle (and thus under local_bh_disable()), but it makes the
      rcu_read_lock() misleading.
      
      Rather than extend the scope of the rcu_read_lock(), just get rid of it
      entirely. With the addition of RCU annotations to the XDP_REDIRECT map
      types that take bh execution into account, lockdep even understands this to
      be safe, so there's really no reason to keep it around.
      Signed-off-by: NToke Høiland-Jørgensen <toke@redhat.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Tested-by: Jesper Dangaard Brouer <brouer@redhat.com> # i40e
      Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
      Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
      Cc: intel-wired-lan@lists.osuosl.org
      Link: https://lore.kernel.org/bpf/20210624160609.292325-12-toke@redhat.com
      49589b23
  10. 03 6月, 2021 1 次提交
  11. 14 4月, 2021 2 次提交
  12. 24 3月, 2021 1 次提交
  13. 18 3月, 2021 1 次提交
  14. 12 3月, 2021 1 次提交
  15. 05 3月, 2021 1 次提交
  16. 13 2月, 2021 1 次提交
  17. 05 2月, 2021 1 次提交
  18. 20 1月, 2021 1 次提交
  19. 09 1月, 2021 2 次提交
  20. 08 1月, 2021 1 次提交
  21. 10 12月, 2020 1 次提交
  22. 01 12月, 2020 1 次提交
  23. 30 9月, 2020 1 次提交
  24. 29 9月, 2020 1 次提交
  25. 26 9月, 2020 1 次提交
    • J
      intel-ethernet: clean up W=1 warnings in kdoc · b50f7bca
      Jesse Brandeburg 提交于
      This takes care of all of the trivial W=1 fixes in the Intel
      Ethernet drivers, which allows developers and maintainers to
      build more of the networking tree with more complete warning
      checks.
      
      There are three classes of kdoc warnings fixed:
       - cannot understand function prototype: 'x'
       - Excess function parameter 'x' description in 'y'
       - Function parameter or member 'x' not described in 'y'
      
      All of the changes were trivial comment updates on
      function headers.
      
      Inspired by Lee Jones' series of wireless work to do the same.
      Compile tested only, and passes simple test of
      $ git ls-files *.[ch] | egrep drivers/net/ethernet/intel | \
        xargs scripts/kernel-doc -none
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b50f7bca
  26. 01 9月, 2020 2 次提交
  27. 27 8月, 2020 1 次提交
  28. 30 7月, 2020 1 次提交
    • V
      ixgbe: use generic power management · 6f82b255
      Vaibhav Gupta 提交于
      With legacy PM hooks, it was the responsibility of a driver to manage PCI
      states and also the device's power state. The generic approach is to let
      PCI core handle the work.
      
      ixgbe_suspend() calls __ixgbe_shutdown() to perform intermediate tasks.
      __ixgbe_shutdown() modifies the value of "wake" (device should be wakeup
      enabled or not), responsible for controlling the flow of legacy PM.
      
      Since, PCI core has no idea about the value of "wake", new code for generic
      PM may produce unexpected results. Thus, use "device_set_wakeup_enable()"
      to wakeup-enable the device accordingly.
      
      Compile-tested only.
      Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      6f82b255
  29. 26 7月, 2020 1 次提交
  30. 11 7月, 2020 2 次提交
  31. 02 7月, 2020 2 次提交
  32. 01 7月, 2020 1 次提交
  33. 26 6月, 2020 1 次提交
    • J
      net/intel: remove driver versions from Intel drivers · 34a2a3b8
      Jeff Kirsher 提交于
      As with other networking drivers, remove the unnecessary driver version
      from the Intel drivers. The ethtool driver information and module version
      will then report the kernel version instead.
      
      For ixgbe, i40e and ice drivers, the driver passes the driver version to
      the firmware to confirm that we are up and running.  So we now pass the
      value of UTS_RELEASE to the firmware.  This adminq call is required per
      the HAS document.  The Device then sends an indication to the BMC that the
      PF driver is present. This is done using Host NC Driver Status Indication
      in NC-SI Get Link command or via the Host Network Controller Driver Status
      Change AEN.
      
      What the BMC may do with this information is implementation-dependent, but
      this is a standard NC-SI 1.1 command we honor per the HAS.
      
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Alek Loktionov <aleksandr.loktionov@intel.com>
      CC: Kevin Liedtke <kevin.d.liedtke@intel.com>
      CC: Aaron Rowden <aaron.f.rowden@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Co-developed-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      34a2a3b8
  34. 19 6月, 2020 1 次提交
  35. 02 6月, 2020 1 次提交