1. 02 7月, 2020 1 次提交
    • A
      i40e: Add support for a new feature Total Port Shutdown · d5ec9e2c
      Arkadiusz Kubalewski 提交于
      After OS requests to down a link on a physical network port, the
      traffic is no longer being processed but the physical link with
      a link partner is still established.
      
      Currently there is a feature (Link down on close) which allows
      to physically bring the link down (after OS request).
      
      With this patch new feature with similar capability is introduced:
      TOTAL_PORT_SHUTDOWN
      Allows to physically disable the link on the NIC's port.
      If enabled, (after link down request from the OS)
      no link, traffic or led activity is possible on that port.
      
      If I40E_FLAG_TOTAL_PORT_SHUTDOWN is enabled, the
      I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED must be explicitly forced to
      true and cannot be disabled at that time.
      The functionalities are exclusive in terms of configuration, but
      they also have similar behavior (allowing to disable physical link
      of the port), with following differences:
      - LINK_DOWN_ON_CLOSE_ENABLED is configurable at host OS run-time
        and is supported by whole family of 7xx Intel Ethernet Controllers
      - TOTAL_PORT_SHUTDOWN may be enabled only before OS loads (in BIOS)
        only if motherboard's BIOS and NIC's FW has support of it
      - when LINK_DOWN_ON_CLOSE_ENABLED is used, the link is being brought
        down by sending phy_type=0 to NIC's FW
      - when TOTAL_PORT_SHUTDOWN is used, phy_type is not altered, instead
        the link is being brought down by clearing bit
        (I40E_AQ_PHY_ENABLE_LINK) in abilities field of
        i40e_aq_set_phy_config structure
      
      Introduced changes:
      - new private flag I40E_FLAG_TOTAL_PORT_SHUTDOWN for handling the
        feature
      - probe of NVM if the feature was enabled at driver's port
        initialization
      - special handling on link-down procedure to let FW physically
        shutdown the port if the feature was enabled
      Signed-off-by: NArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
      Signed-off-by: NAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      d5ec9e2c
  2. 26 6月, 2020 3 次提交
  3. 25 2月, 2020 1 次提交
  4. 19 12月, 2019 1 次提交
  5. 26 10月, 2019 1 次提交
  6. 12 9月, 2019 1 次提交
  7. 10 9月, 2019 1 次提交
  8. 06 8月, 2019 1 次提交
  9. 29 6月, 2019 1 次提交
    • H
      i40e: Add macvlan support on i40e · 1d8d80b4
      Harshitha Ramamurthy 提交于
      This patch enables macvlan offloads for i40e. The idea is to use
      channels as macvlan interfaces. The channels are VSIs of
      type VMDQ. When the first macvlan is created, the maximum number of
      channels possible are created. From then on, as a macvlan interface
      is created, a macvlan filter is added to these already created
      channels (VSIs).
      
      This patch utilizes subordinate device traffic classes to make queue
      groups(channels) available for an upper device like a macvlan.
      
      Steps to configure macvlan offloads:
      1. ethtool -K ethx l2-fwd-offload on
      2. ip link add link ethx name macvlan1 type macvlan
      3. ip addr add <address> dev macvlan1
      4. ip link set macvlan1 up
      Signed-off-by: NHarshitha Ramamurthy <harshitha.ramamurthy@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1d8d80b4
  10. 27 6月, 2019 1 次提交
  11. 06 6月, 2019 1 次提交
  12. 04 5月, 2019 1 次提交
    • A
      i40e: Introduce recovery mode support · 4ff0ee1a
      Alice Michael 提交于
      This patch introduces "recovery mode" to the i40e driver. It is
      part of a new Any2Any idea of upgrading the firmware. In this
      approach, it is required for the driver to have support for
      "transition firmware", that is used for migrating from structured
      to flat firmware image. In this new, very basic mode, i40e driver
      must be able to handle particular IOCTL calls from the NVM Update
      Tool and run a small set of AQ commands.
      
      These additional AQ commands are part of the interface used by
      the NVMUpdate tool.  The NVMUpdate tool contains all of the
      necessary logic to reference these new AQ commands.  The end user
      experience remains the same, they are using the NVMUpdate tool to
      update the NVM contents.
      Signed-off-by: NAlice Michael <alice.michael@intel.com>
      Signed-off-by: NPiotr Marczak <piotr.marczak@intel.com>
      Tested-by: NDon Buchholz <donald.buchholz@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4ff0ee1a
  13. 17 4月, 2019 2 次提交
    • J
      i40e: save PTP time before a device reset · bf4bf09b
      Jacob Keller 提交于
      In the case where PTP is running on the hardware clock, but the kernel
      system time is not being synced, a device reset can mess up the clock
      time.
      
      This occurs because we reset the clock time based on the kernel time
      every reset. This causes us to potentially completely reset the PTP
      time, and can cause unexpected behavior in programs like ptp4l.
      
      Avoid this by saving the PTP time prior to device reset, and then
      restoring using that time after the reset.
      
      Directly restoring the PTP time we saved isn't perfect, because time
      should have continued running, but the clock will essentially be stopped
      during the reset. This is still better than the current solution of
      assuming that the PTP HW clock is synced to the CLOCK_REALTIME.
      
      We can do even better, by saving the ktime and calculating
      a differential, using ktime_get(). This is based on CLOCK_MONOTONIC, and
      allows us to get a fairly precise measure of the time difference between
      saving and restoring the time.
      
      Using this, we can update the saved PTP time, and use that as the value
      to write to the hardware clock registers. This, of course is not perfect.
      However, it does help ensure that the PTP time is restored as close as
      feasible to the time it should have been if the reset had not occurred.
      
      During device initialization, continue using the system time as the
      source for the creation of the PTP clock, since this is the best known
      current time source at driver load.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      bf4bf09b
    • A
      i40e: Implement DDP support in i40e driver · cdc594e0
      Aleksandr Loktionov 提交于
      This patch introduces DDP (Dynamic Device Personalization) which allows
      loading profiles that change the way internal parser interprets processed
      frames. To load DDP profiles it utilizes ethtool flash feature. The files
      with recipes must be located in /var/lib/firmware directory. Afterwards
      the recipe can be loaded by invoking:
      
          ethtool -f <if_name> <file_name> 100
          ethtool -f <if_name> - 100
      
      See further details of this feature in the i40e documentation, or
      visit
      https://www.intel.com/content/www/us/en/architecture-and-technology/ethernet/dynamic-device-personalization-brief.html
      
      The driver shall verify DDP profile can be loaded in accordance with
      the rules:
      * Package with Group ID 0 are exclusive and can only be loaded the first.
      * Packages with Group ID 0x01-0xFE can only be loaded simultaneously
         with the packages from the same group.
      * Packages with Group ID 0xFF are compatible with all other packages.
      Signed-off-by: NAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      cdc594e0
  14. 02 4月, 2019 2 次提交
  15. 22 1月, 2019 2 次提交
  16. 15 11月, 2018 3 次提交
  17. 30 8月, 2018 1 次提交
    • B
      i40e: add AF_XDP zero-copy Rx support · 0a714186
      Björn Töpel 提交于
      This patch adds zero-copy Rx support for AF_XDP sockets. Instead of
      allocating buffers of type MEM_TYPE_PAGE_SHARED, the Rx frames are
      allocated as MEM_TYPE_ZERO_COPY when AF_XDP is enabled for a certain
      queue.
      
      All AF_XDP specific functions are added to a new file, i40e_xsk.c.
      
      Note that when AF_XDP zero-copy is enabled, the XDP action XDP_PASS
      will allocate a new buffer and copy the zero-copy frame prior passing
      it to the kernel stack.
      Signed-off-by: NBjörn Töpel <bjorn.topel@intel.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      0a714186
  18. 01 5月, 2018 3 次提交
  19. 28 4月, 2018 1 次提交
  20. 27 3月, 2018 6 次提交
  21. 24 3月, 2018 1 次提交
  22. 20 3月, 2018 1 次提交
  23. 15 2月, 2018 1 次提交
    • A
      i40e: Add and delete cloud filter · e284fc28
      Avinash Dayanand 提交于
      This patch provides support to add or delete cloud filter for queue
      channels created for ADq on VF.
      We are using the HW's cloud filter feature and programming it to act
      as a TC filter applied to a group of queues.
      
      There are two possible modes for a VF when applying a cloud filter
      1. Basic Mode:	Intended to apply filters that don't need a VF to be
      		Trusted. This would include the following
      		  Dest MAC + L4 port
      		  Dest MAC + VLAN + L4 port
      2. Advanced Mode: This mode is only for filters with combination that
      		  requires VF to be Trusted.
      		  Dest IP + L4 port
      
      When cloud filters are applied on a trusted VF and for some reason
      the same VF is later made as untrusted then all cloud filters
      will be deleted. All cloud filters has to be re-applied in
      such a case.
      Cloud filters are also deleted when queue channel is deleted.
      
      Testing-Hints:
      =============
      1. Adding Basic Mode filter should be possible on a VF in
         Non-Trusted mode.
      2. In Advanced mode all filters should be able to be created.
      
      Steps:
      ======
      1. Enable ADq and create TCs using TC mqprio command
      2. Apply cloud filter.
      3. Turn-off the spoof check.
      4. Pass traffic.
      
      Example:
      ========
      1. tc qdisc add dev enp4s2 root mqprio num_tc 4 map 0 0 0 0 1 2 2 3\
      	queues 2@0 2@2 1@4 1@5 hw 1 mode channel
      2. tc qdisc add dev enp4s2 ingress
      3. ethtool -K enp4s2 hw-tc-offload on
      4. ip link set ens261f0 vf 0 spoofchk off
      5. tc filter add dev enp4s2 protocol ip parent ffff: prio 1 flower\
      	dst_ip 192.168.3.5/32 ip_proto udp dst_port 25 skip_sw hw_tc 2
      Signed-off-by: NAvinash Dayanand <avinash.dayanand@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e284fc28
  24. 14 2月, 2018 1 次提交
  25. 13 2月, 2018 1 次提交
    • A
      i40e/i40evf: Add support for new mechanism of updating adaptive ITR · a0073a4b
      Alexander Duyck 提交于
      This patch replaces the existing mechanism for determining the correct
      value to program for adaptive ITR with yet another new and more
      complicated approach.
      
      The basic idea from a 30K foot view is that this new approach will push the
      Rx interrupt moderation up so that by default it starts in low latency and
      is gradually pushed up into a higher latency setup as long as doing so
      increases the number of packets processed, if the number of packets drops
      to 4 to 1 per packet we will reset and just base our ITR on the size of the
      packets being received. For Tx we leave it floating at a high interrupt
      delay and do not pull it down unless we start processing more than 112
      packets per interrupt. If we start exceeding that we will cut our interrupt
      rates in half until we are back below 112.
      
      The side effect of these patches are that we will be processing more
      packets per interrupt. This is both a good and a bad thing as it means we
      will not be blocking processing in the case of things like pktgen and XDP,
      but we will also be consuming a bit more CPU in the cases of things such as
      network throughput tests using netperf.
      
      One delta from this versus the ixgbe version of the changes is that I have
      made the interrupt moderation a bit more aggressive when we are in bulk
      mode by moving our "goldilocks zone" up from 48 to 96 to 56 to 112. The
      main motivation behind moving this is to address the fact that we need to
      update less frequently, and have more fine grained control due to the
      separate Tx and Rx ITR times.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a0073a4b
  26. 27 1月, 2018 1 次提交