• Subbaraya Sundeep's avatar
    octeontx2-pf: Add TC feature for VFs · 4b0385bc
    Subbaraya Sundeep authored
    This patch adds TC feature for VFs also. When MCAM
    rules are allocated for a VF then either TC or ntuple
    filters can be used. Below are the commands to use
    TC feature for a VF(say lbk0):
    
    devlink dev param set pci/0002:01:00.1 name mcam_count value 16 \
     cmode runtime
    ethtool -K lbk0 hw-tc-offload on
    ifconfig lbk0 up
    tc qdisc add dev lbk0 ingress
    tc filter add dev lbk0 parent ffff: protocol ip flower skip_sw \
     dst_mac 98:03:9b:83:aa:12 action police rate 100Mbit burst 5000
    
    Also to modify any fields of the hardware context with
    NIX_AQ_INSTOP_WRITE command then corresponding masks of those
    fields must be set as per hardware. This was missing in
    ingress ratelimiting context. This patch sets those masks also.
    Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4b0385bc
otx2_tc.c 27.7 KB