From: Dapeng Yu Date: Mon, 13 Sep 2021 02:40:02 +0000 (+0800) Subject: net/ice/base: fix PF ID for DCF X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f979702337c69c7b73a78a10cbfb700c74b3b508;p=dpdk.git 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: 0b02c9519432 ("net/ice: handle PF initialization by DCF") Cc: stable@dpdk.org Signed-off-by: Dapeng Yu Acked-by: Haiyue Wang --- diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 9179f66c20..93cd79e8ef 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -3471,6 +3471,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw) ICE_AQC_GET_SW_CONF_RESP_TYPE_S); 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_VIRT_PORT: if (j == num_total_ports) {