net/i40e: fix request queue fail in VF

Message ID 20190718145351.13987-1-taox.zhu@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Qi Zhang
Headers
Series net/i40e: fix request queue fail in VF |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Zhu, TaoX July 18, 2019, 2:53 p.m. UTC
  From: Zhu Tao <taox.zhu@intel.com>

When the VF configuration is larger than the number of queues reserved
by PF, VF sends the request queue command through admin queue. When PF
received this command, it may reset the VF and send a notification
before resetting. If this notification is read by the timed task alarm,
Task request queue will lost notification. This patch Mark vf_reset,
pend_msg flag just as task request queue has received notification in
task alarm.

Signed-off-by: Zhu Tao <taox.zhu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Zhu, TaoX July 18, 2019, 7:05 a.m. UTC | #1
Hi, Xiaolong
	I'm sorry, this is my first time submitting a patch.
	Attachment picture is my patch content and I try to generate fixes with git fixline. But I modified the code location to 'Not Committed Yet'. Should I use nearby id cebe3d7b3d?
	
Thanks,
Zhutao	
	


-----Original Message-----
From: Ye, Xiaolong 
Sent: Thursday, July 18, 2019 9:09 PM
To: Zhu, TaoX <taox.zhu@intel.com>
Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix request queue fail in VF

On 07/18, taox.zhu@intel.com wrote:
>From: Zhu Tao <taox.zhu@intel.com>
>
>When the VF configuration is larger than the number of queues reserved 
>by PF, VF sends the request queue command through admin queue. When PF 
>received this command, it may reset the VF and send a notification 
>before resetting. If this notification is read by the timed task alarm, 
>Task request queue will lost notification. This patch Mark vf_reset, 
>pend_msg flag just as task request queue has received notification in 
>task alarm.

Please add fixes tag and cc stable.


Thanks,
Xiaolong

>
>Signed-off-by: Zhu Tao <taox.zhu@intel.com>
>---
> drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/net/i40e/i40e_ethdev_vf.c 
>b/drivers/net/i40e/i40e_ethdev_vf.c
>index 5be32b069..86dfda1c0 100644
>--- a/drivers/net/i40e/i40e_ethdev_vf.c
>+++ b/drivers/net/i40e/i40e_ethdev_vf.c
>@@ -1332,6 +1332,10 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
> 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
> 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
> 					      NULL);
>+		if (vf->vf_reset == false) {
>+			vf->vf_reset = true;
>+			vf->pend_msg |= PFMSG_RESET_IMPENDING;
>+		}
> 		break;
> 	case VIRTCHNL_EVENT_LINK_CHANGE:
> 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
>--
>2.17.1
>
  
Xiaolong Ye July 18, 2019, 1:09 p.m. UTC | #2
On 07/18, taox.zhu@intel.com wrote:
>From: Zhu Tao <taox.zhu@intel.com>
>
>When the VF configuration is larger than the number of queues reserved
>by PF, VF sends the request queue command through admin queue. When PF
>received this command, it may reset the VF and send a notification
>before resetting. If this notification is read by the timed task alarm,
>Task request queue will lost notification. This patch Mark vf_reset,
>pend_msg flag just as task request queue has received notification in
>task alarm.

Please add fixes tag and cc stable.


Thanks,
Xiaolong

>
>Signed-off-by: Zhu Tao <taox.zhu@intel.com>
>---
> drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
>index 5be32b069..86dfda1c0 100644
>--- a/drivers/net/i40e/i40e_ethdev_vf.c
>+++ b/drivers/net/i40e/i40e_ethdev_vf.c
>@@ -1332,6 +1332,10 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
> 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
> 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
> 					      NULL);
>+		if (vf->vf_reset == false) {
>+			vf->vf_reset = true;
>+			vf->pend_msg |= PFMSG_RESET_IMPENDING;
>+		}
> 		break;
> 	case VIRTCHNL_EVENT_LINK_CHANGE:
> 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
>-- 
>2.17.1
>
  
Xiaolong Ye July 18, 2019, 2:05 p.m. UTC | #3
On 07/18, Zhu, TaoX wrote:
>Hi, Xiaolong
>	I'm sorry, this is my first time submitting a patch.
>	Attachment picture is my patch content and I try to generate fixes with git fixline. But I modified the code location to 'Not Committed Yet'. Should I use nearby id cebe3d7b3d?
>	

Nope, the commit in the fixline should be the one that introduced the issue this
patch tries to solve.

Thanks,
Xiaolong

>Thanks,
>Zhutao	
>	
>
>
>-----Original Message-----
>From: Ye, Xiaolong 
>Sent: Thursday, July 18, 2019 9:09 PM
>To: Zhu, TaoX <taox.zhu@intel.com>
>Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix request queue fail in VF
>
>On 07/18, taox.zhu@intel.com wrote:
>>From: Zhu Tao <taox.zhu@intel.com>
>>
>>When the VF configuration is larger than the number of queues reserved 
>>by PF, VF sends the request queue command through admin queue. When PF 
>>received this command, it may reset the VF and send a notification 
>>before resetting. If this notification is read by the timed task alarm, 
>>Task request queue will lost notification. This patch Mark vf_reset, 
>>pend_msg flag just as task request queue has received notification in 
>>task alarm.
>
>Please add fixes tag and cc stable.
>
>
>Thanks,
>Xiaolong
>
>>
>>Signed-off-by: Zhu Tao <taox.zhu@intel.com>
>>---
>> drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>>diff --git a/drivers/net/i40e/i40e_ethdev_vf.c 
>>b/drivers/net/i40e/i40e_ethdev_vf.c
>>index 5be32b069..86dfda1c0 100644
>>--- a/drivers/net/i40e/i40e_ethdev_vf.c
>>+++ b/drivers/net/i40e/i40e_ethdev_vf.c
>>@@ -1332,6 +1332,10 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
>> 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
>> 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
>> 					      NULL);
>>+		if (vf->vf_reset == false) {
>>+			vf->vf_reset = true;
>>+			vf->pend_msg |= PFMSG_RESET_IMPENDING;
>>+		}
>> 		break;
>> 	case VIRTCHNL_EVENT_LINK_CHANGE:
>> 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
>>--
>>2.17.1
>>
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 5be32b069..86dfda1c0 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1332,6 +1332,10 @@  i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
+		if (vf->vf_reset == false) {
+			vf->vf_reset = true;
+			vf->pend_msg |= PFMSG_RESET_IMPENDING;
+		}
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");