ice: Add support for outer dest MAC for ADQ tunnels
authorAmritha Nambiar <amritha.nambiar@intel.com>
Wed, 9 Feb 2022 01:06:05 +0000 (17:06 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 9 Mar 2022 18:05:32 +0000 (10:05 -0800)
commit02ddec1986ff0b8de20094aae2fa5b8f8ee7e1a3
treea38babb113c6a3113070afe40459d7df41e27a2a
parent457a02f03e9207421931471fe50ed3fba70aa868
ice: Add support for outer dest MAC for ADQ tunnels

TC flower does not support matching on user specified
outer MAC address for tunnels. For ADQ tunnels, the driver
adds outer destination MAC address as lower netdev's
active unicast MAC address to filter out packets with
unrelated MAC address being delivered to ADQ VSIs.

Example:
- create tunnel device
ip l add $VXLAN_DEV type vxlan id $VXLAN_VNI dstport $VXLAN_PORT \
dev $PF
- add TC filter (in ADQ mode)

$tc filter add dev $VXLAN_DEV protocol ip parent ffff: flower \
 dst_ip $INNER_DST_IP ip_proto tcp dst_port $INNER_DST_PORT \
 enc_key_id $VXLAN_VNI hw_tc $ADQ_TC

Note: Filters with wild-card tunnel ID (when user does not
specify tunnel key) are also supported.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_tc_lib.c