• Edward Cree's avatar
    sfc: add offloading of 'foreign' TC (decap) rules · 17654d84
    Edward Cree authored
    A 'foreign' rule is one for which the net_dev is not the sfc netdevice
     or any of its representors.  The driver registers indirect flow blocks
     for tunnel netdevs so that it can offload decap rules.  For example:
    
        tc filter add dev vxlan0 parent ffff: protocol ipv4 flower \
            enc_src_ip 10.1.0.2 enc_dst_ip 10.1.0.1 \
            enc_key_id 1000 enc_dst_port 4789 \
            action tunnel_key unset \
            action mirred egress redirect dev $REPRESENTOR
    
    When notified of a rule like this, register an encap match on the IP
     and dport tuple (creating an Outer Rule table entry) and insert an MAE
     action rule to perform the decapsulation and deliver to the representee.
    
    Moved efx_tc_delete_rule() below efx_tc_flower_release_encap_match() to
     avoid the need for a forward declaration.
    Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
    Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    17654d84
mae.h 3.99 KB