linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
	linux-rdma@vger.kernel.org, Moshe Shemesh <moshe@mellanox.com>,
	netdev@vger.kernel.org, Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH mlx5-next 13/24] net/mlx5: Update mpfs.c new cmd interface
Date: Mon, 20 Apr 2020 14:41:25 +0300	[thread overview]
Message-ID: <20200420114136.264924-14-leon@kernel.org> (raw)
In-Reply-To: <20200420114136.264924-1-leon@kernel.org>

From: Leon Romanovsky <leonro@mellanox.com>

Do mass update of mpfs.c to reuse newly introduced
mlx5_cmd_exec_in*() interfaces.

Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
index 3118e8d66407..fd8449ff9e17 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
@@ -40,8 +40,7 @@
 /* HW L2 Table (MPFS) management */
 static int set_l2table_entry_cmd(struct mlx5_core_dev *dev, u32 index, u8 *mac)
 {
-	u32 in[MLX5_ST_SZ_DW(set_l2_table_entry_in)]   = {0};
-	u32 out[MLX5_ST_SZ_DW(set_l2_table_entry_out)] = {0};
+	u32 in[MLX5_ST_SZ_DW(set_l2_table_entry_in)] = {};
 	u8 *in_mac_addr;
 
 	MLX5_SET(set_l2_table_entry_in, in, opcode, MLX5_CMD_OP_SET_L2_TABLE_ENTRY);
@@ -50,17 +49,16 @@ static int set_l2table_entry_cmd(struct mlx5_core_dev *dev, u32 index, u8 *mac)
 	in_mac_addr = MLX5_ADDR_OF(set_l2_table_entry_in, in, mac_address);
 	ether_addr_copy(&in_mac_addr[2], mac);
 
-	return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
+	return mlx5_cmd_exec_in(dev, set_l2_table_entry, in);
 }
 
 static int del_l2table_entry_cmd(struct mlx5_core_dev *dev, u32 index)
 {
-	u32 in[MLX5_ST_SZ_DW(delete_l2_table_entry_in)]   = {0};
-	u32 out[MLX5_ST_SZ_DW(delete_l2_table_entry_out)] = {0};
+	u32 in[MLX5_ST_SZ_DW(delete_l2_table_entry_in)] = {};
 
 	MLX5_SET(delete_l2_table_entry_in, in, opcode, MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY);
 	MLX5_SET(delete_l2_table_entry_in, in, table_index, index);
-	return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
+	return mlx5_cmd_exec_in(dev, delete_l2_table_entry, in);
 }
 
 /* UC L2 table hash node */
-- 
2.25.2


  parent reply	other threads:[~2020-04-20 11:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 11:41 [PATCH mlx5-next 00/24] Mass conversion to light mlx5 command interface Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 01/24] net/mlx5: Update vport.c to new cmd interface Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 02/24] net/mlx5: Update cq.c " Leon Romanovsky
2020-04-22 16:49   ` Leon Romanovsky
2020-04-22 18:32     ` Jason Gunthorpe
2020-04-22 18:36       ` Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 03/24] net/mlx5: Update debugfs.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 04/24] net/mlx5: Update ecpf.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 05/24] net/mlx5: Update eq.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 06/24] net/mlx5: Update statistics " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 07/24] net/mlx5: Update eswitch " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 08/24] net/mlx5: Update FPGA " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 09/24] net/mlx5: Update fs_core " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 10/24] net/mlx5: Update fw.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 11/24] net/mlx5: Update lag.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 12/24] net/mlx5: Update gid.c " Leon Romanovsky
2020-04-20 11:41 ` Leon Romanovsky [this message]
2020-04-20 11:41 ` [PATCH mlx5-next 14/24] net/mlx5: Update vxlan.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 15/24] net/mlx5: Update main.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 16/24] net/mlx5: Update mcg.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 17/24] net/mlx5: Update mr.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 18/24] net/mlx5: Update pagealloc.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 19/24] net/mlx5: Update pd.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 20/24] net/mlx5: Update uar.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 21/24] net/mlx5: Update rl.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 22/24] net/mlx5: Update port.c " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 23/24] net/mlx5: Update SW steering " Leon Romanovsky
2020-04-20 11:41 ` [PATCH mlx5-next 24/24] net/mlx5: Update transobj.c " Leon Romanovsky
2020-04-23 18:45 ` [PATCH mlx5-next 00/24] Mass conversion to light mlx5 command interface Leon Romanovsky

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=20200420114136.264924-14-leon@kernel.org \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).