1. 22 5月, 2017 1 次提交
    • M
      qede: Don't use an internal MAC field · 492a1d98
      Mintz, Yuval 提交于
      Driver maintains its primary MAC in a private field which
      gets updated when ndo_dev_set_mac() gets called.
      
      However, there are flows where the primary MAC of the device can change
      without said NDO being called [bond device in TLB mode configuring
      slaves' addresses], resulting in a configuration where there's a mismatch
      between what's apparent to user [the netdevice's value] and what's
      configured in the HW [the private value].
      
      As we don't have any real motivation of maintaining this
      private field, simply remove it and start using the netdevice's
      field instead.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      492a1d98
  2. 03 5月, 2017 1 次提交
  3. 25 4月, 2017 2 次提交
  4. 18 4月, 2017 1 次提交
  5. 07 4月, 2017 2 次提交
    • M
      qede: Add support for ingress headroom · 15ed8a47
      Mintz, Yuval 提交于
      Driver currently doesn't support any headroom; The only 'available'
      space it has in the head of the buffer is due to the placement
      offset.
      In order to allow [later] support of XDP adjustment of headroom,
      modify the the ingress flow to properly handle a scenario where
      the packets would have such.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15ed8a47
    • M
      qede: Correct XDP forward unmapping · 89e1afc4
      Mintz, Yuval 提交于
      Driver is currently using dma_unmap_single() with the address it
      passed to device for the purpose of forwarding, but the XDP
      transmission buffer was originally a page allocated for the rx-queue.
      The mapped address is likely to differ from the original mapped
      address due to the placement offset.
      
      This difference is going to get even bigger once we support headroom.
      
      Cache the original mapped address of the page, and use it for unmapping
      of the buffer when completion arrives for the XDP forwarded packet.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89e1afc4
  6. 15 3月, 2017 1 次提交
  7. 14 3月, 2017 1 次提交
  8. 16 2月, 2017 1 次提交
  9. 02 1月, 2017 6 次提交
  10. 01 12月, 2016 7 次提交
    • M
      qede: Add support for XDP_TX · cb6aeb07
      Mintz, Yuval 提交于
      Add support for forwarding via XDP. Once the eBPF is attached,
      driver would allocate & configure a designated transmission queue
      meant solely for forwarding packets. Said queue would share the
      receive-queue's interrupt line, and would have it's own Tx statistics.
      
      Infrastructure changes required for this [spread-out through the code]:
       - Determine the DMA direction of the receive buffers based on the presence
      of the eBPF program.
       - Turn the sw Tx ring into a union, as regular/XDP queues have different
      needs for releasing resources after completion [regular requires the SKB,
      XDP requires the transmitted page].
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb6aeb07
    • M
      qede: Add basic XDP support · 496e0517
      Mintz, Yuval 提交于
      Add support for the ndo_xdp callback. This patch would support XDP_PASS,
      XDP_DROP and XDP_ABORTED commands.
      
      This also adds a per Rx queue statistic which counts number of packets
      which didn't reach the stack [due to XDP].
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      496e0517
    • M
      qede: Better utilize the qede_[rt]x_queue · 9eb22357
      Mintz, Yuval 提交于
      Improve the cacheline usage of both queues by reordering -
      This reduces the cachelines required for egress datapath processing
      from 3 to 2 and those required by ingress datapath processing by 2.
      
      It also changes a couple of datapath related functions that currently
      require either the fastpath or the qede_dev, changing them to be based
      on the tx/rx queue instead.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9eb22357
    • M
      qed*: Handle-based L2-queues. · 3da7a37a
      Mintz, Yuval 提交于
      The driver needs to maintain several FW/HW-indices for each one of
      its queues. Currently, that mapping is done by the QED where it uses
      an rx/tx array of so-called hw-cids, populating them whenever a new
      queue is opened and clearing them upon destruction of said queues.
      
      This maintenance is far from ideal - there's no real reason why
      QED needs to maintain such a data-structure. It becomes even worse
      when considering the fact that the PF's queues and its child VFs' queues
      are all mapped into the same data-structure.
      As a by-product, the set of parameters an interface needs to supply for
      queue APIs is non-trivial, and some of the variables in the API
      structures have different meaning depending on their exact place
      in the configuration flow.
      
      This patch re-organizes the way L2 queues are configured and maintained.
      In short:
        - Required parameters for queue init are now well-defined.
        - Qed would allocate a queue-cid based on parameters.
          Upon initialization success, it would return a handle to caller.
        - Queue-handle would be maintained by entity requesting queue-init,
          not necessarily qed.
        - All further queue-APIs [update, destroy] would use the opaque
          handle as reference for the queue instead of various indices.
      
      The possible owners of such handles:
        - PF queues [qede] - complete handles based on provided configuration.
        - VF queues [qede] - fw-context-less handles, containing only relative
          information; Only the PF-side would need the absolute indices
          for configuration, so they're omitted here.
        - VF queues [qed, PF-side] - complete handles based on VF initialization.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3da7a37a
    • M
      qede: Revise state locking scheme · 567b3c12
      Mintz, Yuval 提交于
      As qede utilizes an internal-reload sequence as result of various
      configuration changes, the netif state wouldn't always accurately describe
      the status of the configuration.
      To compensate, we're storing an internal state of the device, which should
      only be accessed under the qede_lock.
      
      This patch fixes and improves several state/lock interactions:
        - The internal state should only be checked while locked.
        - While holding lock, it's preferable to check state rather than
          the netdevice's state.
        - The reload sequence is not 'atomic' - unload and subsequent load
          are not in the same critical section.
      
      This also add the 'locked' variant for the reload, which would later be
      used by XDP - useful in the case where the correct sequence is 'lock,
      check state and re-configure if good', instead of allowing the reload
      itself to make the decision regarding the configurability of the device.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      567b3c12
    • M
      qede: Remove 'num_tc'. · 80439a17
      Mintz, Yuval 提交于
      Driver currently doesn't support multi-CoS, but it contains logic
      where multiple transmission queues could be theoretically manipulated.
      No point in maintaining the infrastructure at the moment.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      80439a17
    • M
      qede: Optimize aggregation information size · 01e23015
      Mintz, Yuval 提交于
      Driver needs to maintain a structure per-each concurrent possible
      open aggregation, but the structure storing that metadata is far from
      being optimized - biggest waste in it is that there are 2 buffer metadata,
      one for a replacement buffer when the aggregation begins and the other for
      holding the first aggregation's buffer after it begins [as firmware might
      still update it]. Those 2 can safely be united into a single metadata
      structure.
      
      struct qede_agg_info changes the following:
      
      	/* size: 120, cachelines: 2, members: 9 */
      	/* sum members: 114, holes: 1, sum holes: 4 */
      	/* padding: 2 */
      	/* paddings: 2, sum paddings: 8 */
      	/* last cacheline: 56 bytes */
       -->
      	/* size: 48, cachelines: 1, members: 9 */
      	/* paddings: 1, sum paddings: 4 */
      	/* last cacheline: 48 bytes */
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01e23015
  11. 01 11月, 2016 1 次提交
  12. 23 10月, 2016 2 次提交
  13. 18 10月, 2016 1 次提交
  14. 14 10月, 2016 1 次提交
  15. 04 10月, 2016 1 次提交
  16. 24 8月, 2016 1 次提交
  17. 23 8月, 2016 1 次提交
    • Y
      qed*: Add support for VFs over legacy PFs · d8c2c7e3
      Yuval Mintz 提交于
      Modern VFs can't run on old non-compatible as the fastpath HSI is
      slightly changed - but as the HSI is actually very close [basically,
      a single bit whose meaning flipped] this can be supported with small
      modifications.
      
      The major differences would be in:
        - Recognizing that VF is running on top of a legacy PF.
        - Returning some slowpath configurations that are no longer needed
          on top of modern PFs, but would be required when working over
          the legacy ones.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8c2c7e3
  18. 20 8月, 2016 1 次提交
    • Y
      qed: utilize FW 8.10.10.0 · 05fafbfb
      Yuval Mintz 提交于
      This new firmware for the qed* adpaters fixes several issues:
       - Better blocking of malicious VFs.
       - After FLR, Tx-switching [internal routing] of packets might
         be incorrect.
       - Deletion of unicast MAC filters would sometime have side-effect
         of corrupting the MAC filters configred for a device.
      It also contains fixes for future qed* drivers that *hopefully* would be
      sent for review in the near future.
      
      In addition, it would allow driver some new functionality, including:
       - Allowing PF/VF driver compaitibility with old drivers [running
         pre-8.10.5.0 firmware].
       - Better debug facilities.
      
      This would also bump the qed* driver versions to 8.10.9.20.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05fafbfb
  19. 19 8月, 2016 2 次提交
  20. 01 7月, 2016 3 次提交
  21. 09 6月, 2016 1 次提交
  22. 12 5月, 2016 1 次提交
  23. 02 5月, 2016 1 次提交