1. 13 12月, 2013 9 次提交
    • B
      sfc: Enable PTP clock and timestamping for all functions on EF10 · 9aecda95
      Ben Hutchings 提交于
      The SFC9100 family has only one clock per controller, shared by all
      functions.  Therefore only create a clock device under the primary
      function, and make all other functions refer to the primary's clock
      device.
      
      Since PTP functionality is limited to port 0 and PF 0 on the earlier
      SFN[56]322F boards, and we also set the primary flag for that
      function, we can make the creation of a clock device conditional only
      on this flag.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      9aecda95
    • J
      sfc: Add RX packet timestamping for EF10 · bd9a265d
      Jon Cooper 提交于
      The EF10 firmware can optionally insert RX timestamps in the packet
      prefix.  These only include the clock minor value.  We must also
      enable periodic time sync events on each event queue which provide
      the high bits of the clock value.
      
      [bwh: Combined and rebased several changes.
       Added the above description and some sanity checks for inline vs
       separate timestamps.
       Changed efx_rx_skb_attach_timestamp() to read the packet prefix
       from the skb head area.]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      bd9a265d
    • B
      sfc: Return EBUSY for filter insertion on EF10, matching Falcon/Siena · 065e64c4
      Ben Hutchings 提交于
      The MC firmware will return error MC_CMD_ERR_ENOSPC if filter
      insertion fails due to lack of resources.  The net driver's filter
      implementation for Falcon-architecture returns EBUSY.  They should
      behave consistently, so for EF10 change ENOSPC to EBUSY.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      065e64c4
    • B
      a84f3bf9
    • E
      sfc: Log all unexpected MCDI errors · 1e0b8120
      Edward Cree 提交于
      Split each of efx_mcdi_rpc, efx_mcdi_rpc_finish, and efx_mcdi_rpc_async into
      a normal and a _quiet version; made the former log MCDI errors with
      netif_err (and include the raw MCDI error code), and the latter never log
      them at all.  Changed various callers; any where some errors are expected
      (but others are not) call the _quiet version and then if necessary log the
      MCDI error themselves.  Said logging is done by new efx_mcdi_display_error.
      
      Callers of efx_mcdi_rpc*_quiet functions which may want to log the error
      need to ensure that their outbuf is big enough to hold an MCDI error; to
      this end, they now use MCDI_DECLARE_BUF_OUT_OR_ERR, which always allocates
      at least 8 bytes.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      1e0b8120
    • J
      sfc: Correct RX dropped count for drops while interface is down · f8f3b5ae
      Jon Cooper 提交于
      We don't directly control RX ingress on Siena or any later
      controllers, and so we cannot prevent packets from entering the RX
      datapath while the RX queues are not set up.  This results in
      the hardware incrementing RX_NODESC_DROP_CNT, but it's not an
      error and we should not include it in error stats.
      
      When bringing an interface up or down, pull (or wait for) stats and
      count the number of packets that were dropped while the interface was
      down.  Subtract this from the reported RX dropped count.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f8f3b5ae
    • J
      cce28794
    • B
      sfc: Tighten the check for RX merged completion events · 92a04168
      Ben Hutchings 提交于
      The addition of RX event merging support means we don't reliably
      detect dropped RX events now.  Currently we will only detect them if
      the previous event for the RX queue had the CONT bit set.
      
      Only accept RX completion events as merged if the
      GET_CAPABILITIES_OUT_RX_BATCHING bit is set in datapath_caps (which it
      won't be for the low-latency datapath) and the CONT bit is not set on
      the event.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      92a04168
    • J
      sfc: Add MC BISTs to ethtool offline self test on EF10 · 74cd60a4
      Jon Cooper 提交于
      To run BISTs the MC goes down in to a special mode where it will only
      respond to MCDI from the testing PF, and TX, RX and event queues are
      torn down. Other PFs get a message as it goes down to tell them it's
      going down.
      
      When the other PFs get this message, they check the soft status
      register to tell when the MC has rebooted after BIST mode and they can
      start recovery.
      
      [bwh: Convert the test result to 1 or -1 as for earlier NICs]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      74cd60a4
  2. 05 10月, 2013 3 次提交
    • E
      sfc: Add PM and RXDP drop counters to ethtool stats · 568d7a00
      Edward Cree 提交于
      Recognise the new Packet Memory and RX Data Path counters.
      
      The following counters are added:
      rx_pm_{trunc,discard}_bb_overflow - burst buffer overflowed.  This should not
       occur if BB correctly configured.
      rx_pm_{trunc,discard}_vfifo_full - not enough space in packet memory.  May
       indicate RX performance problems.
      rx_pm_{trunc,discard}_qbb - dropped by 802.1Qbb early discard mechanism.
       Since Qbb is not supported at present, this should not occur.
      rx_pm_discard_mapping - 802.1p priority configured to be dropped.  This should
       not occur in normal operation.
      rx_dp_q_disabled_packets - packet was to be delivered to a queue but queue is
       disabled.  May indicate misconfiguration by the driver.
      rx_dp_di_dropped_packets - parser-dispatcher indicated that a packet should be
       dropped.
      rx_dp_streaming_packets - packet was sent to the RXDP streaming bus, ie. a
       filter directed the packet to the MCPU.
      rx_dp_emerg_{fetch,wait} - RX datapath had to wait for descriptors to be
       loaded.  Indicates performance problems but not drops.
      
      These are only provided if the MC firmware has the
      PM_AND_RXDP_COUNTERS capability.  Otherwise, mask them out.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      568d7a00
    • E
      sfc: Refactor EF10 stat mask code to allow for more conditional stats · 4bae913b
      Edward Cree 提交于
      Previously, efx_ef10_stat_mask returned a static const unsigned long[], which
      meant that each possible mask had to be declared statically with
      STAT_MASK_BITMAP.  Since adding a condition would double the size of the
      decision tree, we now create the bitmask dynamically.
      
      To do this, we have two functions efx_ef10_raw_stat_mask, which returns a u64,
      and efx_ef10_get_stat_mask, which fills in an unsigned long * argument.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      4bae913b
    • J
  3. 21 9月, 2013 2 次提交
  4. 11 9月, 2013 4 次提交
  5. 30 8月, 2013 1 次提交
    • B
      sfc: Add support for Solarflare SFC9100 family · 8127d661
      Ben Hutchings 提交于
      This adds support for the EF10 network controller architecture and the
      SFC9100 family, starting with SFC9120 'Farmingdale', and bumps the
      driver version to 4.0.
      
      New features in the SFC9100 family include:
      
      - Flexible allocation of internal resources to PCIe physical and virtual
        functions under firmware control
      - RX event merging to reduce DMA writes at high packet rates
      - Integrated RX timestamping
      - PIO buffers for lower TX latency
      - Firmware-driven data path that supports additional offload features
        and filter types
      - Delivery of packets between functions and to multiple recipients,
        allowing firmware to implement a vswitch
      - Multiple RX flow hash (RSS) contexts with their own hash keys and
        indirection tables
      - 40G MAC (single port only)
      
      ...not all of which are enabled in this initial driver or the initial
      firmware release.
      
      Much of the new code is by Jon Cooper.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      8127d661