summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
diff options
context:
space:
mode:
authorAvinash Dayanand <avinash.dayanand@intel.com>2018-01-23 08:51:06 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-02-14 09:43:22 -0800
commite284fc280473bed23f2e1ed324e102a48f7d17e1 (patch)
tree15a300902704923f422e1119afa6e9c35dafc35c /drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
parent0075fa0fadd0ac6daf5c26a153e7bfa56fc9b4f3 (diff)
i40e: Add and delete cloud filter
This patch provides support to add or delete cloud filter for queue channels created for ADq on VF. We are using the HW's cloud filter feature and programming it to act as a TC filter applied to a group of queues. There are two possible modes for a VF when applying a cloud filter 1. Basic Mode: Intended to apply filters that don't need a VF to be Trusted. This would include the following Dest MAC + L4 port Dest MAC + VLAN + L4 port 2. Advanced Mode: This mode is only for filters with combination that requires VF to be Trusted. Dest IP + L4 port When cloud filters are applied on a trusted VF and for some reason the same VF is later made as untrusted then all cloud filters will be deleted. All cloud filters has to be re-applied in such a case. Cloud filters are also deleted when queue channel is deleted. Testing-Hints: ============= 1. Adding Basic Mode filter should be possible on a VF in Non-Trusted mode. 2. In Advanced mode all filters should be able to be created. Steps: ====== 1. Enable ADq and create TCs using TC mqprio command 2. Apply cloud filter. 3. Turn-off the spoof check. 4. Pass traffic. Example: ======== 1. tc qdisc add dev enp4s2 root mqprio num_tc 4 map 0 0 0 0 1 2 2 3\ queues 2@0 2@2 1@4 1@5 hw 1 mode channel 2. tc qdisc add dev enp4s2 ingress 3. ethtool -K enp4s2 hw-tc-offload on 4. ip link set ens261f0 vf 0 spoofchk off 5. tc filter add dev enp4s2 protocol ip parent ffff: prio 1 flower\ dst_ip 192.168.3.5/32 ip_proto udp dst_port 25 skip_sw hw_tc 2 Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
index 6e794c8a1ef3..6852599b2379 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
@@ -128,6 +128,8 @@ struct i40e_vf {
bool adq_enabled; /* flag to enable adq */
u8 num_tc;
struct i40evf_channel ch[I40E_MAX_VF_VSI];
+ struct hlist_head cloud_filter_list;
+ u16 num_cloud_filters;
/* RDMA Client */
struct virtchnl_iwarp_qvlist_info *qvlist_info;