diff mbox series

[jkirsher/next-queue] i40e: Fix reporting incorrect error codes

Message ID 151096175699.30716.6788678147370883532.stgit@anamdev.jf.intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show
Series [jkirsher/next-queue] i40e: Fix reporting incorrect error codes | expand

Commit Message

Nambiar, Amritha Nov. 17, 2017, 11:35 p.m. UTC
Adding cloud filters could fail for a number of reasons,
unsupported filter fields for example, which fails during
validation of fields itself. This will not result in admin
command errors and converting the admin queue status to posix
error code using i40e_aq_rc_to_posix would result in incorrect
error values. If the failure was due to AQ error itself,
reporting that correclty is handled in the inner function.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Shannon Nelson Nov. 19, 2017, 8:08 p.m. UTC | #1
On 11/17/2017 3:35 PM, Amritha Nambiar wrote:
> Adding cloud filters could fail for a number of reasons,
> unsupported filter fields for example, which fails during
> validation of fields itself. This will not result in admin
> command errors and converting the admin queue status to posix
> error code using i40e_aq_rc_to_posix would result in incorrect
> error values. If the failure was due to AQ error itself,
> reporting that correclty is handled in the inner function.

Let's spell correctly correctly, shall we? :-)
sln

> 
> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_main.c |    1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 4d0f81d..565ce12 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -7470,7 +7470,6 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
>   		dev_err(&pf->pdev->dev,
>   			"Failed to add cloud filter, err %s\n",
>   			i40e_stat_str(&pf->hw, err));
> -		err = i40e_aq_rc_to_posix(err, pf->hw.aq.asq_last_status);
>   		goto err;
>   	}
>   
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
>
Bowers, AndrewX Nov. 27, 2017, 10:46 p.m. UTC | #2
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Amritha Nambiar
> Sent: Friday, November 17, 2017 3:36 PM
> To: intel-wired-lan@lists.osuosl.org; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>
> Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH] i40e: Fix reporting
> incorrect error codes
> 
> Adding cloud filters could fail for a number of reasons, unsupported filter
> fields for example, which fails during validation of fields itself. This will not
> result in admin command errors and converting the admin queue status to
> posix error code using i40e_aq_rc_to_posix would result in incorrect error
> values. If the failure was due to AQ error itself, reporting that correclty is
> handled in the inner function.
> 
> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c |    1 -
>  1 file changed, 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.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 4d0f81d..565ce12 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7470,7 +7470,6 @@  static int i40e_configure_clsflower(struct i40e_vsi *vsi,
 		dev_err(&pf->pdev->dev,
 			"Failed to add cloud filter, err %s\n",
 			i40e_stat_str(&pf->hw, err));
-		err = i40e_aq_rc_to_posix(err, pf->hw.aq.asq_last_status);
 		goto err;
 	}