• Maxime Chevallier's avatar
    net: mvpp2: cls: Add steering based on vlan Id and priority. · 1274daed
    Maxime Chevallier authored
    This commit allows using the vlan Id and priority as parts of the key
    for classification offload. These fields are extracted from the
    outermost tag, if multiple tags are present.
    
    Vlan Id and priority are considered as 2 different fields by the
    classifier, however the fields are both appended in the Header Extracted
    Key in the same layout as they are found in the tags. This means that
    when steering only based on the prio, a 16-bit slot is still taken in
    the HEK.
    
    The classifier doesn't allow extracting the DEI bit from the tag, so we
    explicitly prevent user from using this bit in the key.
    
    This commit adds the vlan priotity as a compatible HEK field for
    tagged traffic, meaning that we limit the possibility of extracting this
    field only to the flows that contain tagged traffic.
    Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1274daed
mvpp2_cls.c 48.6 KB