patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11] net/iavf: fix VF reset when using DCF
@ 2024-11-28 11:51 Bruce Richardson
  2024-12-04 11:39 ` Kevin Traynor
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2024-11-28 11:51 UTC (permalink / raw)
  To: stable; +Cc: ktraynor, Bruce Richardson

On the latest ice kernel driver, renegotiating
VIRTCHNL_OP_GET_VF_RESOURCES will fail when using DCF (Device Config
Function) if a hardware reset is not done.

Fix this by sending VIRTCHNL_OP_RESET_VF to PF before DPDK resets VF.

Fixes: e74e1bb6280d ("net/iavf: enable port reset")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

Note: This fix is effectively a merge of previous main tree patches:
0f9ec0cbd2a9 ("net/iavf: fix VF reset when using DCF")
b34fe66ea893 ("net/iavf: delay VF reset command")

The latter was tagged for possible backport to 21.11, but we are
actually using commit log of former - with the commit body mostly the
latter, since it reworked the original fix.
---
 drivers/common/iavf/iavf_prototype.h | 1 +
 drivers/common/iavf/version.map      | 1 +
 drivers/net/iavf/iavf_ethdev.c       | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/common/iavf/iavf_prototype.h b/drivers/common/iavf/iavf_prototype.h
index 1c125d1d94..b32754938a 100644
--- a/drivers/common/iavf/iavf_prototype.h
+++ b/drivers/common/iavf/iavf_prototype.h
@@ -83,6 +83,7 @@ void iavf_destroy_spinlock(struct iavf_spinlock *sp);
 __rte_internal
 void iavf_vf_parse_hw_config(struct iavf_hw *hw,
 			     struct virtchnl_vf_resource *msg);
+__rte_internal
 enum iavf_status iavf_vf_reset(struct iavf_hw *hw);
 __rte_internal
 enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
diff --git a/drivers/common/iavf/version.map b/drivers/common/iavf/version.map
index e0f117197c..6c1427cca4 100644
--- a/drivers/common/iavf/version.map
+++ b/drivers/common/iavf/version.map
@@ -7,6 +7,7 @@ INTERNAL {
 	iavf_set_mac_type;
 	iavf_shutdown_adminq;
 	iavf_vf_parse_hw_config;
+	iavf_vf_reset;
 
 	local: *;
 };
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 4885a86ad3..fdfc9b1e4e 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2710,6 +2710,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
 		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
 	}
 
+	iavf_vf_reset(hw);
 	iavf_shutdown_adminq(hw);
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
 		/* disable uio intr before callback unregister */
-- 
2.43.0


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

* Re: [PATCH 21.11] net/iavf: fix VF reset when using DCF
  2024-11-28 11:51 [PATCH 21.11] net/iavf: fix VF reset when using DCF Bruce Richardson
@ 2024-12-04 11:39 ` Kevin Traynor
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Traynor @ 2024-12-04 11:39 UTC (permalink / raw)
  To: Bruce Richardson, stable

On 28/11/2024 12:51, Bruce Richardson wrote:
> On the latest ice kernel driver, renegotiating
> VIRTCHNL_OP_GET_VF_RESOURCES will fail when using DCF (Device Config
> Function) if a hardware reset is not done.
> 
> Fix this by sending VIRTCHNL_OP_RESET_VF to PF before DPDK resets VF.
> 
> Fixes: e74e1bb6280d ("net/iavf: enable port reset")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> 
> Note: This fix is effectively a merge of previous main tree patches:
> 0f9ec0cbd2a9 ("net/iavf: fix VF reset when using DCF")
> b34fe66ea893 ("net/iavf: delay VF reset command")
> 
> The latter was tagged for possible backport to 21.11, but we are
> actually using commit log of former - with the commit body mostly the
> latter, since it reworked the original fix.
> ---
>  drivers/common/iavf/iavf_prototype.h | 1 +
>  drivers/common/iavf/version.map      | 1 +
>  drivers/net/iavf/iavf_ethdev.c       | 1 +
>  3 files changed, 3 insertions(+)
> 

Thanks Bruce. This is now applied and pushed to 21.11 branch.
Kevin.


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

end of thread, other threads:[~2024-12-04 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-28 11:51 [PATCH 21.11] net/iavf: fix VF reset when using DCF Bruce Richardson
2024-12-04 11:39 ` Kevin Traynor

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).