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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a640b00-2ab2-472f-b713-1bb97ceac6ca@intel.com>
Date: Fri, 25 Oct 2024 17:19:03 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Mohsin Bashir <mohsin.bashr@...il.com>
CC: <netdev@...r.kernel.org>, <alexanderduyck@...com>, <kuba@...nel.org>,
	<andrew@...n.ch>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <pabeni@...hat.com>, <kernel-team@...a.com>,
	<sanmanpradhan@...a.com>, <sdf@...ichev.me>, <vadim.fedorenko@...ux.dev>
Subject: Re: [PATCH net-next v2] eth: fbnic: Add support to write TCE TCAM
 entries

From: Mohsin Bashir <mohsin.bashr@...il.com>
Date: Thu, 24 Oct 2024 15:31:35 -0700

> Add support for writing to the tce tcam to enable host to bmc traffic.
> Currently, we lack metadata to track where addresses have been written
> in the tcam, except for the last entry written. To address this issue,
> we start at the opposite end of the table in each pass, so that adding
> or deleting entries does not affect the availability of all entries,
> assuming there is no significant reordering of entries.
> 
> Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.com>

[...]

> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c b/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c
> index 337b8b3aef2f..908c098cd59e 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c
> @@ -587,6 +587,116 @@ static void fbnic_clear_act_tcam(struct fbnic_dev *fbd, unsigned int idx)
>  		wr32(fbd, FBNIC_RPC_TCAM_ACT(idx, i), 0);
>  }
>  
> +static void fbnic_clear_tce_tcam_entry(struct fbnic_dev *fbd, unsigned int idx)
> +{
> +	int i;
> +
> +	/* Invalidate entry and clear addr state info */
> +	for (i = 0; i <= FBNIC_TCE_TCAM_WORD_LEN; i++)

Please declare loop iterators right in loop declarations, we're GNU11
for a couple years already.

	for (u32 i = 0; ...

(+ don't use signed when it can't be < 0)

(this all applies to all your code)

> +		wr32(fbd, FBNIC_TCE_RAM_TCAM(idx, i), 0);
> +}

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ