net/ice: fix VSI context
authorBeilei Xing <beilei.xing@intel.com>
Sat, 14 Dec 2019 06:14:17 +0000 (14:14 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:01 +0000 (19:46 +0100)
There'll always be a MDD event triggered when adding
a FDIR rule. The root cause is 'LAN enable' is not
configured during control VSI setup.
Besides, correct FDIR fields for both main VSI and
control VSI.

Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/ice/ice_ethdev.c

index 2cbd82c..cf99fc3 100644 (file)
@@ -1576,7 +1576,7 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
                cfg = ICE_AQ_VSI_PROP_SECURITY_VALID |
                        ICE_AQ_VSI_PROP_FLOW_DIR_VALID;
                vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
-               cfg = ICE_AQ_VSI_FD_ENABLE | ICE_AQ_VSI_FD_PROG_ENABLE;
+               cfg = ICE_AQ_VSI_FD_ENABLE;
                vsi_ctx.info.fd_options = rte_cpu_to_le_16(cfg);
                vsi_ctx.info.max_fd_fltr_dedicated =
                        rte_cpu_to_le_16(hw->func_caps.fd_fltr_guar);
@@ -1604,9 +1604,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
 
                cfg = ICE_AQ_VSI_PROP_FLOW_DIR_VALID;
                vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
-               cfg = ICE_AQ_VSI_FD_ENABLE | ICE_AQ_VSI_FD_PROG_ENABLE;
+               cfg = ICE_AQ_VSI_FD_PROG_ENABLE;
                vsi_ctx.info.fd_options = rte_cpu_to_le_16(cfg);
                vsi_ctx.info.sw_id = hw->port_info->sw_id;
+               vsi_ctx.info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
                ret = ice_vsi_config_tc_queue_mapping(vsi,
                                                      &vsi_ctx.info,
                                                      ICE_DEFAULT_TCMAP);