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]
Message-ID: <39ca8e5f-7fba-4f8c-a0f7-59153382bcf3@siemens.com>
Date: Tue, 27 Feb 2024 12:05:14 +0000
From: Diogo Ivo <diogo.ivo@...mens.com>
To: Simon Horman <horms@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, danishanwar@...com, rogerq@...nel.org, vigneshr@...com,
 arnd@...db.de, wsa+renesas@...g-engineering.com, vladimir.oltean@....com,
 andrew@...n.ch, dan.carpenter@...aro.org, netdev@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, jan.kiszka@...mens.com,
 diogo.ivo@...mens.com
Subject: Re: [PATCH net-next v3 10/10] net: ti: icssg-prueth: Add ICSSG
 Ethernet driver for AM65x SR1.0 platforms

On 2/22/24 13:31, Simon Horman wrote:
> On Wed, Feb 21, 2024 at 03:24:16PM +0000, Diogo Ivo wrote:
>> Add the PRUeth driver for the ICSSG subsystem found in AM65x SR1.0 devices.
>> The main differences that set SR1.0 and SR2.0 apart are the missing TXPRU
>> core in SR1.0, two extra DMA channels for management purposes and different
>> firmware that needs to be configured accordingly.
>>
>> Based on the work of Roger Quadros, Vignesh Raghavendra and
>> Grygorii Strashko in TI's 5.10 SDK [1].
>>
>> [1]: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.ti.com%2Fcgit%2Fti-linux-kernel%2Fti-linux-kernel%2Ftree%2F%3Fh%3Dti-linux-5.10.y&data=05%7C02%7Cdiogo.ivo%40siemens.com%7Cfebc5e0f6a1b476c366d08dc33aa89ee%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638442054773860177%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=YxcCwUMV7Zzyycb1Ss6xoCq9BK1vYsvuoF30XXA2tRI%3D&reserved=0
>>
>> Co-developed-by: Jan Kiszka <jan.kiszka@...mens.com>
>> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
>> Signed-off-by: Diogo Ivo <diogo.ivo@...mens.com>
> 
> ...
> 
>> diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
> 
> ...
> 

...

>> +	config.rx_flow_id = emac->rx_flow_id_base; /* flow id for host port */
>> +	config.rx_mgr_flow_id = emac->rx_mgm_flow_id_base; /* for mgm ch */
>> +	config.rand_seed = get_random_u32();
> 
> Hi Diogo and Jan,
> 
> The fields of config above are all __le32.
> However the last three lines above assign host byte-order values to these
> fields. This does not seem correct.
> 
> This is flagged by Sparse along with some problems.
> Please ensure that new Sparse warnings are not introduced.
> 

You are correct, thank you for catching the inconsistency, this will be
fixed in v4.

...

>> +static int emac_send_command_sr1(struct prueth_emac *emac, u32 cmd)
>> +{
>> +	dma_addr_t desc_dma, buf_dma;
>> +	struct prueth_tx_chn *tx_chn;
>> +	struct cppi5_host_desc_t *first_desc;
>> +	u32 *data = emac->cmd_data;
>> +	u32 pkt_len = sizeof(emac->cmd_data);
>> +	void **swdata;
>> +	int ret = 0;
>> +	u32 *epib;
> 
> In new Networking code please express local variables in reverse xmas tree
> order - longest line to shortest.

Noted, will fix for v4.

...

> There is also one such problem in Patch 06/10.
Here xmastree reported the same problem in patch 08/10 rather than 
06/10, I assumed you meant that one.

Best regards,
Diogo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ