• Vladimir Oltean's avatar
    net: mscc: ocelot: look up the filters in flower_stats() and flower_destroy() · 98642d1a
    Vladimir Oltean authored
    Currently a new filter is created, containing just enough correct
    information to be able to call ocelot_vcap_block_find_filter_by_index()
    on it.
    
    This will be limiting us in the future, when we'll have more metadata
    associated with a filter, which will matter in the stats() and destroy()
    callbacks, and which we can't make up on the spot. For example, we'll
    start "offloading" some dummy tc filter entries for the TCAM skeleton,
    but we won't actually be adding them to the hardware, or to block->rules.
    So, it makes sense to avoid deleting those rules too. That's the kind of
    thing which is difficult to determine unless we look up the real filter.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    98642d1a
ocelot_vcap.c 33.3 KB