DPDK patches and discussions
 help / color / mirror / Atom feed
From: dapengx.yu@intel.com
To: Qiming Yang <qiming.yang@intel.com>, Qi Zhang <qi.z.zhang@intel.com>
Cc: dev@dpdk.org, Dapeng Yu <dapengx.yu@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] net/ice: get PF ID of VF's parent
Date: Wed, 18 Aug 2021 16:32:26 +0800	[thread overview]
Message-ID: <20210818083226.795256-2-dapengx.yu@intel.com> (raw)
In-Reply-To: <20210818083226.795256-1-dapengx.yu@intel.com>

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 --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) {
-- 
2.27.0


  reply	other threads:[~2021-08-18  8:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  8:32 [dpdk-dev] [PATCH 1/2] net/ice/base: " dapengx.yu
2021-08-18  8:32 ` dapengx.yu [this message]
2021-08-31  6:54 ` [dpdk-dev] [PATCH v2] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818083226.795256-2-dapengx.yu@intel.com \
    --to=dapengx.yu@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).