• Vladimir Oltean's avatar
    net: mscc: ocelot: store a namespaced VCAP filter ID · 50c6cc5b
    Vladimir Oltean authored
    We will be adding some private VCAP filters that should not interfere in
    any way with the filters added using tc-flower. So we need to allocate
    some IDs which will not be used by tc.
    
    Currently ocelot uses an u32 id derived from the flow cookie, which in
    itself is an unsigned long. This is a problem in itself, since on 64 bit
    systems, sizeof(unsigned long)=8, so the driver is already truncating
    these.
    
    Create a struct ocelot_vcap_id which contains the full unsigned long
    cookie from tc, as well as a boolean that is supposed to namespace the
    filters added by tc with the ones that aren't.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    50c6cc5b
ocelot_vcap.c 41.1 KB