[dpdk-dev] net/i40e: fix VF cannot forward packets issue

Message ID 1510209014-184925-1-git-send-email-xiaoyun.li@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Li, Xiaoyun Nov. 9, 2017, 6:30 a.m. UTC
  When Rx interrupt is not enabled, there is no need to check if interrupt
allow others. It will cause VF cannot forwarding packets issue. This patch
fixes this issue.

Fixes: 96a9fd03c25f ("net/i40e: fix Rx queue interrupt mapping in VF")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Xing, Beilei Nov. 9, 2017, 8:33 a.m. UTC | #1
> -----Original Message-----
> From: Li, Xiaoyun
> Sent: Thursday, November 9, 2017 2:30 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/i40e: fix VF cannot forward packets issue
> 
> When Rx interrupt is not enabled, there is no need to check if interrupt allow
> others. It will cause VF cannot forwarding packets issue. This patch fixes this
> issue.
> 
> Fixes: 96a9fd03c25f ("net/i40e: fix Rx queue interrupt mapping in VF")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 02d9e57..91b5bb0 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -650,7 +650,8 @@ i40evf_config_irq_map(struct rte_eth_dev *dev)
>  	uint32_t vector_id;
>  	int i, err;
> 
> -	if (rte_intr_allow_others(intr_handle))
> +	if (dev->data->dev_conf.intr_conf.rxq != 0 &&
> +	    rte_intr_allow_others(intr_handle))
>  		vector_id = I40E_RX_VEC_START;
>  	else
>  		vector_id = I40E_MISC_VEC_ID;
> --
> 2.7.4

Acked-by: Beilei Xing <beilei.xing@intel.com>
  
Ferruh Yigit Nov. 10, 2017, 2:15 a.m. UTC | #2
On 11/9/2017 12:33 AM, Xing, Beilei wrote:
>> -----Original Message-----
>> From: Li, Xiaoyun
>> Sent: Thursday, November 9, 2017 2:30 PM
>> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
>> Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>; stable@dpdk.org
>> Subject: [PATCH] net/i40e: fix VF cannot forward packets issue
>>
>> When Rx interrupt is not enabled, there is no need to check if interrupt allow
>> others. It will cause VF cannot forwarding packets issue. This patch fixes this
>> issue.
>>
>> Fixes: 96a9fd03c25f ("net/i40e: fix Rx queue interrupt mapping in VF")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>

> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 02d9e57..91b5bb0 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -650,7 +650,8 @@  i40evf_config_irq_map(struct rte_eth_dev *dev)
 	uint32_t vector_id;
 	int i, err;
 
-	if (rte_intr_allow_others(intr_handle))
+	if (dev->data->dev_conf.intr_conf.rxq != 0 &&
+	    rte_intr_allow_others(intr_handle))
 		vector_id = I40E_RX_VEC_START;
 	else
 		vector_id = I40E_MISC_VEC_ID;