[dpdk-dev] [PATCH v3] net/ice/base: get PF ID of VF's parent

dapengx.yu at intel.com dapengx.yu at intel.com
Tue Aug 31 09:03:33 CEST 2021


From: Dapeng Yu <dapengx.yu at intel.com>

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 at dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
---
V2:
* Simplify the code and commit message of V1
V3:
* Fix V2 code defect
---
 drivers/net/ice/base/ice_switch.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 9179f66c20..ac5c09945f 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -3483,6 +3483,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
 						   pf_vf_num, is_vf);
 				j++;
 				break;
+			case ICE_AQC_GET_SW_CONF_RESP_VSI:
+				if (hw->dcf_enabled && !is_vf)
+					hw->pf_id = pf_vf_num;
+				break;
 			default:
 				break;
 			}
-- 
2.27.0



More information about the dev mailing list