diff mbox series

[2/2] net/ice: get PF ID of VF's parent

Message ID 20210818083226.795256-2-dapengx.yu@intel.com (mailing list archive)
State Superseded
Delegated to: Qi Zhang
Headers show
Series [1/2] net/ice/base: get PF ID of VF's parent | expand


Context Check Description
ci/intel-Testing fail Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing fail Testing issues
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Yu, DapengX Aug. 18, 2021, 8:32 a.m. UTC
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(+)
diff mbox series


diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index f461318f96..9a32fde59a 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -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) {