net/ice/base: fix PF ID for DCF

In original implementation, if DCF is created on PF1, the PF ID is
still 0, but not 1. Without the right PF ID, the ACL will not work.

This patch makes VF to get its parent's physical function ID.

Fixes: 0b02c95194 ("net/ice: handle PF initialization by DCF")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
This commit is contained in:
Dapeng Yu 2021-09-13 10:40:02 +08:00 committed by Qi Zhang
parent daf3332e11
commit f979702337

View File

@ -3471,6 +3471,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
ICE_AQC_GET_SW_CONF_RESP_TYPE_S); ICE_AQC_GET_SW_CONF_RESP_TYPE_S);
switch (res_type) { switch (res_type) {
case ICE_AQC_GET_SW_CONF_RESP_VSI:
if (hw->dcf_enabled && !is_vf)
hw->pf_id = pf_vf_num;
break;
case ICE_AQC_GET_SW_CONF_RESP_PHYS_PORT: case ICE_AQC_GET_SW_CONF_RESP_PHYS_PORT:
case ICE_AQC_GET_SW_CONF_RESP_VIRT_PORT: case ICE_AQC_GET_SW_CONF_RESP_VIRT_PORT:
if (j == num_total_ports) { if (j == num_total_ports) {