diff mbox series

[v2] i40e: add an error code check in i40e_vsi_setup

Message ID 20231020024308.46630-1-suhui@nfschina.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [v2] i40e: add an error code check in i40e_vsi_setup | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1363 this patch: 1363
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 1388 this patch: 1388
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1388 this patch: 1388
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Su Hui Oct. 20, 2023, 2:43 a.m. UTC
check the value of 'ret' after calling 'i40e_vsi_config_rss'.

Signed-off-by: Su Hui <suhui@nfschina.com>
---
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(+)

Comments

Dan Carpenter Oct. 20, 2023, 6:56 a.m. UTC | #1
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 <suhui@nfschina.com>
> ---
> v2: 
> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
>   pointing out this).

Looks okay now.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter
Jacob Keller Oct. 20, 2023, 9:09 p.m. UTC | #2
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 <suhui@nfschina.com>
>> ---
>> v2: 
>> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
>>   pointing out this).
> 
> Looks okay now.
> 
> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
> 
> 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
Su Hui Oct. 23, 2023, 1:26 a.m. UTC | #3
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 <suhui@nfschina.com>
>>> ---
>>> v2:
>>> - call i40e_vsi_clear_rings() to free rings(thank dan carpenter for
>>>    pointing out this).
>> Looks okay now.
>>
>> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
>>
>> 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/20231023012024.18757-1-suhui@nfschina.com/
diff mbox series

Patch

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: