1. 18 1月, 2023 12 次提交
  2. 17 1月, 2023 25 次提交
  3. 16 1月, 2023 3 次提交
    • D
      Merge branch 'net-microchip-vcap-rules' · 87b08a8c
      David S. Miller 提交于
      Steen Hegelund says:
      
      ====================
      net: microchip: Add support for two classes of VCAP rules
      
      This adds support for two classes of VCAP rules:
      
      - Permanent rules (added e.g. for PTP support)
      - TC user rules (added by the TC userspace tool)
      
      For this to work the VCAP Loopups must be enabled from boot, so that the
      "internal" clients like PTP can add rules that are always active.
      
      When the TC tool add a flower filter the VCAP rule corresponding to this
      filter will be disabled (kept in memory) until a TC matchall filter creates
      a link from chain 0 to the chain (lookup) where the flower filter was
      added.
      
      When the flower filter is enabled it will be written to the appropriate
      VCAP lookup and become active in HW.
      
      Likewise the flower filter will be disabled if there is no link from chain
      0 to the chain of the filter (lookup), and when that happens the
      corresponding VCAP rule will be read from the VCAP instance and stored in
      memory until it is deleted or enabled again.
      
      Version History:
      ================
      v4      Removed a leftover 'Fixes' tag from v2.  No functional changes.
      
      v3      Removed the change that allowed rules to always be added in the
              LAN996x even though the lookups are not enabled (Horatiu Vultur).
              This was sent separately to net instead.
      
              Removed the 'Fixes' tags due to the patch sent to net by Horatiu
              Vultur.
      
              Added a check for validity of the chain source when enabling a
              lookup.
      
      v2      Adding a missing goto exit in vcap_add_rule (Dan Carpenter).
              Added missing checks for error returns in vcap_enable_rule.
      
      v1      Initial version
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87b08a8c
    • S
      net: microchip: vcap api: Enable/Disable rules via chains in VCAP HW · 18a15c76
      Steen Hegelund 提交于
      This supports that individual rules are enabled and disabled via chain
      information.
      This is done by keeping disabled rules in the VCAP list (cached) until they
      are enabled, and only at this time are the rules written to the VCAP HW.
      Signed-off-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: NSteen Hegelund <steen.hegelund@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18a15c76
    • S
      net: microchip: vcap api: Add a storage state to a VCAP rule · 814e7693
      Steen Hegelund 提交于
      This allows a VCAP rule to be in one of 3 states:
      
      - permanently stored in the VCAP HW (for rules that must always be present)
      - enabled (stored in HW) when the corresponding lookup has been enabled
      - disabled (stored in SW) when the lookup is disabled
      
      This way important VCAP rules can be added even before the user enables the
      VCAP lookups using a TC matchall filter.
      Signed-off-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: NSteen Hegelund <steen.hegelund@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      814e7693