lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Jul 2023 15:33:55 +0200
From:   Michal Kubiak <michal.kubiak@...el.com>
To:     Ratheesh Kannoth <rkannoth@...vell.com>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <sgoutham@...vell.com>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <sbhatta@...vell.com>, <gakula@...vell.com>, <schalla@...vell.com>,
        <hkelam@...vell.com>
Subject: Re: [PATCH net] octeontx2-af: Promisc enable/disable through mbox

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@...vell.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ