public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubiak <michal.kubiak@intel.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sgoutham@marvell.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<sbhatta@marvell.com>, <gakula@marvell.com>,
	<schalla@marvell.com>, <hkelam@marvell.com>
Subject: Re: [PATCH net] octeontx2-af: Promisc enable/disable through mbox
Date: Wed, 5 Jul 2023 15:33:55 +0200	[thread overview]
Message-ID: <ZKVxQ2HtG+GtumCj@localhost.localdomain> (raw)
In-Reply-To: <20230705033813.2744357-1-rkannoth@marvell.com>

On Wed, Jul 05, 2023 at 09:08:13AM +0530, Ratheesh Kannoth wrote:
> In Legacy silicon, promisc mode is only modified
> through CGX mbox messages. In CN10KB silicon, it modified
> from CGX mbox and NIX. This breaks legacy application
> behaviour. Fix this by removing call from NIX.
> 
> Fixes: d6c9784baf59 ("octeontx2-af: Invoke exact match functions if supported")
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>

Please follow the Patchwork report.
There are several lines exceeding 80 characters.

Thanks,
Michal

> @@ -1177,13 +1179,16 @@ static u16 __rvu_npc_exact_cmd_rules_cnt_update(struct rvu *rvu, int drop_mcam_i
>  
>  	*enable_or_disable_cam = false;
>  
> -	/* If all rules are deleted, disable cam */
> +	if (promisc)
> +		goto done;
> +
> +	/* If all rules are deleted and not already in promisc mode; disable cam */

Line length above 80 characters.

>  	if (!*cnt && val < 0) {
>  		*enable_or_disable_cam = true;
>  		goto done;
>  	}
>  
> -	/* If rule got added, enable cam */
> +	/* If rule got added and not already in promisc mode; enable cam */
>  	if (!old_cnt && val > 0) {
>  		*enable_or_disable_cam = true;
>  		goto done;
> @@ -1462,6 +1467,11 @@ int rvu_npc_exact_promisc_disable(struct rvu *rvu, u16 pcifunc)
>  	*promisc = false;
>  	mutex_unlock(&table->lock);
>  
> +	/* Enable drop rule */
> +	rvu_npc_enable_mcam_by_entry_index(rvu, drop_mcam_idx, NIX_INTF_RX, true);

Line length above 80 characters.

> +
> +	dev_dbg(rvu->dev, "%s: disabled  promisc mode (cgx=%d lmac=%d)\n",
> +		__func__, cgx_id, lmac_id);
>  	return 0;
>  }
>  
> @@ -1503,6 +1513,11 @@ int rvu_npc_exact_promisc_enable(struct rvu *rvu, u16 pcifunc)
>  	*promisc = true;
>  	mutex_unlock(&table->lock);
>  
> +	/*  disable drop rule */
> +	rvu_npc_enable_mcam_by_entry_index(rvu, drop_mcam_idx, NIX_INTF_RX, false);

Line length above 80 characters.


  reply	other threads:[~2023-07-05 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05  3:38 [PATCH net] octeontx2-af: Promisc enable/disable through mbox Ratheesh Kannoth
2023-07-05 13:33 ` Michal Kubiak [this message]
2023-07-06  3:18   ` Ratheesh Kannoth
2023-07-06  3:26     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKVxQ2HtG+GtumCj@localhost.localdomain \
    --to=michal.kubiak@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rkannoth@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=schalla@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox