Skip to content

Commit

Permalink
net/iavf: fix VF reset when using DCF
Browse files Browse the repository at this point in the history
[ upstream commit 0f9ec0cbd2a96c2bde3489fbc8f4e254f639905c ]

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.

Note, this is effectively the following main branch commits squashed:
0f9ec0cbd2a9 ("net/iavf: fix VF reset when using DCF")
b34fe66ea893 ("net/iavf: delay VF reset command")

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

Signed-off-by: Bruce Richardson <[email protected]>
  • Loading branch information
bruce-richardson authored and kevintraynor committed Dec 3, 2024
1 parent 923f952 commit ed310d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/common/iavf/iavf_prototype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/common/iavf/version.map
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ INTERNAL {
iavf_set_mac_type;
iavf_shutdown_adminq;
iavf_vf_parse_hw_config;
iavf_vf_reset;

local: *;
};
1 change: 1 addition & 0 deletions drivers/net/iavf/iavf_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2701,6 +2701,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 */
Expand Down

0 comments on commit ed310d7

Please sign in to comment.