• Michal Swiatkowski's avatar
    ice: support for GRE in eswitch · f0a35040
    Michal Swiatkowski authored
    Mostly reuse code from Geneve and VXLAN in TC parsing code. Add new GRE
    header to match on correct fields. Create new dummy packets with GRE
    fields.
    
    Instead of checking if any encap values are presented in TC flower,
    check if device is tunnel type or redirect is to tunnel device. This
    will allow adding all combination of rules. For example filters only
    with inner fields.
    
    Return error in case device isn't tunnel but encap values are presented.
    
    gre example:
    - create tunnel device
    ip l add $NVGRE_DEV type gretap remote $NVGRE_REM_IP local $VF1_IP \
    dev $PF
    - add tc filter (in switchdev mode)
    tc filter add dev $NVGRE_DEV protocol ip parent ffff: flower dst_ip \
    $NVGRE1_IP action mirred egress redirect dev $VF1_PR
    Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Tested-by: default avatarSandeep Penigalapati <sandeep.penigalapati@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    f0a35040
ice_tc_lib.c 37.6 KB