1. 29 Jun, 2017 36 commits
  2. 27 Jun, 2017 4 commits
    • David S. Miller's avatar
      Merge branch 'nfp-get_phys_port_name-for-representors-and-SR-IOV-reorder' · 2ee87db3
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      nfp: get_phys_port_name for representors and SR-IOV reorder
      
      This series starts by making the error message if FW cannot be located
      easier to understand.  Then I move some functions from PCI probe files
      into library code (nfpcore) where they belong, and remove one function
      which is never used.
      
      Next few patches equip representors with nfp_port structure and make
      their NDOs fully shared (not defined in apps), thanks to which we can
      easily determine which netdevs are NFP's by comparing the NDO pointers.
      
      10th patch makes use of the shared NDOs and nfp_ports to deliver
      netdev-type independent .ndo_get_phys_port_name() implementation.
      
      Patches 11 and 12 reorder the nfp_app SR-IOV callbacks with enabling
      SR-IOV VFs.  Unfortunately due to how PCI subsystem works we can't
      guarantee being able to disable SR-IOV at exit or that it will be
      disabled when we first probe...  We must therefore make sure FW is
      able to deal with being loaded while SR-IOV is already on.
      
      Patch 13 fixes potential deadlock when enabling SR-IOV happens at
      the same time as port state refresh.  Note that this can't happen
      at this point, since Flower doesn't refresh ports... but lockdep
      doesn't know about such details and we will have to deal with this
      sooner or later anyway.
      
      Last but not least a new Kconfig is added to make sure those who
      don't care about flower offloads have a way of not including the
      code in their kernels.  Thanks to nfp_app separation this costs us
      a single ifdef and excluding flower files from the build.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ee87db3
    • Jakub Kicinski's avatar
      nfp: flower: add Kconfig for flower app · 57ae676e
      Jakub Kicinski authored
      Give users an option not to build the flower-offload related code.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57ae676e
    • Jakub Kicinski's avatar
      nfp: allocate a private workqueue for driver work · 6d48ceb2
      Jakub Kicinski authored
      Since we grab pf->lock around pci_enable_sriov() we can no longer
      safely queue work which may also grab that lock onto system workqueue.
      pci_enable_sriov() will flush system workqueue as part to wait for VF
      probing.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d48ceb2
    • Jakub Kicinski's avatar
      nfp: reorder SR-IOV config and nfp_app SR-IOV callbacks · e3f28473
      Jakub Kicinski authored
      We previously assumed that app callback can be guaranteed to be
      executed before SR-IOV is actually enabled.  Given that we can't
      guarantee that SR-IOV will be disabled during probe or that we
      will be able to disable it on remove, we should reorder the callbacks.
      We should also call the app's sriov_enable if SR-IOV was enabled
      during probe.
      
      Application FW must be able to disable VFs internally and not depend
      on them being removed at PCIe level.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3f28473