Patchwork [4/7] bnx2x: simplify TPA sanity check

login
register
mail settings
Submitter Michal Schmidt
Date Aug. 30, 2011, 2:30 p.m.
Message ID <1314714646-3642-5-git-send-email-mschmidt@redhat.com>
Download mbox | patch
Permalink /patch/112335/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Michal Schmidt - Aug. 30, 2011, 2:30 p.m.
In the TPA branch we already know the CQE type is either START or STOP.
No need to test for that. Even if the type were to differ, we wouldn't
want to suppress the error message.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Vladislav Zolotarov - Aug. 31, 2011, 10:22 a.m.
On Tuesday 30 August 2011 17:30:43 Michal Schmidt wrote:
> In the TPA branch we already know the CQE type is either START or STOP.
> No need to test for that. Even if the type were to differ, we wouldn't
> want to suppress the error message.
> 
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index f1fea58..fe5be0c
> 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> @@ -634,9 +634,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
>  		if (!CQE_TYPE_FAST(cqe_fp_type)) {
>  #ifdef BNX2X_STOP_ON_ERROR
>  			/* sanity check */
> -			if (fp->disable_tpa &&
> -			    (CQE_TYPE_START(cqe_fp_type) ||
> -			     CQE_TYPE_STOP(cqe_fp_type)))
> +			if (fp->disable_tpa)
>  				BNX2X_ERR("START/STOP packet while "
>  					  "disable_tpa type %x\n",
>  					  CQE_TYPE(cqe_fp_type));

Acked-by: Vladislav Zolotarov <vladz@broadcom.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index f1fea58..fe5be0c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -634,9 +634,7 @@  int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 		if (!CQE_TYPE_FAST(cqe_fp_type)) {
 #ifdef BNX2X_STOP_ON_ERROR
 			/* sanity check */
-			if (fp->disable_tpa &&
-			    (CQE_TYPE_START(cqe_fp_type) ||
-			     CQE_TYPE_STOP(cqe_fp_type)))
+			if (fp->disable_tpa)
 				BNX2X_ERR("START/STOP packet while "
 					  "disable_tpa type %x\n",
 					  CQE_TYPE(cqe_fp_type));