All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Diogo Ivo <diogo.ivo@siemens.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, danishanwar@ti.com, rogerq@kernel.org,
	vigneshr@ti.com, arnd@arndb.de, wsa+renesas@sang-engineering.com,
	vladimir.oltean@nxp.com, andrew@lunn.ch,
	dan.carpenter@linaro.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, jan.kiszka@siemens.com
Subject: Re: [PATCH net-next v3 10/10] net: ti: icssg-prueth: Add ICSSG Ethernet driver for AM65x SR1.0 platforms
Date: Tue, 27 Feb 2024 17:31:36 +0000	[thread overview]
Message-ID: <20240227173136.GH277116@kernel.org> (raw)
In-Reply-To: <39ca8e5f-7fba-4f8c-a0f7-59153382bcf3@siemens.com>

On Tue, Feb 27, 2024 at 12:05:14PM +0000, Diogo Ivo wrote:
> 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@siemens.com>
> > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > > Signed-off-by: Diogo Ivo <diogo.ivo@siemens.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.

Yes, probably.

Thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Diogo Ivo <diogo.ivo@siemens.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, danishanwar@ti.com, rogerq@kernel.org,
	vigneshr@ti.com, arnd@arndb.de, wsa+renesas@sang-engineering.com,
	vladimir.oltean@nxp.com, andrew@lunn.ch,
	dan.carpenter@linaro.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, jan.kiszka@siemens.com
Subject: Re: [PATCH net-next v3 10/10] net: ti: icssg-prueth: Add ICSSG Ethernet driver for AM65x SR1.0 platforms
Date: Tue, 27 Feb 2024 17:31:36 +0000	[thread overview]
Message-ID: <20240227173136.GH277116@kernel.org> (raw)
In-Reply-To: <39ca8e5f-7fba-4f8c-a0f7-59153382bcf3@siemens.com>

On Tue, Feb 27, 2024 at 12:05:14PM +0000, Diogo Ivo wrote:
> 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@siemens.com>
> > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > > Signed-off-by: Diogo Ivo <diogo.ivo@siemens.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.

Yes, probably.

Thanks.

  reply	other threads:[~2024-02-27 17:32 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 15:24 [PATCH net-next v3 00/10] Support ICSSG-based Ethernet on AM65x SR1.0 devices Diogo Ivo
2024-02-21 15:24 ` Diogo Ivo
2024-02-21 15:24 ` [PATCH net-next v3 01/10] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-22 17:57   ` Conor Dooley
2024-02-22 17:57     ` Conor Dooley
2024-02-26 16:48   ` Roger Quadros
2024-02-26 16:48     ` Roger Quadros
2024-02-21 15:24 ` [PATCH net-next v3 02/10] eth: Move IPv4/IPv6 multicast address bases to their own symbols Diogo Ivo
2024-02-21 15:24 ` [PATCH net-next v3 03/10] net: ti: icssg-prueth: Move common functions into a separate file Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-21 15:24 ` [PATCH net-next v3 04/10] net: ti: icssg-prueth: Add SR1.0-specific configuration bits Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-26 17:23   ` Roger Quadros
2024-02-26 17:23     ` Roger Quadros
2024-02-27 11:46     ` Diogo Ivo
2024-02-27 11:46       ` Diogo Ivo
2024-02-21 15:24 ` [PATCH net-next v3 05/10] net: ti: icssg-prueth: Add SR1.0-specific description bits Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-26 17:15   ` Roger Quadros
2024-02-26 17:15     ` Roger Quadros
2024-02-21 15:24 ` [PATCH net-next v3 06/10] net: ti: icssg-prueth: Adjust IPG configuration for SR1.0 Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-26 17:17   ` Roger Quadros
2024-02-26 17:17     ` Roger Quadros
2024-02-21 15:24 ` [PATCH net-next v3 07/10] net: ti: icssg-prueth: Adjust the number of TX channels " Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-26 17:19   ` Roger Quadros
2024-02-26 17:19     ` Roger Quadros
2024-02-21 15:24 ` [PATCH net-next v3 08/10] net: ti: icssg-prueth: Add functions to configure SR1.0 packet classifier Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-26 17:26   ` Roger Quadros
2024-02-26 17:26     ` Roger Quadros
2024-02-27 12:11     ` Diogo Ivo
2024-02-27 12:11       ` Diogo Ivo
2024-02-29 10:15       ` Roger Quadros
2024-02-29 10:15         ` Roger Quadros
2024-02-26 18:41   ` Roger Quadros
2024-02-26 18:41     ` Roger Quadros
2024-02-27 12:14     ` Diogo Ivo
2024-02-27 12:14       ` Diogo Ivo
2024-02-29 10:16       ` Roger Quadros
2024-02-29 10:16         ` Roger Quadros
2024-02-21 15:24 ` [PATCH net-next v3 09/10] net: ti: icssg-prueth: Modify common functions for SR1.0 Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-26 17:33   ` Roger Quadros
2024-02-26 17:33     ` Roger Quadros
2024-02-27 12:42     ` Diogo Ivo
2024-02-27 12:42       ` Diogo Ivo
2024-02-21 15:24 ` [PATCH net-next v3 10/10] net: ti: icssg-prueth: Add ICSSG Ethernet driver for AM65x SR1.0 platforms Diogo Ivo
2024-02-21 15:24   ` Diogo Ivo
2024-02-22 13:31   ` Simon Horman
2024-02-22 13:31     ` Simon Horman
2024-02-27 12:05     ` Diogo Ivo
2024-02-27 12:05       ` Diogo Ivo
2024-02-27 17:31       ` Simon Horman [this message]
2024-02-27 17:31         ` Simon Horman

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=20240227173136.GH277116@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=vigneshr@ti.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.