1. 06 3月, 2020 9 次提交
  2. 05 3月, 2020 26 次提交
  3. 04 3月, 2020 5 次提交
    • J
      gianfar: remove unnecessary zeroing coalesce settings · 97ec3b21
      Jakub Kicinski 提交于
      Core already zeroes out the struct ethtool_coalesce structure,
      drivers don't have to set every field to 0 individually.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97ec3b21
    • D
      Merge branch 'Wire-up-Ocelot-tc-flower-to-Felix-DSA' · eae340fa
      David S. Miller 提交于
      Vladimir Oltean says:
      
      ====================
      Wire up Ocelot tc-flower to Felix DSA
      
      This series is a proposal on how to wire up the tc-flower callbacks into
      DSA. The example taken is the Microchip Felix switch, whose core
      implementation is actually located in drivers/net/ethernet/mscc/.
      
      The proposal is largely a compromise solution. The DSA middle layer
      handles just enough to get to the interesting stuff (FLOW_CLS_REPLACE,
      FLOW_CLS_DESTROY, FLOW_CLS_STATS), but also thin enough to let drivers
      decide what filter keys and actions they support without worrying that
      the DSA middle layer will grow exponentially. I am far from being an
      expert, so I am asking reviewers to please voice your opinion if you
      think it can be done differently, with better results.
      
      The bulk of the work was actually refactoring the ocelot driver enough
      to allow the VCAP (Versatile Content-Aware Processor) code for vsc7514
      and the vsc9959 switch cores to live together.
      
      Flow block offloads have not been tested yet, only filters attached to a
      single port. It might be as simple as replacing ocelot_ace_rule_create
      with something smarter, it might be more complicated, I haven't tried
      yet.
      
      I should point out that the tc-matchall filter offload is not
      implemented in the same manner in current mainline. Florian has already
      went all the way down into exposing actual per-action callbacks,
      starting with port mirroring. Because currently only mirred is supported
      by this DSA mid layer, everything else will return -EOPNOTSUPP. So even
      though ocelot supports matchall (aka port-based) policers, we don't have
      a call path to call into them.  Personally I think that this is not
      going to scale for tc-matchall (there may be policers, traps, drops,
      VLAN retagging, etc etc), and that we should consider whether further
      matchall filter/action combinations should be just passed on to drivers
      with no interpretation instead.
      As for the existing mirroring callbacks in DSA, they can either be kept
      as-is, or replaced with simple accessors to TC_CLSMATCHALL_REPLACE and
      TC_CLSMATCHALL_DESTROY, just like for flower, and drivers which
      currently implement the port mirroring callbacks will need to have some
      extra "if" conditions now, in order for them to call their port
      mirroring implementations.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eae340fa
    • V
      net: dsa: felix: Wire up the ocelot cls_flower methods · 07d985ee
      Vladimir Oltean 提交于
      Export the cls_flower methods from the ocelot driver and hook them up to
      the DSA passthrough layer.
      
      Tables for the VCAP IS2 parameters, as well as half key packing (field
      offsets and lengths) need to be defined for the VSC9959 core, as they
      are different from Ocelot, mainly due to the different port count.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07d985ee
    • V
      net: dsa: Add bypass operations for the flower classifier-action filter · ed11bb1f
      Vladimir Oltean 提交于
      Due to the immense variety of classification keys and actions available
      for tc-flower, as well as due to potentially very different DSA switch
      capabilities, it doesn't make a lot of sense for the DSA mid layer to
      even attempt to interpret these. So just pass them on to the underlying
      switch driver.
      
      DSA implements just the standard boilerplate for binding and unbinding
      flow blocks to ports, since nobody wants to deal with that.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed11bb1f
    • V
      net: mscc: ocelot: parameterize the vcap_is2 properties · 8551cdeb
      Vladimir Oltean 提交于
      Remove the definitions for the VCAP IS2 table from ocelot_ace.c, since
      it is specific to VSC7514.
      
      The VSC9959 VCAP IS2 table supports more rules (1024 instead of 64) and
      has a different width for the action (89 bits instead of 99).
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8551cdeb