All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ioana Ciornei <ciorneiioana@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	ruxandra.radulescu@nxp.com, yangbo.lu@nxp.com,
	Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: Re: [PATCH net-next 3/5] dpaa2-switch: reduce the size of the if_id bitmap to 64 bits
Date: Thu, 18 Mar 2021 22:15:18 +0100	[thread overview]
Message-ID: <YFPC5ojxMvCsPfni@lunn.ch> (raw)
In-Reply-To: <20210316145512.2152374-4-ciorneiioana@gmail.com>

On Tue, Mar 16, 2021 at 04:55:10PM +0200, Ioana Ciornei wrote:
> From: Ioana Ciornei <ioana.ciornei@nxp.com>
> 
> The maximum number of DPAA2 switch interfaces, including the control
> interface, is 64. Even though this restriction existed from the first
> place, the command structures which use an interface id bitmap were
> poorly described and even though a single uint64_t is enough, all of
> them used an array of 4 uint64_t's.
> Fix this by reducing the size of the interface id field to a single
> uint64_t.
> 
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> ---
>  .../net/ethernet/freescale/dpaa2/dpsw-cmd.h    |  4 ++--
>  drivers/net/ethernet/freescale/dpaa2/dpsw.c    | 18 ++++++++++--------
>  2 files changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
> index 2371fd5c40e3..996a59dcd01d 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h
> @@ -340,7 +340,7 @@ struct dpsw_cmd_vlan_manage_if {
>  	__le16 vlan_id;
>  	__le32 pad1;
>  	/* cmd word 1-4 */
> -	__le64 if_id[4];
> +	__le64 if_id;
>  };
>  
>  struct dpsw_cmd_vlan_remove {
> @@ -386,7 +386,7 @@ struct dpsw_cmd_fdb_multicast_op {
>  	u8 mac_addr[6];
>  	__le16 pad2;
>  	/* cmd word 2-5 */
> -	__le64 if_id[4];
> +	__le64 if_id;
>  };
>  
>  struct dpsw_cmd_fdb_dump {
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.c b/drivers/net/ethernet/freescale/dpaa2/dpsw.c
> index ad7a4c03b130..ef0f90ae683f 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.c
> @@ -773,16 +773,18 @@ int dpsw_vlan_add_if(struct fsl_mc_io *mc_io,
>  		     u16 vlan_id,
>  		     const struct dpsw_vlan_if_cfg *cfg)
>  {
> +	struct dpsw_cmd_vlan_add_if *cmd_params;
>  	struct fsl_mc_command cmd = { 0 };
> -	struct dpsw_cmd_vlan_manage_if *cmd_params;

There is no mention in the commit message about replacing
dpsw_cmd_vlan_manage_if with dpsw_cmd_vlan_add_if. I wounder if this
should be a separate patch?

       Andrew

  reply	other threads:[~2021-03-18 21:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 14:55 [PATCH net-next 0/5] dpaa2-switch: small cleanup Ioana Ciornei
2021-03-16 14:55 ` [PATCH net-next 1/5] dpaa2-switch: remove unused ABI functions Ioana Ciornei
2021-03-16 14:55 ` [PATCH net-next 2/5] dpaa2-switch: fix kdoc warnings Ioana Ciornei
2021-03-16 14:55 ` [PATCH net-next 3/5] dpaa2-switch: reduce the size of the if_id bitmap to 64 bits Ioana Ciornei
2021-03-18 21:15   ` Andrew Lunn [this message]
2021-03-16 14:55 ` [PATCH net-next 4/5] dpaa2-switch: fit the function declaration on the same line Ioana Ciornei
2021-03-18 21:19   ` Andrew Lunn
2021-03-16 14:55 ` [PATCH net-next 5/5] dpaa2-eth: fixup kdoc warnings Ioana Ciornei
2021-03-16 21:40 ` [PATCH net-next 0/5] dpaa2-switch: small cleanup Jakub Kicinski
2021-03-16 22:40 ` patchwork-bot+netdevbpf

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=YFPC5ojxMvCsPfni@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ciorneiioana@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ruxandra.radulescu@nxp.com \
    --cc=yangbo.lu@nxp.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.