• Paul Blakey's avatar
    net/mlx5: E-Switch, Move source port on reg_c0 to the upper 16 bits · 0f0d3827
    Paul Blakey authored
    Multi chain support requires the miss path to continue the processing
    from the last chain id, and for that we need to save the chain
    miss tag (a mapping for 32bit chain id) on reg_c0 which will
    come in a next patch.
    
    Currently reg_c0 is exclusively used to store the source port
    metadata, giving it 32bit, it is created from 16bits of vcha_id,
    and 16bits of vport number.
    
    We will move this source port metadata to upper 16bits, and leave the
    lower bits for the chain miss tag. We compress the reg_c0 source port
    metadata to 16bits by taking 8 bits from vhca_id, and 8bits from
    the vport number.
    
    Since we compress the vport number to 8bits statically, and leave two
    top ids for special PF/ECPF numbers, we will only support a max of 254
    vports with this strategy.
    Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
    Reviewed-by: default avatarOz Shlomo <ozsh@mellanox.com>
    Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    0f0d3827
main.c 193 KB