Thread (8 messages) 8 messages, 3 authors, 2021-09-13

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

From: <hidden>
Date: 2021-08-31 06:55:02
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Dapeng Yu <redacted>

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 <redacted>
---
V2:
* Simplify the code and commit message of V1
---
 drivers/net/ice/base/ice_switch.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 9179f66c20..4afd1e80c1 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -3483,6 +3483,9 @@ 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;
 			default:
 				break;
 			}
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help