• Maxime Chevallier's avatar
    net: mvpp2: cls: Use iterators to go through the cls_table · e4bfb4ac
    Maxime Chevallier authored
    The cls_table is a global read-only table containing the different
    parameters that are used by various tables in the classifier. It
    describes the links between the Header Parser, the decoding table and
    the flow_table.
    
    There are several possible way we want to iterate over that table,
    depending on wich classifier engine we want to configure. For the Header
    Parser, we want to iterate over each entry. For the Decoding table, we
    want to iterate over each entry having a unique flow_id. Finally, when
    configuring an ethtool flow, we want to iterate over each entry having a
    unique flow_id and that has a given flow_type.
    
    This commit introduces some iterator to both provide syntactic sugar and
    also clarify the way we want to iterate over the table.
    Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e4bfb4ac
mvpp2_cls.c 32.6 KB