[2/2] net/ice: get PF ID of VF's parent
Checks
Commit Message
From: Dapeng Yu <dapengx.yu@intel.com>
In original implementation, when DCF is initialized, the physical
function ID of its parent adapter is not set correctly. Its initial
value is always zero, even if DCF is created on 1# physical function
and, further, causes ACL to initialize wrongly. Finally, the ACL flow
rule cannot take effect if it is created via VF0 of physical
function 1#.
This patch makes VF able to get its parent's physical function ID.
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
---
drivers/net/ice/ice_dcf_parent.c | 3 +++
1 file changed, 3 insertions(+)
@@ -317,6 +317,9 @@ ice_dcf_init_parent_hw(struct ice_hw *hw)
if (status)
goto err_unroll_alloc;
+ if (!hw->port_info->is_vf)
+ hw->pf_id = hw->port_info->pf_vf_num;
+
pcaps = (struct ice_aqc_get_phy_caps_data *)
ice_malloc(hw, sizeof(*pcaps));
if (!pcaps) {