2023-10-20 02:43:55

by Su Hui

[permalink] [raw]
Subject: [PATCH v2] i40e: add an error code check in i40e_vsi_setup

check the value of 'ret' after calling 'i40e_vsi_config_rss'.

Signed-off-by: Su Hui <[email protected]>
---
v2:
- call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
pointing out this).
drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index de7fd43dc11c..4904bc8f5777 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -14567,9 +14567,13 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
if ((pf->hw_features & I40E_HW_RSS_AQ_CAPABLE) &&
(vsi->type == I40E_VSI_VMDQ2)) {
ret = i40e_vsi_config_rss(vsi);
+ if (ret)
+ goto err_config;
}
return vsi;

+err_config:
+ i40e_vsi_clear_rings(vsi);
err_rings:
i40e_vsi_free_q_vectors(vsi);
err_msix:
--
2.30.2


2023-10-20 06:56:27

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v2] i40e: add an error code check in i40e_vsi_setup

On Fri, Oct 20, 2023 at 10:43:09AM +0800, Su Hui wrote:
> check the value of 'ret' after calling 'i40e_vsi_config_rss'.
>
> Signed-off-by: Su Hui <[email protected]>
> ---
> v2:
> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
> pointing out this).

Looks okay now.

Reviewed-by: Dan Carpenter <[email protected]>

regards,
dan carpenter

2023-10-20 21:09:56

by Jacob Keller

[permalink] [raw]
Subject: Re: [PATCH v2] i40e: add an error code check in i40e_vsi_setup



On 10/19/2023 11:56 PM, Dan Carpenter wrote:
> On Fri, Oct 20, 2023 at 10:43:09AM +0800, Su Hui wrote:
>> check the value of 'ret' after calling 'i40e_vsi_config_rss'.
>>
>> Signed-off-by: Su Hui <[email protected]>
>> ---
>> v2:
>> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
>> pointing out this).
>
> Looks okay now.
>
> Reviewed-by: Dan Carpenter <[email protected]>
>
> regards,
> dan carpenter
>
>

For some reason this patch doesn't appear to have hit the
intel-wired-lan list and is thus not being recorded in patchwork for IWL.

Su Hui, would you mind please re-sending this so that it gets picked up
by patchwork? Otherwise I'm afraid that it might get lost inbetween when
Tony returns from vacation.

Thanks,
Jake

2023-10-23 01:27:11

by Su Hui

[permalink] [raw]
Subject: Re: [PATCH v2] i40e: add an error code check in i40e_vsi_setup

On 2023/10/21 05:09, Jacob Keller wrote:

>
> On 10/19/2023 11:56 PM, Dan Carpenter wrote:
>> On Fri, Oct 20, 2023 at 10:43:09AM +0800, Su Hui wrote:
>>> check the value of 'ret' after calling 'i40e_vsi_config_rss'.
>>>
>>> Signed-off-by: Su Hui <[email protected]>
>>> ---
>>> v2:
>>> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
>>> pointing out this).
>> Looks okay now.
>>
>> Reviewed-by: Dan Carpenter <[email protected]>
>>
>> regards,
>> dan carpenter
>>
>>
> For some reason this patch doesn't appear to have hit the
> intel-wired-lan list and is thus not being recorded in patchwork for IWL.
>
> Su Hui, would you mind please re-sending this so that it gets picked up
> by patchwork? Otherwise I'm afraid that it might get lost inbetween when
> Tony returns from vacation.

Sorry for the late reply, I have already resent it[1].

Su Hui

[1] https://lore.kernel.org/all/[email protected]/