[dpdk-stable] patch 'net/iavf: fix flow flush after PF reset' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:44:49 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From fe90482c72b4805a1afbb0768fa7e0a0536347d6 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo at intel.com>
Date: Wed, 30 Sep 2020 13:44:12 +0800
Subject: [PATCH] net/iavf: fix flow flush after PF reset

[ upstream commit c02ea7410e5124ad44ad7419ab16a43e1b3af647 ]

When VF begin reset after PF reset, VF will be uninitialized at first
and then be initialized, during the time any invalid cmd such as flow
flush should not be sent to PF until the uninitialization is finished.

Fixes: 1eab95fe2e36 ("net/iavf: fix command after PF reset")

Signed-off-by: Jeff Guo <jia.guo at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 4 ++--
 drivers/net/iavf/iavf_vchnl.c  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index ab3c4bab5f..3315dce8c8 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1247,8 +1247,6 @@ iavf_init_vf(struct rte_eth_dev *dev)
 		}
 	}
 
-	vf->vf_reset = false;
-
 	return 0;
 err_rss:
 	rte_free(vf->rss_key);
@@ -1424,6 +1422,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev)
 		vf->rss_key = NULL;
 	}
 
+	vf->vf_reset = false;
+
 	return 0;
 }
 
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 3e0454593a..8b7339f8a8 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -73,12 +73,12 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 	int err = 0;
 	int i = 0;
 
-	if (_atomic_set_cmd(vf, args->ops))
-		return -1;
-
 	if (vf->vf_reset)
 		return -EIO;
 
+	if (_atomic_set_cmd(vf, args->ops))
+		return -1;
+
 	ret = iavf_aq_send_msg_to_pf(hw, args->ops, IAVF_SUCCESS,
 				    args->in_args, args->in_args_size, NULL);
 	if (ret) {
@@ -182,6 +182,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
+		vf->vf_reset = true;
 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
 		break;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.785479753 +0000
+++ 0130-net-iavf-fix-flow-flush-after-PF-reset.patch	2020-10-28 10:35:11.700832909 +0000
@@ -1,28 +1,28 @@
-From c02ea7410e5124ad44ad7419ab16a43e1b3af647 Mon Sep 17 00:00:00 2001
+From fe90482c72b4805a1afbb0768fa7e0a0536347d6 Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo at intel.com>
 Date: Wed, 30 Sep 2020 13:44:12 +0800
 Subject: [PATCH] net/iavf: fix flow flush after PF reset
 
+[ upstream commit c02ea7410e5124ad44ad7419ab16a43e1b3af647 ]
+
 When VF begin reset after PF reset, VF will be uninitialized at first
 and then be initialized, during the time any invalid cmd such as flow
 flush should not be sent to PF until the uninitialization is finished.
 
 Fixes: 1eab95fe2e36 ("net/iavf: fix command after PF reset")
-Cc: stable at dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo at intel.com>
 Acked-by: Qi Zhang <qi.z.zhang at intel.com>
 ---
  drivers/net/iavf/iavf_ethdev.c | 4 ++--
- drivers/net/iavf/iavf_hash.c   | 4 ++++
  drivers/net/iavf/iavf_vchnl.c  | 7 ++++---
- 3 files changed, 10 insertions(+), 5 deletions(-)
+ 2 files changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index a5b1433306..d451762fc0 100644
+index ab3c4bab5f..3315dce8c8 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -1285,8 +1285,6 @@ iavf_init_vf(struct rte_eth_dev *dev)
+@@ -1247,8 +1247,6 @@ iavf_init_vf(struct rte_eth_dev *dev)
  		}
  	}
  
@@ -31,35 +31,17 @@
  	return 0;
  err_rss:
  	rte_free(vf->rss_key);
-@@ -1505,6 +1503,8 @@ iavf_dev_close(struct rte_eth_dev *dev)
- 	rte_free(vf->aq_resp);
- 	vf->aq_resp = NULL;
+@@ -1424,6 +1422,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev)
+ 		vf->rss_key = NULL;
+ 	}
  
 +	vf->vf_reset = false;
 +
  	return 0;
  }
  
-diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
-index 4b7f4a872a..be821b62eb 100644
---- a/drivers/net/iavf/iavf_hash.c
-+++ b/drivers/net/iavf/iavf_hash.c
-@@ -1034,9 +1034,13 @@ iavf_hash_destroy(__rte_unused struct iavf_adapter *ad,
- 		  struct rte_flow *flow,
- 		  __rte_unused struct rte_flow_error *error)
- {
-+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
- 	struct virtchnl_rss_cfg *rss_cfg;
- 	int ret = 0;
- 
-+	if (vf->vf_reset)
-+		return 0;
-+
- 	rss_cfg = (struct virtchnl_rss_cfg *)flow->rule;
- 
- 	ret = iavf_add_del_rss_cfg(ad, rss_cfg, false);
 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index 76f8e38d1e..e369430833 100644
+index 3e0454593a..8b7339f8a8 100644
 --- a/drivers/net/iavf/iavf_vchnl.c
 +++ b/drivers/net/iavf/iavf_vchnl.c
 @@ -73,12 +73,12 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
@@ -78,12 +60,12 @@
  	ret = iavf_aq_send_msg_to_pf(hw, args->ops, IAVF_SUCCESS,
  				    args->in_args, args->in_args_size, NULL);
  	if (ret) {
-@@ -189,6 +189,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
+@@ -182,6 +182,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
  	switch (pf_msg->event) {
  	case VIRTCHNL_EVENT_RESET_IMPENDING:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
 +		vf->vf_reset = true;
- 		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+ 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
  					      NULL);
  		break;
 -- 


More information about the stable mailing list