• Steen Hegelund's avatar
    net: microchip: sparx5: Add support for IS2 VCAP rule counters · f13230a4
    Steen Hegelund authored
    This adds API methods to set and get a rule counter.
    
    A VCAP instance may contain the counter as part of the VCAP cache area, and
    this counter may be one or more bits in width.  This type of counter
    automatically increments it value when the rule is hit.
    
    Other VCAP instances have a dedicated counter area outside of the VCAP and
    in this case the rule must contain the counter id to be able to locate the
    counter value.  In this case there must also be a rule action that updates
    the counter using the rule id when the rule is hit.
    
    The Sparx5 IS2 VCAP uses a dedicated counter area.
    Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f13230a4
sparx5_vcap_impl.c 23.3 KB