DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] net/ice: fix flow redirector issue
  2020-04-22 12:22 [dpdk-dev] [PATCH] net/ice: fix flow redirector issue Beilei Xing
@ 2020-04-22  5:19 ` Wang, Haiyue
  2020-04-22  7:31 ` Ye Xiaolong
  1 sibling, 0 replies; 6+ messages in thread
From: Wang, Haiyue @ 2020-04-22  5:19 UTC (permalink / raw)
  To: Xing, Beilei, dev, Zhang, Qi Z

> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Wednesday, April 22, 2020 20:23
> To: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice: fix flow redirector issue
> 
> If there's VF reset, the kernel PF will remove rules
> associated with the reset VF no matter the HW VSI ID
> is changed or not. So DCF should redirector all rules
> associated with the reset VF no matter the HW VSI ID
> is changed or not.
> 
> Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF")
> Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
>  drivers/net/ice/ice_dcf.c        | 2 +-
>  drivers/net/ice/ice_dcf_parent.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
> index 4c30f0e..0cd5d1b 100644
> --- a/drivers/net/ice/ice_dcf.c
> +++ b/drivers/net/ice/ice_dcf.c
> @@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
>  	rte_intr_disable(&pci_dev->intr_handle);
>  	ice_dcf_disable_irq0(hw);
> 
> -	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw))
> +	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
>  		err = -1;
> 
>  	rte_intr_enable(&pci_dev->intr_handle);
> diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
> index d4b4ede..bdfc7d4 100644
> --- a/drivers/net/ice/ice_dcf_parent.c
> +++ b/drivers/net/ice/ice_dcf_parent.c
> @@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,
>  			VIRTCHNL_DCF_VF_VSI_ID_S;
> 
>  		/* Redirect rules if vsi mapping table changes. */
> -		if (!first_update && vsi_ctx->vsi_num != new_vsi_num) {
> +		if (!first_update) {
>  			struct ice_flow_redirect rd;
> 
>  			memset(&rd, 0, sizeof(struct ice_flow_redirect));
> --
> 2.7.4

Acked-by: Haiyue Wang <haiyue.wang@intel.com>

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

* Re: [dpdk-dev] [PATCH] net/ice: fix flow redirector issue
  2020-04-22 12:22 [dpdk-dev] [PATCH] net/ice: fix flow redirector issue Beilei Xing
  2020-04-22  5:19 ` Wang, Haiyue
@ 2020-04-22  7:31 ` Ye Xiaolong
  2020-04-22  8:40   ` Kevin Traynor
  1 sibling, 1 reply; 6+ messages in thread
From: Ye Xiaolong @ 2020-04-22  7:31 UTC (permalink / raw)
  To: Beilei Xing; +Cc: dev, haiyue.wang, qi.z.zhang

On 04/22, Beilei Xing wrote:
>If there's VF reset, the kernel PF will remove rules
>associated with the reset VF no matter the HW VSI ID
>is changed or not. So DCF should redirector all rules
>associated with the reset VF no matter the HW VSI ID
>is changed or not.
>
>Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF")
>Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI")
>
>Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>---
> drivers/net/ice/ice_dcf.c        | 2 +-
> drivers/net/ice/ice_dcf_parent.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
>index 4c30f0e..0cd5d1b 100644
>--- a/drivers/net/ice/ice_dcf.c
>+++ b/drivers/net/ice/ice_dcf.c
>@@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
> 	rte_intr_disable(&pci_dev->intr_handle);
> 	ice_dcf_disable_irq0(hw);
> 
>-	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw))
>+	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
> 		err = -1;
> 
> 	rte_intr_enable(&pci_dev->intr_handle);
>diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
>index d4b4ede..bdfc7d4 100644
>--- a/drivers/net/ice/ice_dcf_parent.c
>+++ b/drivers/net/ice/ice_dcf_parent.c
>@@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,
> 			VIRTCHNL_DCF_VF_VSI_ID_S;
> 
> 		/* Redirect rules if vsi mapping table changes. */
>-		if (!first_update && vsi_ctx->vsi_num != new_vsi_num) {
>+		if (!first_update) {
> 			struct ice_flow_redirect rd;
> 
> 			memset(&rd, 0, sizeof(struct ice_flow_redirect));
>-- 
>2.7.4
>

Applied to dpdk-next-net-intel, Thanks.

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

* Re: [dpdk-dev] [PATCH] net/ice: fix flow redirector issue
  2020-04-22  7:31 ` Ye Xiaolong
@ 2020-04-22  8:40   ` Kevin Traynor
  2020-04-22  9:35     ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Traynor @ 2020-04-22  8:40 UTC (permalink / raw)
  To: Ye Xiaolong, Beilei Xing; +Cc: dev, haiyue.wang, qi.z.zhang

On 22/04/2020 08:31, Ye Xiaolong wrote:
> On 04/22, Beilei Xing wrote:
>> If there's VF reset, the kernel PF will remove rules
>> associated with the reset VF no matter the HW VSI ID
>> is changed or not. So DCF should redirector all rules
>> associated with the reset VF no matter the HW VSI ID
>> is changed or not.
>>
>> Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF")
>> Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI")
>>

I think these commit-id's will need some fix up before reaching master

>> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>> ---
>> drivers/net/ice/ice_dcf.c        | 2 +-
>> drivers/net/ice/ice_dcf_parent.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
>> index 4c30f0e..0cd5d1b 100644
>> --- a/drivers/net/ice/ice_dcf.c
>> +++ b/drivers/net/ice/ice_dcf.c
>> @@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
>> 	rte_intr_disable(&pci_dev->intr_handle);
>> 	ice_dcf_disable_irq0(hw);
>>
>> -	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw))
>> +	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
>> 		err = -1;
>>
>> 	rte_intr_enable(&pci_dev->intr_handle);
>> diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
>> index d4b4ede..bdfc7d4 100644
>> --- a/drivers/net/ice/ice_dcf_parent.c
>> +++ b/drivers/net/ice/ice_dcf_parent.c
>> @@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,
>> 			VIRTCHNL_DCF_VF_VSI_ID_S;
>>
>> 		/* Redirect rules if vsi mapping table changes. */
>> -		if (!first_update && vsi_ctx->vsi_num != new_vsi_num) {
>> +		if (!first_update) {
>> 			struct ice_flow_redirect rd;
>>
>> 			memset(&rd, 0, sizeof(struct ice_flow_redirect));
>> -- 
>> 2.7.4
>>
> 
> Applied to dpdk-next-net-intel, Thanks.
> 


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

* Re: [dpdk-dev] [PATCH] net/ice: fix flow redirector issue
  2020-04-22  8:40   ` Kevin Traynor
@ 2020-04-22  9:35     ` Ferruh Yigit
  2020-04-22  9:59       ` Kevin Traynor
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2020-04-22  9:35 UTC (permalink / raw)
  To: Kevin Traynor, Ye Xiaolong, Beilei Xing; +Cc: dev, haiyue.wang, qi.z.zhang

On 4/22/2020 9:40 AM, Kevin Traynor wrote:
> On 22/04/2020 08:31, Ye Xiaolong wrote:
>> On 04/22, Beilei Xing wrote:
>>> If there's VF reset, the kernel PF will remove rules
>>> associated with the reset VF no matter the HW VSI ID
>>> is changed or not. So DCF should redirector all rules
>>> associated with the reset VF no matter the HW VSI ID
>>> is changed or not.
>>>
>>> Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF")
>>> Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI")
>>>
> 
> I think these commit-id's will need some fix up before reaching master

We are aware of it, but these fixes are in the next-net and next-net keeps
rebasing on the main repo, so commit ids keeps changes there. These should be
fixed while next-net merged to main repo.
I tend to squash fixes in this case whenever reasonable, but not always.
Frequently pulling from next-net to main solves this issue too.

> 
>>> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>>> ---
>>> drivers/net/ice/ice_dcf.c        | 2 +-
>>> drivers/net/ice/ice_dcf_parent.c | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
>>> index 4c30f0e..0cd5d1b 100644
>>> --- a/drivers/net/ice/ice_dcf.c
>>> +++ b/drivers/net/ice/ice_dcf.c
>>> @@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
>>> 	rte_intr_disable(&pci_dev->intr_handle);
>>> 	ice_dcf_disable_irq0(hw);
>>>
>>> -	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw))
>>> +	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
>>> 		err = -1;
>>>
>>> 	rte_intr_enable(&pci_dev->intr_handle);
>>> diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
>>> index d4b4ede..bdfc7d4 100644
>>> --- a/drivers/net/ice/ice_dcf_parent.c
>>> +++ b/drivers/net/ice/ice_dcf_parent.c
>>> @@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,
>>> 			VIRTCHNL_DCF_VF_VSI_ID_S;
>>>
>>> 		/* Redirect rules if vsi mapping table changes. */
>>> -		if (!first_update && vsi_ctx->vsi_num != new_vsi_num) {
>>> +		if (!first_update) {
>>> 			struct ice_flow_redirect rd;
>>>
>>> 			memset(&rd, 0, sizeof(struct ice_flow_redirect));
>>> -- 
>>> 2.7.4
>>>
>>
>> Applied to dpdk-next-net-intel, Thanks.
>>
> 


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

* Re: [dpdk-dev] [PATCH] net/ice: fix flow redirector issue
  2020-04-22  9:35     ` Ferruh Yigit
@ 2020-04-22  9:59       ` Kevin Traynor
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Traynor @ 2020-04-22  9:59 UTC (permalink / raw)
  To: Ferruh Yigit, Ye Xiaolong, Beilei Xing; +Cc: dev, haiyue.wang, qi.z.zhang

On 22/04/2020 10:35, Ferruh Yigit wrote:
> On 4/22/2020 9:40 AM, Kevin Traynor wrote:
>> On 22/04/2020 08:31, Ye Xiaolong wrote:
>>> On 04/22, Beilei Xing wrote:
>>>> If there's VF reset, the kernel PF will remove rules
>>>> associated with the reset VF no matter the HW VSI ID
>>>> is changed or not. So DCF should redirector all rules
>>>> associated with the reset VF no matter the HW VSI ID
>>>> is changed or not.
>>>>
>>>> Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF")
>>>> Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI")
>>>>
>>
>> I think these commit-id's will need some fix up before reaching master
> 
> We are aware of it, but these fixes are in the next-net and next-net keeps
> rebasing on the main repo, so commit ids keeps changes there. These should be
> fixed while next-net merged to main repo.
> I tend to squash fixes in this case whenever reasonable, but not always.
> Frequently pulling from next-net to main solves this issue too.
> 

Thanks Ferruh - I know you do a good job on this. Was just flagging as I
noticed while checking if it needed a stable tag (it doesn't).

>>
>>>> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>>>> ---
>>>> drivers/net/ice/ice_dcf.c        | 2 +-
>>>> drivers/net/ice/ice_dcf_parent.c | 2 +-
>>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
>>>> index 4c30f0e..0cd5d1b 100644
>>>> --- a/drivers/net/ice/ice_dcf.c
>>>> +++ b/drivers/net/ice/ice_dcf.c
>>>> @@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
>>>> 	rte_intr_disable(&pci_dev->intr_handle);
>>>> 	ice_dcf_disable_irq0(hw);
>>>>
>>>> -	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw))
>>>> +	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
>>>> 		err = -1;
>>>>
>>>> 	rte_intr_enable(&pci_dev->intr_handle);
>>>> diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
>>>> index d4b4ede..bdfc7d4 100644
>>>> --- a/drivers/net/ice/ice_dcf_parent.c
>>>> +++ b/drivers/net/ice/ice_dcf_parent.c
>>>> @@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,
>>>> 			VIRTCHNL_DCF_VF_VSI_ID_S;
>>>>
>>>> 		/* Redirect rules if vsi mapping table changes. */
>>>> -		if (!first_update && vsi_ctx->vsi_num != new_vsi_num) {
>>>> +		if (!first_update) {
>>>> 			struct ice_flow_redirect rd;
>>>>
>>>> 			memset(&rd, 0, sizeof(struct ice_flow_redirect));
>>>> -- 
>>>> 2.7.4
>>>>
>>>
>>> Applied to dpdk-next-net-intel, Thanks.
>>>
>>
> 


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

* [dpdk-dev] [PATCH] net/ice: fix flow redirector issue
@ 2020-04-22 12:22 Beilei Xing
  2020-04-22  5:19 ` Wang, Haiyue
  2020-04-22  7:31 ` Ye Xiaolong
  0 siblings, 2 replies; 6+ messages in thread
From: Beilei Xing @ 2020-04-22 12:22 UTC (permalink / raw)
  To: dev, haiyue.wang, qi.z.zhang

If there's VF reset, the kernel PF will remove rules
associated with the reset VF no matter the HW VSI ID
is changed or not. So DCF should redirector all rules
associated with the reset VF no matter the HW VSI ID
is changed or not.

Fixes: f10cde8e8478 ("net/ice: get VF hardware index in DCF")
Fixes: dc0f06849e50 ("net/ice: redirect switch rule to new VSI")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/ice/ice_dcf.c        | 2 +-
 drivers/net/ice/ice_dcf_parent.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 4c30f0e..0cd5d1b 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -536,7 +536,7 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
 	rte_intr_disable(&pci_dev->intr_handle);
 	ice_dcf_disable_irq0(hw);
 
-	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw))
+	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
 		err = -1;
 
 	rte_intr_enable(&pci_dev->intr_handle);
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index d4b4ede..bdfc7d4 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -45,7 +45,7 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,
 			VIRTCHNL_DCF_VF_VSI_ID_S;
 
 		/* Redirect rules if vsi mapping table changes. */
-		if (!first_update && vsi_ctx->vsi_num != new_vsi_num) {
+		if (!first_update) {
 			struct ice_flow_redirect rd;
 
 			memset(&rd, 0, sizeof(struct ice_flow_redirect));
-- 
2.7.4


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

end of thread, other threads:[~2020-04-22  9:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 12:22 [dpdk-dev] [PATCH] net/ice: fix flow redirector issue Beilei Xing
2020-04-22  5:19 ` Wang, Haiyue
2020-04-22  7:31 ` Ye Xiaolong
2020-04-22  8:40   ` Kevin Traynor
2020-04-22  9:35     ` Ferruh Yigit
2020-04-22  9:59       ` 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).