1. 20 4月, 2017 3 次提交
    • S
      i40e/i40evf: Add tracepoints · ed0980c4
      Scott Peterson 提交于
      This patch adds tracepoints to the i40e and i40evf drivers to which
      BPF programs can be attached for feature testing and verification.
      It's expected that an attached BPF program will identify and count or
      log some interesting subset of traffic. The bcc-tools package is
      helpful there for containing all the BPF arcana in a handy Python
      wrapper. Though you can make these tracepoints log trace messages, the
      messages themselves probably won't be very useful (other to verify the
      tracepoint is being called while you're debugging your BPF program).
      
      The idea here is that tracepoints have such low performance cost when
      disabled that we can leave these in the upstream drivers. This may
      eventually enable the instrumentation of unmodified customer systems
      should the need arise to verify a NIC feature is working as expected.
      In general this enables one set of feature verification tools to be
      used on these drivers whether they're built with the kernel or
      separately.
      
      Users are advised against using these tracepoints for anything other
      than a diagnostic tool. They have a performance impact when enabled,
      and their exact placement and form may change as we see how well they
      work in practice for the purposes above.
      
      Change-ID: Id6014a7322c0e6d08068114dd20bd156f2f6435e
      Signed-off-by: NScott Peterson <scott.d.peterson@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ed0980c4
    • A
      i40e: Fix support for flow director programming status · 0e626ff7
      Alexander Duyck 提交于
      This patch fixes an issue I introduced when I converted the code over to
      using the length field to determine if a descriptor was done or not. It
      turns out that we are also processing programming descriptors in the Rx
      path and need to have these processed even though the length field will be
      0 on these packets.  What will happen with a programming descriptor is that
      we will receive a descriptor that has the SPH bit set, and the header
      length and packet length fields cleared.
      
      To account for this we should be checking for the bit for split header
      being set even though we aren't actually using header split. This bit is
      set in the length field to indicate if a programming descriptor response is
      contained in the descriptor. Since we don't support header split we don't
      need to perform the extra checks of using a fixed value for the entire
      length field.
      
      In addition I am moving the function for checking if a filter is a
      programming status filter into the i40e_txrx.c file since there is no
      longer support for FCoE it doesn't make sense to keep this file in i40e.h.
      
      Change-ID: I12c359c3dc70adb9d6b92b27324bb2c7f04c1a06
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      0e626ff7
    • A
      i40e/i40evf: Remove VF Rx csum offload for tunneled packets · 53240e99
      alice michael 提交于
      Rx checksum offload for tunneled packets was never being negotiated or
      requested by VF. This capability was assumed by default and enabled in
      current hardware for VF. Going forward, this feature needs to be disabled
      or advanced ptypes should be negotiated with PF in the future.
      
      Change-ID: I9e54cfa8a90e03ab6956db4412f1e337ccd2c2e0
      Signed-off-by: NPreethi Banala <preethi.banala@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      53240e99
  2. 08 4月, 2017 3 次提交
    • A
      i40e/i40evf: Use build_skb to build frames · f8b45b74
      Alexander Duyck 提交于
      This patch is meant to improve the performance of the Rx path.
      Specifically by using build_skb we have several distinct advantages.
      
      In the case of small frames we were previously using a copy-break approach.
      This means that we were allocating a page fragment to use for skb->head,
      and were having to copy the packet into that region.  Both of those calls
      are now avoided since we just build the skb around the data.
      
      In the case of large frames the gains are much more significant.
      Specifically we were having to allocate skb->head, and copy the headers as
      before.  However in addition we were having to parse the header using
      eth_get_headlen which could be quite expensive.  All of this is avoided by
      building the frame around the data.  I have seen gains as high as 30% when
      using VXLAN for instance due to just header pulling overhead.
      
      Finally with all this in place it also sets us up to start looking at
      enabling XDP.  Specifically we now have a path in which the data is in the
      page and the frame is built around it.  So if we parse it with XDP before
      we call build_skb we can take care of any necessary processing there.
      
      Change-ID: Id4bdd618e94473d41f892417e5d8019639e421e3
      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>
      f8b45b74
    • A
      i40e/i40evf: Add support for padding start of frames · ca9ec088
      Alexander Duyck 提交于
      This patch adds padding to the start of frames to make room for headroom
      for us to eventually start using build_skb.  Right now we guarantee at
      least NET_SKB_PAD + NET_IP_ALIGN, however we allocate more space if more is
      available.  For example on x86 the headroom should be 192 bytes.
      
      On systems that have too large of a cache line size to support storing 1.5K
      padding and shared info we default to using 3K buffers and reserve
      everything that isn't used for skb_shared_info or the data buffer for
      headroom.
      
      Change-ID: I33c641c9a1ea10cf7cc484c2d20985368d2d709a
      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>
      ca9ec088
    • A
      i40e/i40evf: Add support for using order 1 pages with a 3K buffer · 98efd694
      Alexander Duyck 提交于
      There are situations where adding padding to the front and back of an Rx
      buffer will require that we add additional padding.  Specifically if
      NET_IP_ALIGN is non-zero, or the MTU size is larger than 7.5K we would need
      to use 2K buffers which leaves us with no room for the padding.
      
      To preemptively address these cases I am adding support for 3K buffers to
      the Rx path so that we can provide the additional padding needed in the
      event of NET_IP_ALIGN being non-zero or a cache line being greater than 64.
      
      Change-ID: I938bc1ba611285428df39a613cd66f98e60b55c7
      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>
      98efd694
  3. 29 3月, 2017 5 次提交
  4. 28 3月, 2017 3 次提交
  5. 15 3月, 2017 1 次提交
  6. 19 2月, 2017 2 次提交
    • J
      i40e: mark the value passed to csum_replace_by_diff as __wsum · b9c015d4
      Jacob Keller 提交于
      Fix, or rather, avoid a sparse warning caused by the fact that
      csum_replace_by_diff expects to receive a __wsum value. Since the
      calculation appears to work, simply typecast the passed paylen value to
      __wsum to avoid the warning.
      
      This seems pretty fishy since __wsum was obviously annotated as
      a separate type on purpose, so this throws the entire calculation into
      question. Since it currently appears to behave as expected, the typecast
      is probably safe.
      
      Change-ID: I4fdc5cddd589abc16098176e8a61127e761488f4
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b9c015d4
    • C
      i40e: Fix Adaptive ITR enabling · 3c234c47
      Carolyn Wyborny 提交于
      This patch fixes a bug introduced with the addition of the per queue
      ITR feature support in ethtool.  With that addition, there were
      functions added which converted the ITR settings to binary values.
      The IS_ENABLED macros that run on those values check whether a bit
      is set or not and with the value being binary, the bit check always
      returned ITR disabled which prevents any updating of the ITR rate.
      This patch fixes the problem by changing the functions to return the
      current ITR value instead and renaming it to better reflect
      its function.  These functions now provide a value which will be
      accurately asessed and update the ITR as intended.
      
      Change-ID: I14f1d088d052e27f652aaa3113e186415ddea1fc
      Signed-off-by: NCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3c234c47
  7. 12 2月, 2017 3 次提交
  8. 03 2月, 2017 1 次提交
  9. 07 12月, 2016 1 次提交
  10. 01 11月, 2016 1 次提交
  11. 29 10月, 2016 2 次提交
    • A
      i40e: Drop redundant Rx descriptor processing code · 99dad8b3
      Alexander Duyck 提交于
      This patch cleans up several pieces of redundant code in the Rx clean-up
      paths.
      
      The first bit is that hdr_addr and the status_err_len portions of the Rx
      descriptor represent the same value.  As such there is no point in setting
      them to 0 before setting them to 0.  I'm dropping the second spot where we
      are updating the value to 0 so that we only have 1 write for this value
      instead of 2.
      
      The second piece is the checking for the DD bit in the packet.  We only
      need to check for a non-zero value for the status_err_len because if the
      device is done with the descriptor it will have written something back and
      the DD is just one piece of it.  In addition I have moved the reading of
      the Rx descriptor bits related to rx_ptype down so that they are actually
      below the dma_rmb() call so that we are guaranteed that we don't have any
      funky 64b on 32b calls causing any ordering issues.
      
      Change-ID: I256e44a025d3c64a7224aaaec37c852bfcb1871b
      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>
      99dad8b3
    • A
      i40e/i40evf: fix interrupt affinity bug · 96db776a
      Alan Brady 提交于
      There exists a bug in which a 'perfect storm' can occur and cause
      interrupts to fail to be correctly affinitized. This causes unexpected
      behavior and has a substantial impact on performance when it happens.
      
      The bug occurs if there is heavy traffic, any number of CPUs that have
      an i40e interrupt are pegged at 100%, and the interrupt afffinity for
      those CPUs is changed.  Instead of moving to the new CPU, the interrupt
      continues to be polled while there is heavy traffic.
      
      The bug is most readily realized as the driver is first brought up and
      all interrupts start on CPU0. If there is heavy traffic and the
      interrupt starts polling before the interrupt is affinitized, the
      interrupt will be stuck on CPU0 until traffic stops. The bug, however,
      can also be wrought out more simply by affinitizing all the interrupts
      to a single CPU and then attempting to move any of those interrupts off
      while there is heavy traffic.
      
      This patch fixes the bug by registering for update notifications from
      the kernel when the interrupt affinity changes. When that fires, we
      cache the intended affinity mask. Then, while polling, if the cpu is
      pegged at 100% and we failed to clean the rings, we check to make sure
      we have the correct affinity and stop polling if we're firing on the
      wrong CPU.  When the kernel successfully moves the interrupt, it will
      start polling on the correct CPU. The performance impact is minimal
      since the only time this section gets executed is when performance is
      already compromised by the CPU.
      
      Change-ID: I4410a880159b9dba1f8297aa72bef36dca34e830
      Signed-off-by: NAlan Brady <alan.brady@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      96db776a
  12. 25 9月, 2016 3 次提交
  13. 23 9月, 2016 1 次提交
  14. 20 8月, 2016 1 次提交
  15. 22 7月, 2016 1 次提交
  16. 15 7月, 2016 1 次提交
    • A
      i40e/i40evf: Fix i40e_rx_checksum · 858296c8
      Alexander Duyck 提交于
      There are a couple of issues I found in i40e_rx_checksum while doing some
      recent testing.  As a result I have found the Rx checksum logic is pretty
      much broken and returning that the checksum is valid for tunnels in cases
      where it is not.
      
      First the inner types are not the correct values to use to test for if a
      tunnel is present or not.  In addition the inner protocol types are not a
      bitmask as such performing an OR of the values doesn't make sense.  I have
      instead changed the code so that the inner protocol types are used to
      determine if we report CHECKSUM_UNNECESSARY or not.  For anything that does
      not end in UDP, TCP, or SCTP it doesn't make much sense to report a
      checksum offload since it won't contain a checksum anyway.
      
      This leaves us with the need to set the csum_level based on some value.
      For that purpose I am using the tunnel_type field.  If the tunnel type is
      GRENAT or greater then this means we have a GRE or UDP tunnel with an inner
      header.  In the case of GRE or UDP we will have a possible checksum present
      so for this reason it should be safe to set the csum_level to 1 to indicate
      that we are reporting the state of the inner header.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      858296c8
  17. 21 5月, 2016 2 次提交
  18. 06 5月, 2016 3 次提交
  19. 02 5月, 2016 1 次提交
  20. 28 4月, 2016 1 次提交
  21. 26 4月, 2016 1 次提交