[v2,12/12] net/bnxt: remove excess log messages

Message ID 20180922045559.27438-13-ajit.khaparde@broadcom.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series bnxt patchset |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde Sept. 22, 2018, 4:55 a.m. UTC
  When the firmware version and the driver HWRM version do not match,
we are logging some messages. These messages unnecessarily clutter
the logs and can add to the noise. We are logging the HWRM version
and the firmware version anyway. The difference in version numbers
can be gleaned from that. Removing the remaining log messages.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 20 --------------------
 1 file changed, 20 deletions(-)
  

Comments

Ferruh Yigit Sept. 25, 2018, 11:35 a.m. UTC | #1
On 9/22/2018 5:55 AM, Ajit Khaparde wrote:
> When the firmware version and the driver HWRM version do not match,
> we are logging some messages. These messages unnecessarily clutter
> the logs and can add to the noise. We are logging the HWRM version
> and the firmware version anyway. The difference in version numbers
> can be gleaned from that. Removing the remaining log messages.

If these messages are creating noise, wouldn't you want this patch to be
backported to stable tree? If so can you please update commit log?

> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_hwrm.c | 20 --------------------
>  1 file changed, 20 deletions(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index 38698e214..76e443ec1 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -789,7 +789,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
>  	int rc = 0;
>  	struct hwrm_ver_get_input req = {.req_type = 0 };
>  	struct hwrm_ver_get_output *resp = bp->hwrm_cmd_resp_addr;
> -	uint32_t my_version;
>  	uint32_t fw_version;
>  	uint16_t max_resp_len;
>  	char type[RTE_MEMZONE_NAMESIZE];
> @@ -817,10 +816,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
>  	PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n",
>  		HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE);
>  
> -	my_version = HWRM_VERSION_MAJOR << 16;
> -	my_version |= HWRM_VERSION_MINOR << 8;
> -	my_version |= HWRM_VERSION_UPDATE;
> -
>  	fw_version = resp->hwrm_intf_maj_8b << 16;
>  	fw_version |= resp->hwrm_intf_min_8b << 8;
>  	fw_version |= resp->hwrm_intf_upd_8b;
> @@ -832,21 +827,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
>  		goto error;
>  	}
>  
> -	if (my_version != fw_version) {
> -		PMD_DRV_LOG(INFO, "BNXT Driver/HWRM API mismatch.\n");
> -		if (my_version < fw_version) {
> -			PMD_DRV_LOG(INFO,
> -				"Firmware API version is newer than driver.\n");
> -			PMD_DRV_LOG(INFO,
> -				"The driver may be missing features.\n");
> -		} else {
> -			PMD_DRV_LOG(INFO,
> -				"Firmware API version is older than driver.\n");
> -			PMD_DRV_LOG(INFO,
> -				"Not all driver features may be functional.\n");
> -		}
> -	}
> -
>  	if (bp->max_req_len > resp->max_req_win_len) {
>  		PMD_DRV_LOG(ERR, "Unsupported request length\n");
>  		rc = -EINVAL;
>
  

Patch

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 38698e214..76e443ec1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -789,7 +789,6 @@  int bnxt_hwrm_ver_get(struct bnxt *bp)
 	int rc = 0;
 	struct hwrm_ver_get_input req = {.req_type = 0 };
 	struct hwrm_ver_get_output *resp = bp->hwrm_cmd_resp_addr;
-	uint32_t my_version;
 	uint32_t fw_version;
 	uint16_t max_resp_len;
 	char type[RTE_MEMZONE_NAMESIZE];
@@ -817,10 +816,6 @@  int bnxt_hwrm_ver_get(struct bnxt *bp)
 	PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n",
 		HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE);
 
-	my_version = HWRM_VERSION_MAJOR << 16;
-	my_version |= HWRM_VERSION_MINOR << 8;
-	my_version |= HWRM_VERSION_UPDATE;
-
 	fw_version = resp->hwrm_intf_maj_8b << 16;
 	fw_version |= resp->hwrm_intf_min_8b << 8;
 	fw_version |= resp->hwrm_intf_upd_8b;
@@ -832,21 +827,6 @@  int bnxt_hwrm_ver_get(struct bnxt *bp)
 		goto error;
 	}
 
-	if (my_version != fw_version) {
-		PMD_DRV_LOG(INFO, "BNXT Driver/HWRM API mismatch.\n");
-		if (my_version < fw_version) {
-			PMD_DRV_LOG(INFO,
-				"Firmware API version is newer than driver.\n");
-			PMD_DRV_LOG(INFO,
-				"The driver may be missing features.\n");
-		} else {
-			PMD_DRV_LOG(INFO,
-				"Firmware API version is older than driver.\n");
-			PMD_DRV_LOG(INFO,
-				"Not all driver features may be functional.\n");
-		}
-	}
-
 	if (bp->max_req_len > resp->max_req_win_len) {
 		PMD_DRV_LOG(ERR, "Unsupported request length\n");
 		rc = -EINVAL;