1. 13 6月, 2014 1 次提交
  2. 31 5月, 2014 1 次提交
  3. 24 5月, 2014 1 次提交
    • S
      net-next:v4: Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool. · ed616689
      Sucheta Chakraborty 提交于
      o min_tx_rate puts lower limit on the VF bandwidth. VF is guaranteed
        to have a bandwidth of at least this value.
        max_tx_rate puts cap on the VF bandwidth. VF can have a bandwidth
        of up to this value.
      
      o A new handler set_vf_rate for attr IFLA_VF_RATE has been introduced
        which takes 4 arguments:
        netdev, VF number, min_tx_rate, max_tx_rate
      
      o ndo_set_vf_rate replaces ndo_set_vf_tx_rate handler.
      
      o Drivers that currently implement ndo_set_vf_tx_rate should now call
        ndo_set_vf_rate instead and reject attempt to set a minimum bandwidth
        greater than 0 for IFLA_VF_TX_RATE when IFLA_VF_RATE is not yet
        implemented by driver.
      
      o If user enters only one of either min_tx_rate or max_tx_rate, then,
        userland should read back the other value from driver and set both
        for IFLA_VF_RATE.
        Drivers that have not yet implemented IFLA_VF_RATE should always
        return min_tx_rate as 0 when read from ip tool.
      
      o If both IFLA_VF_TX_RATE and IFLA_VF_RATE options are specified, then
        IFLA_VF_RATE should override.
      
      o Idea is to have consistent display of rate values to user.
      
      o Usage example: -
      
        ./ip link set p4p1 vf 0 rate 900
      
        ./ip link show p4p1
        32: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
        DEFAULT qlen 1000
          link/ether 00:0e:1e:08:b0:f0 brd ff:ff:ff:ff:ff:ff
          vf 0 MAC 3e:a0:ca:bd:ae:5a, tx rate 900 (Mbps), max_tx_rate 900Mbps
          vf 1 MAC f6:c6:7c:3f:3d:6c
          vf 2 MAC 56:32:43:98:d7:71
          vf 3 MAC d6:be:c3:b5:85:ff
          vf 4 MAC ee:a9:9a:1e:19:14
          vf 5 MAC 4a:d0:4c:07:52:18
          vf 6 MAC 3a:76:44:93:62:f9
          vf 7 MAC 82:e9:e7:e3:15:1a
      
        ./ip link set p4p1 vf 0 max_tx_rate 300 min_tx_rate 200
      
        ./ip link show p4p1
        32: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
        DEFAULT qlen 1000
          link/ether 00:0e:1e:08:b0:f0 brd ff:ff:ff:ff:ff:ff
          vf 0 MAC 3e:a0:ca:bd:ae:5a, tx rate 300 (Mbps), max_tx_rate 300Mbps,
          min_tx_rate 200Mbps
          vf 1 MAC f6:c6:7c:3f:3d:6c
          vf 2 MAC 56:32:43:98:d7:71
          vf 3 MAC d6:be:c3:b5:85:ff
          vf 4 MAC ee:a9:9a:1e:19:14
          vf 5 MAC 4a:d0:4c:07:52:18
          vf 6 MAC 3a:76:44:93:62:f9
          vf 7 MAC 82:e9:e7:e3:15:1a
      
        ./ip link set p4p1 vf 0 max_tx_rate 600 rate 300
      
        ./ip link show p4p1
        32: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
        DEFAULT qlen 1000
          link/ether 00:0e:1e:08:b0:f brd ff:ff:ff:ff:ff:ff
          vf 0 MAC 3e:a0:ca:bd:ae:5, tx rate 600 (Mbps), max_tx_rate 600Mbps,
          min_tx_rate 200Mbps
          vf 1 MAC f6:c6:7c:3f:3d:6c
          vf 2 MAC 56:32:43:98:d7:71
          vf 3 MAC d6:be:c3:b5:85:ff
          vf 4 MAC ee:a9:9a:1e:19:14
          vf 5 MAC 4a:d0:4c:07:52:18
          vf 6 MAC 3a:76:44:93:62:f9
          vf 7 MAC 82:e9:e7:e3:15:1a
      Signed-off-by: NSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed616689
  4. 19 5月, 2014 1 次提交
  5. 27 4月, 2014 3 次提交
  6. 29 3月, 2014 1 次提交
  7. 26 3月, 2014 2 次提交
    • Y
      bnx2x: Remove the sriov VFOP mechanism · 2dc33bbc
      Yuval Mintz 提交于
      Since we now posses a workqueue dedicated for sriov, the paradigm that sriov-
      related tasks cannot sleep is no longer correct.
      
      The VFOP mechanism was the one previously supporting said paradigm - the sriov
      related tasks were broken into segments which did not require sleep, and the
      mechanism re-scheduled the next segment whenever possible.
      
      This patch remvoes the VFOP mechanism altogether - the resulting code is a much
      easier to follow code; The segments are gathered into straight-forward
      functions which sleep whenever neccessary.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2dc33bbc
    • Y
      bnx2x: Create workqueue for IOV related tasks · 370d4a26
      Yuval Mintz 提交于
      The bnx2x sriov mechanisms were done in the bnx2x slowpath workitem which
      runs on the bnx2x's workqueue; This workitem is also responsible for the bottom
      half of interrupt handling in the driver, and specifically it also receives
      FW notifications of ramrod completions, allowing other flows to progress.
      
      The original design of the sriov reltaed-flows was based on the notion such
      flows must not sleep, since their context is the slowpath workitem.
      Otherwise, we might reach timeouts - those flows may wait for ramrod completion
      that will never arrive as the workitem wlll not be re-scheduled until that same
      flow will be over.
      
      In more recent time bnx2x started supporting features in which the VF interface
      can be configured by the tools accessing the PF on the hypervisor.
      This support created possible races on the VF-PF lock (which is taken either
      when the PF is handling a VF message or when the PF is doing some slowpath work
      on behalf of the VF) which may cause timeouts on the VF side and lags on the PF
      side.
      
      This patch changes the scheme - it creates a new workqueue for sriov related
      tasks and moves all handling currently done in the slowpath task into the the
      new workqueue.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      370d4a26
  8. 26 2月, 2014 1 次提交
    • J
      bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros · cd2b0389
      Joe Perches 提交于
      BNX2X_ALLOC macros use "goto alloc_mem_err"
      so these labels appear unused in some functions.
      
      Expand these macros in-place via coccinelle and
      some typing.
      
      Update the macros to use statement expressions
      and remove the BNX2X_ALLOC macro.
      
      This adds some > 80 char lines.
      
      $ cat bnx2x_pci_alloc.cocci
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_ALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_ALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_FALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_FALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      @@
      -	BNX2X_ALLOC(e1, e2);
      +	e1 = kzalloc(e2, GFP_KERNEL); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(sizeof(e1) * e2, e3)
      +	kcalloc(e2, sizeof(e1), e3)
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(e1 * sizeof(e2), e3)
      +	kcalloc(e1, sizeof(e2), e3)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd2b0389
  9. 13 2月, 2014 5 次提交
  10. 07 2月, 2014 1 次提交
  11. 22 1月, 2014 1 次提交
  12. 15 1月, 2014 1 次提交
  13. 14 1月, 2014 1 次提交
    • S
      bnx2x: namespace and dead code cleanups · a8f47eb7
      stephen hemminger 提交于
      Fix a bunch of whole lot of namespace issues with the Broadcom bnx2x driver
      found by running 'make namespacecheck'
      
       * global variables must be prefixed with bnx2x_
          naming a variable int_mode, or num_queue is invitation to disaster
      
       * make local functions static
      
       * move some inline's used in one file out of header
         (this driver has a bad case of inline-itis)
      
       * remove resulting dead code fallout
       	 bnx2x_pfc_statistic,
      	 bnx2x_emac_get_pfc_stat
       	 bnx2x_init_vlan_mac_obj,
         Looks like vlan mac support in this driver was a botch from day one
         either never worked, or not implemented or missing support functions
      
      Compile tested only.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8f47eb7
  14. 06 1月, 2014 2 次提交
  15. 01 1月, 2014 1 次提交
  16. 27 12月, 2013 1 次提交
  17. 06 12月, 2013 1 次提交
  18. 29 10月, 2013 1 次提交
    • A
      bnx2x: Disable VF access on PF removal · 826cb7b4
      Ariel Elior 提交于
      When the bnx2x driver is rmmoded, if VFs of a given PF will be assigned
      to a VM then that PF will be unable to call `pci_disable_sriov()'.
      
      If for that same PF there would also exist unassigned VFs in the hypervisor,
      the result will be that after the removal there will still be virtual PCI
      functions on the hypervisor.
      If the bnx2x module were to be re-inserted, the result will be that the VFs
      on the hypervisor will be re-probed directly following the PF's probe, even
      though that in regular loading flow sriov is only enabled once PF is loaded.
      The probed VF will then try to access its bar, causing a PCI error as the HW
      is not in a state enabling such a request.
      
      This patch adds a missing disablement procedure to the PF's removal, one that
      sets registers viewable to the VF to indicate that the VFs have no permission
      to access the bar, thus resulting in probe errors instead of PCI errors.
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      826cb7b4
  19. 22 10月, 2013 2 次提交
  20. 29 9月, 2013 1 次提交
  21. 24 9月, 2013 2 次提交
  22. 21 9月, 2013 1 次提交
  23. 10 9月, 2013 1 次提交
  24. 06 9月, 2013 1 次提交
  25. 28 8月, 2013 2 次提交
  26. 20 8月, 2013 2 次提交
  27. 14 8月, 2013 1 次提交
  28. 02 8月, 2013 1 次提交
    • Y
      bnx2x: Revising locking scheme for MAC configuration · 8b09be5f
      Yuval Mintz 提交于
      On very rare occasions, repeated load/unload stress test in the presence of
      our storage driver (bnx2i/bnx2fc) causes a kernel panic in bnx2x code
      (NULL pointer dereference). Stack traces indicate the issue happens during MAC
      configuration; thorough code review showed that indeed several races exist
      in which one thread can iterate over the list of configured MACs while another
      deletes entries from the same list.
      
      This patch adds a varient on the single-writer/Multiple-reader lock mechanism -
      It utilizes an already exsiting bottom-half lock, using it so that Whenever
      a writer is unable to continue due to the existence of another writer/reader,
      it pends its request for future deliverance.
      The writer / last readers will check for the existence of such requests and
      perform them instead of the original initiator.
      This prevents the writer from having to sleep while waiting for the lock
      to be accessible, which might cause deadlocks given the locks already
      held by the writer.
      
      Another result of this patch is that setting of Rx Mode is now made in
      sleepable context - Setting of Rx Mode is made under a bottom-half lock, which
      was always nontrivial for the bnx2x driver, as the HW/FW configuration requires
      wait for completions.
      Since sleep was impossible (due to the sleepless-context), various mechanisms
      were utilized to prevent the calling thread from sleep, but the truth was that
      when the caller thread (i.e, the one calling ndo_set_rx_mode()) returned, the
      Rx mode was still not set in HW/FW.
      
      bnx2x_set_rx_mode() will now overtly schedule for the Rx changes to be
      configured by the sp_rtnl_task which hold the RTNL lock and is sleepable
      context.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b09be5f