1. 16 12月, 2015 1 次提交
    • T
      net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK · a188222b
      Tom Herbert 提交于
      The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the
      set of features for offloading all checksums. This is a mask of the
      checksum offload related features bits. It is incorrect to set both
      NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for
      features of a device.
      
      This patch:
        - Changes instances of NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK (where
          NETIF_F_ALL_CSUM is being used as a mask).
        - Changes bonding, sfc/efx, ipvlan, macvlan, vlan, and team drivers to
          use NEITF_F_HW_CSUM in features list instead of NETIF_F_ALL_CSUM.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a188222b
  2. 06 12月, 2015 1 次提交
    • D
      sfc: check warm_boot_count after other functions have been reset · abd86a55
      Daniel Pieczko 提交于
      A change in MCFW behaviour means that the net driver must update its record
      of the warm_boot_count by reading it from the ER_DZ_BIU_MC_SFT_STATUS
      register.
      
      On v4.6.x MCFW the global boot count was incremented when some functions
      needed to be reset to enable multicast chaining, so all functions saw the
      same value.  In that case, the driver needed to increment its
      warm_boot_count when other functions were reset, to avoid noticing it later
      and then trying to reset itself to recover unnecessarily.
      
      With v4.7+ MCFW, the boot count in firmware doesn't change as that is
      unnecessary since the PFs that have been reset will each receive an MC
      reboot notification.  In that case, the driver re-reads the unchanged
      value.
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abd86a55
  3. 03 12月, 2015 1 次提交
  4. 02 12月, 2015 2 次提交
  5. 19 11月, 2015 2 次提交
    • E
      net: provide generic busy polling to all NAPI drivers · 93d05d4a
      Eric Dumazet 提交于
      NAPI drivers no longer need to observe a particular protocol
      to benefit from busy polling (CONFIG_NET_RX_BUSY_POLL=y)
      
      napi_hash_add() and napi_hash_del() are automatically called
      from core networking stack, respectively from
      netif_napi_add() and netif_napi_del()
      
      This patch depends on free_netdev() and netif_napi_del() being
      called from process context, which seems to be the norm.
      
      Drivers might still prefer to call napi_hash_del() on their
      own, since they might combine all the rcu grace periods into
      a single one, knowing their NAPI structures lifetime, while
      core networking stack has no idea of a possible combining.
      
      Once this patch proves to not bring serious regressions,
      we will cleanup drivers to either remove napi_hash_del()
      or provide appropriate rcu grace periods combining.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93d05d4a
    • E
      net: move skb_mark_napi_id() into core networking stack · 93f93a44
      Eric Dumazet 提交于
      We would like to automatically provide busy polling support
      to all NAPI drivers, without them having to implement anything.
      
      skb_mark_napi_id() can be called from napi_gro_receive() and
      napi_get_frags().
      
      Few drivers are still calling skb_mark_napi_id() because
      they use netif_receive_skb(). They should eventually call
      napi_gro_receive() instead. I will leave this to drivers
      maintainers.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93f93a44
  6. 17 11月, 2015 1 次提交
  7. 11 11月, 2015 1 次提交
  8. 03 11月, 2015 1 次提交
  9. 28 10月, 2015 1 次提交
  10. 12 10月, 2015 1 次提交
    • D
      sfc: fully reset if MC_REBOOT event received without warm_boot_count increment · c577e59e
      Daniel Pieczko 提交于
      On EF10, MC_CMD_VPORT_RECONFIGURE can cause a CODE_MC_REBOOT event
      to be sent to a function without incrementing the (adapter-wide)
      warm_boot_count.  In this case, the reboot is not detected by the
      loop on efx_mcdi_poll_reboot(), so prepare for recovery from an MC
      reboot anyway.  When this codepath is run, the MC has always just
      rebooted, so this recovery is valid.
      
      The loop on efx_mcdi_poll_reboot() is still required for other MC
      reboot cases, so that actions in response to an MC reboot are
      performed, such as clearing locally calculated statistics.
      Siena NICs are unaffected by this change as the above scenario
      does not apply.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c577e59e
  11. 02 10月, 2015 2 次提交
  12. 13 9月, 2015 1 次提交
    • B
      locking/atomics, cmpxchg: Privatize the inclusion of asm/cmpxchg.h · 84567995
      Boqun Feng 提交于
      After commit:
      
        654672d4 ("locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations")
      
      Architectures may only provide {cmp,}xchg_relaxed definitions in
      asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built in
      linux/atomic.h, which means simply including asm/cmpxchg.h may not get
      the definitions of all the{cmp,}xchg variants.
      
      Therefore, we should privatize the inclusions of asm/cmpxchg.h to
      keep it only included in arch/* and replace the inclusions outside
      with linux/atomic.h
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Aybuke Ozdemir <aybuke.147@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Kirk Reiser <kirk@reisers.ca>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Shradha Shah <sshah@solarflare.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: devel@driverdev.osuosl.org
      Cc: linux-net-drivers@solarflare.com
      Cc: speakup@linux-speakup.org
      Link: http://lkml.kernel.org/r/1440589966-26280-1-git-send-email-boqun.feng@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      84567995
  13. 29 8月, 2015 1 次提交
    • S
      sfc: Allow driver to cope with a lower number of VIs than it needs for RSS · b0fbdae1
      Shradha Shah 提交于
      Previously, the driver would refuse to load if it couldn't secure
      enough VIs from the MC to fulfill its RSS requirements.
      This was causing probe to fail on later functions in
      configurations where we'd run out of VIs, such as having many
      VFs.
      
      This change allows the driver to load with fewer VIs, down to a
      minimum of 2. A warning will be printed saying that RSS
      requirements were not met, possibly affecting performance.
      
      efx->max_tx_channels needs to be set to avoid going down the
      failure path in efx_probe_nic() immediately in the loop after the
      probe() NIC-type function.
      Also, Set rc=ENOSPC when bombing out of efx_probe_nic due to lack
      of VIs.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0fbdae1
  14. 28 8月, 2015 1 次提交
  15. 01 8月, 2015 2 次提交
  16. 22 7月, 2015 9 次提交
  17. 18 7月, 2015 1 次提交
  18. 09 7月, 2015 5 次提交
  19. 16 6月, 2015 1 次提交
  20. 03 6月, 2015 5 次提交
    • D
      sfc: leak vports if a VF is assigned during PF unload · 6598dad2
      Daniel Pieczko 提交于
      If any VF is assigned as the PF is unloaded, do not attempt to
      remove its vport or the vswitch.  These will be removed if the
      driver binds to the PF again, as an entity reset occurs during
      probe.
      
      A 'force' flag is added to efx_ef10_pci_sriov_disable() to
      distinguish between disabling SR-IOV and driver unload.
      SR-IOV cannot be disabled if VFs are assigned to guests.
      
      If the PF driver is unloaded while VFs are assigned, the driver
      may try to bind to the VF again at a later point if the driver
      has been reloaded and the VF returns to the same domain as the PF.
      In this case, the PF will not have a VF data structure, so the VF
      can check this and drop out of probe early.
      
      In this case, efx->vf_count will be zero but VFs will be present.
      The user is advised to remove the VF and re-create it. The check
      at the beginning of efx_ef10_pci_sriov_disable() that
      efx->vf_count is non-zero is removed to allow SR-IOV to be
      disabled in this case. Also, if the PF driver is unloaded, it
      will disable SR-IOV to remove these unknown VFs.
      
      By not disabling bus-mastering if VFs are still assigned, the VF
      will continue to pass traffic after the PF has been removed.
      
      When using the max_vfs module parameter, if VFs are already
      present do not try to initialise any more.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6598dad2
    • D
      sfc: force removal of VF and vport on driver removal · 2a3fc311
      Daniel Pieczko 提交于
      When the driver unloads, force the unbind and removal of any
      VFs in the host with the PF.  The PF cannot remove vports and
      vswitches if they are still being used by a VF driver, and when
      unloading the sfc driver the removal order is not guaranteed,
      so the instruction from the PF to the VF to unbind enforces a
      suitable ordering so that vswitches and vports can be removed.
      
      As a result of this, manually unbinding the driver from a single
      PF will result in all of its VFs in the host also being removed.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a3fc311
    • D
    • D
      sfc: don't update stats on VF when called in atomic context · f00bf230
      Daniel Pieczko 提交于
      The ifenslave command to set up a bond runs in an atomic
      context, and it queries the stats on the devices that are
      being enslaved. A VF needs to make an MCDI call to update
      its stats, which is not allowed in atomic context.
      
      The releasing of the stats_lock is moved to the beginning of
      the VF stats update function so that in_interrupt() can be
      used; it must be taken again before returning from this
      function.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f00bf230
    • D
      sfc: suppress vadaptor stats when EVB is not present · d94619cd
      Daniel Pieczko 提交于
      The raw_mask array is not initialised, so it needs to be
      explicitly set to zero in the 'else' branch.
      
      If the EVB capability is not present, a port cannot have multiple
      functions so the per-port MAC stats are correct and should match
      the corresponding vadaptor stats, so this redundancy can be
      removed from the ethtool stats output.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d94619cd