net/ice/base: fix switch rule for IPsec
When we download a switch rule for ipv6 with esp payload
"eth / ipv6 / esp spi is 1 / end actions queue index 2 / end"
if we don't add bm bit set check for tun_type, then a packet of
ipv4 with esp payload
"sendp([Ether(dst="00:00:00:00:01:00")/IP(proto=50)/ESP(spi=1)/
("X"*480)], iface="ens5f0", count=10)"
Will also go to queue index 2. And also, we need to do tun_type
check, or the second rule of following can not be download because
of rejection from switch rule download function ice_aq_sw_rules().
"eth / ipv4 / esp spi is 1 / end actions queue index 5 / end"
"eth / ipv6 / esp spi is 1 / end actions queue index 2 / end"
Fixes:
4f11962fce84 ("net/ice/base: support AH ESP and NAT-T on switch")
Fixes:
99d8ba79efbe ("net/ice/base: force switch to use different recipe")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Qi Fu <qi.fu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>