• Ariel Levkovich's avatar
    net/mlx5: Refactor tc flow attributes structure · c620b772
    Ariel Levkovich authored
    In order to support chains and connection tracking offload for
    nic flows, there's a need to introduce a common flow attributes
    struct so that these features can be agnostic and have access to
    a single attributes struct, regardless of the flow type.
    
    Therefore, a new tc flow attributes format is introduced to allow
    access to attributes that are common to eswitch and nic flows.
    
    The common attributes will always get allocated for the new flows,
    regardless of their type, while the type specific attributes are
    separated into different structs and will be allocated based on the
    flow type to avoid memory waste.
    
    When allocating the flow attributes the caller provides the flow
    steering namespace and according the namespace type the additional
    space for the extra, type specific, attributes is determined and
    added to the total attribute allocation size.
    
    In addition, the attributes that are going to be common to both
    flow types are moved to the common attributes struct.
    Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
    Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
    Reviewed-by: default avatarVlad Buslov <vladbu@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    c620b772
tc_ct.h 4.95 KB