1. 03 6月, 2015 3 次提交
  2. 22 5月, 2015 1 次提交
  3. 10 5月, 2015 9 次提交
    • J
      sfc: Add use of shared RSS contexts. · 267c0157
      Jon Cooper 提交于
      Allow PFs to allocate shared RSS contexts if we exhaust our
      exclusive RSS contexts. Make VFs use shared RSS contexts in
      all cases.
      Spruce up error handling so that the shadow copy of the RSS
      table is updated after successful update, rather than in all
      cases, so that we report the actual contents of the RSS table
      after a failure to set it, rather than what we'd like it to be.
      
      Populate context_size parameter when vacuously allocating RSS
      context of size 1.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      267c0157
    • S
      sfc: create vports for VFs and assign random MAC addresses · 3c5eb876
      Shradha Shah 提交于
      The parent PF creates vports for all its child VFs and adds MAC
      addresses to these.  When the VF driver loads, it can make an MCDI
      call to get the MAC address that the parent PF assigned it.
      
      The parent PF also assigns a mac address to its own vport because
      implicit creation of a vAdaptor will only work on evb ports with
      MAC addresses assigned.
      
      The vport MAC address needs to be stored in the PF's nic_data
      struct as it can later be changed on the vadaptor (and its net_dev
      struct). When removing a vport the original MAC address must be
      deleted.
      
      A new flag is needed in the VF data structure to identify whether
      a vport has been assigned to the VF.  This is to determine whether
      it needs to be un-assigned before freeing the vport.  Also,
      attempting to un-assign a vport which is not assigned will result
      in an EALREADY error.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c5eb876
    • S
      sfc: Prepare to bind the sfc driver to the VF. · 02246a7f
      Shradha Shah 提交于
      Added efx_nic_type structure for VF.
      Mapped a different BAR for VF as it uses BAR 0 for memory.
      Added functions sriov_init and sriov_fini.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02246a7f
    • D
      sfc: get the PF number and record in nic_data · 1cd9ecbb
      Daniel Pieczko 提交于
      Use MC_CMD_GET_FUNCTION_INFO to record the PF number in nic_data.
      This will be needed when assigned vports to VFs.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1cd9ecbb
    • D
      sfc: create VEB vswitch and vport above default firmware setup · 6d8aaaf6
      Daniel Pieczko 提交于
      Adds functions to allocate and free vswitches and vports; vadaptors
      are automatically allocated and freed when TX/RX queues are
      initialised and finalised.  This vswitching structure is only created
      if the firmware supports it, so a check that full-featured firmware
      is running is performed first.
      
      If the MC resets, the vswitching infrastructure will need to be
      recreated, so mark the "must_probe_vswitching" flag when an MC reboot
      is detected.
      
      Don't try to create a vswitch if vf-count=0
      
      This allocation of vswitches and vports does not currently support
      configuring VLAN tags, but that can be added in a future change.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d8aaaf6
    • D
      sfc: record the PF's vport ID in nic_data · 45b2449e
      Daniel Pieczko 提交于
      The default port ID of EVB_PORT_ID_ASSIGNED is a "magic" number
      for the MCFW to select the physical port of the PF.  If other
      vswitches and vports are created on top of the default firmware
      configuration, the ID of the newly created vport is then required
      when passed to MCDI commands.  Currently, this doesn't happen so
      the vport_id is never changed, but a subsequent patch will change
      this behaviour so that other vswitches and vports are created.
      
      The vport_id recorded in nic_data is only relevant for PFs.
      VFs will have their vports created by their parent PF, and in
      that case the parent PF will record the vport ID of each VF.
      For a VF, nic_data->vport_id is expected to remain at the default
      value.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45b2449e
    • D
      sfc: Record [rt]x_dpcpu_fw_id in EF10 nic_data · 8d9f9dd4
      Daniel Pieczko 提交于
      The (future) code to add/remove vswitches and vports will be
      dependent on the firmware variant.
      To simplify the checking of the firmware variant, record
      values for rx_dpcpu_fw_id and tx_dpcpu_fw_id in EF10 nic_data.
      
      There was only one place where this was previously used:
      efx_mcdi_print_fwver() in ethtool.c.
      The MC_CMD_GET_CAPABILITIES can be replaced and the values from
      nic_data used instead.
      
      Note that the printing of "?" if the MC command fails or if the
      outlength is incorrect no longer apply, because errors are returned
      in efx_ef10_init_datapath_caps() in both of these cases.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d9f9dd4
    • D
      sfc: Move and rename efx_vf struct to siena_vf · bf3d0156
      Daniel Pieczko 提交于
      The efx_vf struct contains Siena-specific fields for VFs,
      so rename to siena_vf.
      Also move it into the siena_nic_data struct, as EF10 will
      track its VFs in its own ef10_nic_data, storing much less
      information about them since VFDI is no longer used.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf3d0156
    • S
      sfc: Own header for nic-specific sriov functions, single instance of... · 7fa8d547
      Shradha Shah 提交于
      sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code
      
      By putting all the efx_{siena,ef10}_sriov_* declarations in
      {siena,ef10}_sriov.h, ensure they cannot be called from nic-generic code.
      Also fixes up an instance of this, where mcdi.c was calling
      efx_siena_sriov_flr.
      
      The single instance of netdev_ops should call general high level
      functions that can then call something adapter specific in efx_nic_type.
      We should only do adapter specialisation via efx_nic_type.
      
      Removal of sriov functionality from the Falcon code means that tests
      are needed for the presence of some callbacks.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7fa8d547
  4. 09 4月, 2015 2 次提交
  5. 07 11月, 2014 3 次提交
  6. 18 10月, 2014 1 次提交
  7. 16 7月, 2014 1 次提交
  8. 17 4月, 2014 1 次提交
    • E
      sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast) · e283546c
      Edward Cree 提交于
      When an MCDI command times out (whether or not we find it
      completed when we poll), call efx_mcdi_abandon(), which tells
      all subsequent MCDI calls to fail-fast, and queues up an FLR.
      
      Because an FLR doesn't lead to receiving any reboot even from
      the MC (unlike most other types of reset), we have to call
      efx_ef10_reset_mc_allocations.
      In efx_start_all(), if a reset (of any kind) is pending, we
      bail out.
      Without this, attempts to reconfigure (e.g. change mtu) can
      cause driver/mc state inconsistency if the first MCDI call
      triggers an FLR.
      
      For similar reasons, on EF10, in
      efx_reset_down(method=RESET_TYPE_MCDI_TIMEOUT), set the number
      of active queues to zero before calling efx_stop_all().
      And, on farch, in efx_reset_up(method=RESET_TYPE_MCDI_TIMEOUT),
      set active_queues and flushes pending & outstanding to zero.
      
      efx_mcdi_mode_{poll,event}() should not take us out of fail-fast
       mode. Instead, this is done by efx_mcdi_reset() after the FLR
      completes.
      
      The new FLR reset_type RESET_TYPE_MCDI_TIMEOUT doesn't really
      fit into the hierarchy of reset 'scopes' whereby efx_reset()
      decides some resets subsume others.  Thus, it uses separate logic.
      
      Also, fixed up some inconsistency around RESET_TYPE_MC_BIST,
      which was in the wrong place in that hierarchy.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e283546c
  9. 13 12月, 2013 8 次提交
  10. 07 12月, 2013 1 次提交
  11. 20 11月, 2013 1 次提交
  12. 05 10月, 2013 1 次提交
    • 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
  13. 25 9月, 2013 1 次提交
    • J
      sfc: Remove extern from function prototypes · 00aef986
      Joe Perches 提交于
      There are a mix of function prototypes with and without extern
      in the kernel sources.  Standardize on not using extern for
      function prototypes.
      
      Function prototypes don't need to be written with extern.
      extern is assumed by the compiler.  Its use is as unnecessary as
      using auto to declare automatic/local variables in a block.
      Signed-off-by: NJoe Perches <joe@perches.com>
      00aef986
  14. 21 9月, 2013 2 次提交
    • B
    • B
      sfc: Allocate and link PIO buffers; map them with write-combining · 183233be
      Ben Hutchings 提交于
      Try to allocate a segment of PIO buffer to each TX channel.  If
      allocation fails, log an error but continue.
      
      PIO buffers must be mapped separately from the NIC registers, with
      write-combining enabled.  Where the host page size is 4K, we could
      potentially map each VI's registers and PIO buffer separately.
      However, this would add significant complexity, and we also need to
      support architectures such as POWER which have a greater page size.
      So make a single contiguous write-combining mapping after the
      uncacheable mapping, aligned to the host page size, and link PIO
      buffers there.  Where necessary, allocate additional VIs within
      the write-combining mapping purely for access to PIO buffers.
      
      Link all TX buffers to TX queues and the additional VIs in
      efx_ef10_dimension_resources() and in efx_ef10_init_nic() after
      an MC reboot.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      183233be
  15. 11 9月, 2013 1 次提交
  16. 30 8月, 2013 3 次提交
    • B
      sfc: Update copyright banners · f7a6d2c4
      Ben Hutchings 提交于
      Update the dates for files that have been added to in 2012-2013.
      Drop the 'Solarstorm' brand name that's still lingering here.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f7a6d2c4
    • 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
    • J
      sfc: Allow event queue initialisation to fail · 261e4d96
      Jon Cooper 提交于
      On EF10, event queue initialisation requires an MCDI request which
      may return failure.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      261e4d96
  17. 28 8月, 2013 1 次提交
    • B
      sfc: Delegate MAC/NIC statistic description to efx_nic_type · cd0ecc9a
      Ben Hutchings 提交于
      Various hardware statistics that are available for Siena are
      unavailable or meaningless for Falcon.  Huntington adds further to the
      NIC-type-specific statistics, as it has different MAC blocks from
      Falcon/Siena.
      
      All NIC types still provide most statistics by DMA, and use
      little-endian byte order.
      
      Therefore:
      1. Add some general utility functions for reporting hardware statistics,
         efx_nic_describe_stats() and efx_nic_update_stats().
      2. Add an efx_nic_type::describe_stats operation to get the number and
         names of statistics, implemented using efx_nic_describe_stats()
      3. Change efx_nic_type::update_stats to store the core statistics
         (struct rtnl_link_stats64) or full statistics (array of u64) in a
         caller-provided buffer.  Use efx_nic_update_stats() to aid in the
         implementation.
      4. Rename struct efx_ethtool_stat to struct efx_sw_stat_desc and
         EFX_ETHTOOL_NUM_STATS to EFX_ETHTOOL_SW_STAT_COUNT.
      5. Remove efx_nic::mac_stats and struct efx_mac_stats.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cd0ecc9a