diff mbox series

[net-next] octeontx2-af: Removed unnecessary debug messages.

Message ID 20230130035556.694814-1-rkannoth@marvell.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] octeontx2-af: Removed unnecessary debug messages. | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 5 maintainers not CCed: jerinj@marvell.com lcherian@marvell.com sbhatta@marvell.com hkelam@marvell.com gakula@marvell.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
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: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 38 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ratheesh Kannoth Jan. 30, 2023, 3:55 a.m. UTC
From: Sunil Goutham <sgoutham@marvell.com>

NPC exact match feature is supported only on one silicon
variant, removed debug messages which print that this
feature is not available on all other silicon variants.

Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
 .../net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Comments

Leon Romanovsky Jan. 30, 2023, 9:55 a.m. UTC | #1
On Mon, Jan 30, 2023 at 09:25:56AM +0530, Ratheesh Kannoth wrote:
> From: Sunil Goutham <sgoutham@marvell.com>
> 
> NPC exact match feature is supported only on one silicon
> variant, removed debug messages which print that this
> feature is not available on all other silicon variants.
> 
> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
> ---
>  .../net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> index f69102d20c90..ad1374a12a40 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> @@ -200,10 +200,8 @@ void npc_config_secret_key(struct rvu *rvu, int blkaddr)
>  	struct rvu_hwinfo *hw = rvu->hw;
>  	u8 intf;
>  
> -	if (!hwcap->npc_hash_extract) {
> -		dev_info(rvu->dev, "HW does not support secret key configuration\n");
> +	if (!hwcap->npc_hash_extract)
>  		return;
> -	}
>  
>  	for (intf = 0; intf < hw->npc_intfs; intf++) {
>  		rvu_write64(rvu, blkaddr, NPC_AF_INTFX_SECRET_KEY0(intf),
> @@ -221,10 +219,8 @@ void npc_program_mkex_hash(struct rvu *rvu, int blkaddr)
>  	struct rvu_hwinfo *hw = rvu->hw;
>  	u8 intf;
>  
> -	if (!hwcap->npc_hash_extract) {
> -		dev_dbg(rvu->dev, "Field hash extract feature is not supported\n");
> +	if (!hwcap->npc_hash_extract)
>  		return;
> -	}
>  
>  	for (intf = 0; intf < hw->npc_intfs; intf++) {
>  		npc_program_mkex_hash_rx(rvu, blkaddr, intf);
> @@ -1854,16 +1850,12 @@ int rvu_npc_exact_init(struct rvu *rvu)
>  	/* Check exact match feature is supported */
>  	npc_const3 = rvu_read64(rvu, blkaddr, NPC_AF_CONST3);
>  	if (!(npc_const3 & BIT_ULL(62))) {
> -		dev_info(rvu->dev, "%s: No support for exact match support\n",
> -			 __func__);
>  		return 0;
>  	}

You should remove () brackets here too.

>  
>  	/* Check if kex profile has enabled EXACT match nibble */
>  	cfg = rvu_read64(rvu, blkaddr, NPC_AF_INTFX_KEX_CFG(NIX_INTF_RX));
>  	if (!(cfg & NPC_EXACT_NIBBLE_HIT)) {
> -		dev_info(rvu->dev, "%s: NPC exact match nibble not enabled in KEX profile\n",
> -			 __func__);
>  		return 0;
>  	}

Same comment.

>  
> -- 
> 2.25.1
>
Ratheesh Kannoth Jan. 31, 2023, 7:11 a.m. UTC | #2
----------------------------------------------------------------------
On Mon, Jan 30, 2023 at 09:25:56AM +0530, Ratheesh Kannoth wrote:
> From: Sunil Goutham <sgoutham@marvell.com>
> 
> NPC exact match feature is supported only on one silicon variant, 
> removed debug messages which print that this feature is not available 
> on all other silicon variants.
> 
> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
> ---
>  .../net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 12 
> ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c 
> b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> index f69102d20c90..ad1374a12a40 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> @@ -200,10 +200,8 @@ void npc_config_secret_key(struct rvu *rvu, int blkaddr)
>  	struct rvu_hwinfo *hw = rvu->hw;
>  	u8 intf;
>  
> -	if (!hwcap->npc_hash_extract) {
> -		dev_info(rvu->dev, "HW does not support secret key configuration\n");
> +	if (!hwcap->npc_hash_extract)
>  		return;
> -	}
>  
>  	for (intf = 0; intf < hw->npc_intfs; intf++) {
>  		rvu_write64(rvu, blkaddr, NPC_AF_INTFX_SECRET_KEY0(intf), @@ 
> -221,10 +219,8 @@ void npc_program_mkex_hash(struct rvu *rvu, int blkaddr)
>  	struct rvu_hwinfo *hw = rvu->hw;
>  	u8 intf;
>  
> -	if (!hwcap->npc_hash_extract) {
> -		dev_dbg(rvu->dev, "Field hash extract feature is not supported\n");
> +	if (!hwcap->npc_hash_extract)
>  		return;
> -	}
>  
>  	for (intf = 0; intf < hw->npc_intfs; intf++) {
>  		npc_program_mkex_hash_rx(rvu, blkaddr, intf); @@ -1854,16 +1850,12 
> @@ int rvu_npc_exact_init(struct rvu *rvu)
>  	/* Check exact match feature is supported */
>  	npc_const3 = rvu_read64(rvu, blkaddr, NPC_AF_CONST3);
>  	if (!(npc_const3 & BIT_ULL(62))) {
> -		dev_info(rvu->dev, "%s: No support for exact match support\n",
> -			 __func__);
>  		return 0;
>  	}

>You should remove () brackets here too.
Ratheesh ->  Sorry , I did not get you. We have more than one statement in this "if" loop. How can we remove brackets ?

>  
>  	/* Check if kex profile has enabled EXACT match nibble */
>  	cfg = rvu_read64(rvu, blkaddr, NPC_AF_INTFX_KEX_CFG(NIX_INTF_RX));
>  	if (!(cfg & NPC_EXACT_NIBBLE_HIT)) {
> -		dev_info(rvu->dev, "%s: NPC exact match nibble not enabled in KEX profile\n",
> -			 __func__);
>  		return 0;
>  	}

>Same comment.
Ratheesh -> same comment. 

>  
> --
> 2.25.1
>
Leon Romanovsky Jan. 31, 2023, 9:20 a.m. UTC | #3
On Tue, Jan 31, 2023 at 07:11:10AM +0000, Ratheesh Kannoth wrote:
> ----------------------------------------------------------------------
> On Mon, Jan 30, 2023 at 09:25:56AM +0530, Ratheesh Kannoth wrote:
> > From: Sunil Goutham <sgoutham@marvell.com>
> > 
> > NPC exact match feature is supported only on one silicon variant, 
> > removed debug messages which print that this feature is not available 
> > on all other silicon variants.
> > 
> > Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> > Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
> > ---
> >  .../net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 12 
> > ++----------
> >  1 file changed, 2 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c 
> > b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> > index f69102d20c90..ad1374a12a40 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
> > @@ -200,10 +200,8 @@ void npc_config_secret_key(struct rvu *rvu, int blkaddr)
> >  	struct rvu_hwinfo *hw = rvu->hw;
> >  	u8 intf;
> >  
> > -	if (!hwcap->npc_hash_extract) {
> > -		dev_info(rvu->dev, "HW does not support secret key configuration\n");
> > +	if (!hwcap->npc_hash_extract)
> >  		return;
> > -	}
> >  
> >  	for (intf = 0; intf < hw->npc_intfs; intf++) {
> >  		rvu_write64(rvu, blkaddr, NPC_AF_INTFX_SECRET_KEY0(intf), @@ 
> > -221,10 +219,8 @@ void npc_program_mkex_hash(struct rvu *rvu, int blkaddr)
> >  	struct rvu_hwinfo *hw = rvu->hw;
> >  	u8 intf;
> >  
> > -	if (!hwcap->npc_hash_extract) {
> > -		dev_dbg(rvu->dev, "Field hash extract feature is not supported\n");
> > +	if (!hwcap->npc_hash_extract)
> >  		return;
> > -	}
> >  
> >  	for (intf = 0; intf < hw->npc_intfs; intf++) {
> >  		npc_program_mkex_hash_rx(rvu, blkaddr, intf); @@ -1854,16 +1850,12 
> > @@ int rvu_npc_exact_init(struct rvu *rvu)
> >  	/* Check exact match feature is supported */
> >  	npc_const3 = rvu_read64(rvu, blkaddr, NPC_AF_CONST3);
> >  	if (!(npc_const3 & BIT_ULL(62))) {
> > -		dev_info(rvu->dev, "%s: No support for exact match support\n",
> > -			 __func__);
> >  		return 0;
> >  	}
> 
> >You should remove () brackets here too.
> Ratheesh ->  Sorry , I did not get you. We have more than one statement in this "if" loop. How can we remove brackets ?

Please configure your email client to respect reply format.

Probably my typo mislead you, you need to remove {} brackets.

Before your change

     if (!(npc_const3 & BIT_ULL(62))) {
            dev_info(rvu->dev, "%s: No support for exact match support\n",
                     __func__);
            return 0;
     }

After your change:

    if (!(npc_const3 & BIT_ULL(62))) {
            return 0;
    }

Thanks
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
index f69102d20c90..ad1374a12a40 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
@@ -200,10 +200,8 @@  void npc_config_secret_key(struct rvu *rvu, int blkaddr)
 	struct rvu_hwinfo *hw = rvu->hw;
 	u8 intf;
 
-	if (!hwcap->npc_hash_extract) {
-		dev_info(rvu->dev, "HW does not support secret key configuration\n");
+	if (!hwcap->npc_hash_extract)
 		return;
-	}
 
 	for (intf = 0; intf < hw->npc_intfs; intf++) {
 		rvu_write64(rvu, blkaddr, NPC_AF_INTFX_SECRET_KEY0(intf),
@@ -221,10 +219,8 @@  void npc_program_mkex_hash(struct rvu *rvu, int blkaddr)
 	struct rvu_hwinfo *hw = rvu->hw;
 	u8 intf;
 
-	if (!hwcap->npc_hash_extract) {
-		dev_dbg(rvu->dev, "Field hash extract feature is not supported\n");
+	if (!hwcap->npc_hash_extract)
 		return;
-	}
 
 	for (intf = 0; intf < hw->npc_intfs; intf++) {
 		npc_program_mkex_hash_rx(rvu, blkaddr, intf);
@@ -1854,16 +1850,12 @@  int rvu_npc_exact_init(struct rvu *rvu)
 	/* Check exact match feature is supported */
 	npc_const3 = rvu_read64(rvu, blkaddr, NPC_AF_CONST3);
 	if (!(npc_const3 & BIT_ULL(62))) {
-		dev_info(rvu->dev, "%s: No support for exact match support\n",
-			 __func__);
 		return 0;
 	}
 
 	/* Check if kex profile has enabled EXACT match nibble */
 	cfg = rvu_read64(rvu, blkaddr, NPC_AF_INTFX_KEX_CFG(NIX_INTF_RX));
 	if (!(cfg & NPC_EXACT_NIBBLE_HIT)) {
-		dev_info(rvu->dev, "%s: NPC exact match nibble not enabled in KEX profile\n",
-			 __func__);
 		return 0;
 	}