DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/ice/base: get PF ID of VF's parent
@ 2021-08-18  8:32 dapengx.yu
  2021-08-18  8:32 ` [dpdk-dev] [PATCH 2/2] net/ice: " dapengx.yu
  2021-08-31  6:54 ` [dpdk-dev] [PATCH v2] net/ice/base: " dapengx.yu
  0 siblings, 2 replies; 8+ messages in thread
From: dapengx.yu @ 2021-08-18  8:32 UTC (permalink / raw)
  To: Qiming Yang, Qi Zhang; +Cc: dev, Dapeng Yu

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

In original implementation, when one or more VFs are created, and VF0
is used as DCF, there is no way to get the physical function ID of their
parent adapter via VF0. The physical function ID is critical for
initializing ACL feature, if wrong physical function ID is used, the ACL
cannot be initialized successfully, and the ACL rule cannot take effect.

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/base/ice_switch.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 5926635088..a1caa9c45d 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -3413,6 +3413,10 @@ ice_init_port_info(struct ice_port_info *pi, u16 vsi_port_num, u8 type,
 		pi->dflt_tx_vsi_num = ICE_DFLT_VSI_INVAL;
 		pi->dflt_rx_vsi_num = ICE_DFLT_VSI_INVAL;
 		break;
+	case ICE_AQC_GET_SW_CONF_RESP_VSI:
+		pi->is_vf = is_vf;
+		pi->pf_vf_num = pf_vf_num;
+		break;
 	default:
 		ice_debug(pi->hw, ICE_DBG_SW, "incorrect VSI/port type received\n");
 		break;
@@ -3487,6 +3491,14 @@ 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:
+				/* get PF ID of VF's parent */
+				if (!is_vf)
+					ice_init_port_info(hw->port_info,
+							   vsi_port_num,
+							   res_type, swid,
+							   pf_vf_num, is_vf);
+				break;
 			default:
 				break;
 			}
-- 
2.27.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-13  2:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18  8:32 [dpdk-dev] [PATCH 1/2] net/ice/base: get PF ID of VF's parent dapengx.yu
2021-08-18  8:32 ` [dpdk-dev] [PATCH 2/2] net/ice: " dapengx.yu
2021-08-31  6:54 ` [dpdk-dev] [PATCH v2] net/ice/base: " dapengx.yu
2021-08-31  7:03   ` [dpdk-dev] [PATCH v3] " dapengx.yu
2021-08-31  7:09     ` Wang, Haiyue
2021-09-13  2:40     ` [dpdk-dev] [PATCH v4] " dapengx.yu
2021-09-13  2:46       ` Zhang, Qi Z
2021-08-31  7:04   ` [dpdk-dev] [PATCH v2] " Wang, Haiyue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).