All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020
@ 2020-05-15 22:16 Saeed Mahameed
  2020-05-15 22:16 ` [PATCH mlx5-next 1/3] net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits Saeed Mahameed
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Saeed Mahameed @ 2020-05-15 22:16 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky; +Cc: netdev, linux-rdma

Hi,

This patchset is for mlx5-next branch with misc updates to
mlx5 core driver.

1) Header modify support for RDMA TX Flow table
2) Two small cleanups.

Thanks,
Saeed.

---

Michael Guralnik (1):
  net/mlx5: Add support for RDMA TX FT headers modifying

Parav Pandit (1):
  net/mlx5: Move iseg access helper routines close to mlx5_core driver

Raed Salem (1):
  net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits

 drivers/infiniband/hw/mlx5/flow.c                      |  5 ++++-
 drivers/net/ethernet/mellanox/mlx5/core/cmd.c          |  5 +++++
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c       |  4 ++++
 drivers/net/ethernet/mellanox/mlx5/core/main.c         |  5 +++++
 .../net/ethernet/mellanox/mlx5/core/steering/dr_ste.c  |  1 -
 .../ethernet/mellanox/mlx5/core/steering/dr_types.h    |  3 +--
 include/linux/mlx5/driver.h                            | 10 ----------
 include/linux/mlx5/mlx5_ifc.h                          |  4 +---
 8 files changed, 20 insertions(+), 17 deletions(-)

-- 
2.25.4
r

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH mlx5-next 1/3] net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits
  2020-05-15 22:16 [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
@ 2020-05-15 22:16 ` Saeed Mahameed
  2020-05-15 22:16 ` [PATCH mlx5-next 2/3] net/mlx5: Move iseg access helper routines close to mlx5_core driver Saeed Mahameed
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2020-05-15 22:16 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky
  Cc: netdev, linux-rdma, Raed Salem, Alex Vesker

From: Raed Salem <raeds@mellanox.com>

Remove the "metadata_reg_b" field and all uses of this field in code
to match the device specification. As this field is not in use in SW
steering it is safe to remove it.

Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c   | 1 -
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 3 +--
 include/linux/mlx5/mlx5_ifc.h                               | 4 +---
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
index c0e3a1e7389d..78c884911ceb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
@@ -961,7 +961,6 @@ static void dr_ste_copy_mask_misc2(char *mask, struct mlx5dr_match_misc2 *spec)
 	spec->metadata_reg_c_1 = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_c_1);
 	spec->metadata_reg_c_0 = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_c_0);
 	spec->metadata_reg_a = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_a);
-	spec->metadata_reg_b = MLX5_GET(fte_match_set_misc2, mask, metadata_reg_b);
 }
 
 static void dr_ste_copy_mask_misc3(char *mask, struct mlx5dr_match_misc3 *spec)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
index 984783238baa..71fa01ce348a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
@@ -554,8 +554,7 @@ struct mlx5dr_match_misc2 {
 	u32 metadata_reg_c_1;			/* metadata_reg_c_1 */
 	u32 metadata_reg_c_0;			/* metadata_reg_c_0 */
 	u32 metadata_reg_a;			/* metadata_reg_a */
-	u32 metadata_reg_b;			/* metadata_reg_b */
-	u8 reserved_auto2[8];
+	u8 reserved_auto2[12];
 };
 
 struct mlx5dr_match_misc3 {
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index c9dd6e99ad56..fd8da4875ea0 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -584,9 +584,7 @@ struct mlx5_ifc_fte_match_set_misc2_bits {
 
 	u8         metadata_reg_a[0x20];
 
-	u8         metadata_reg_b[0x20];
-
-	u8         reserved_at_1c0[0x40];
+	u8         reserved_at_1a0[0x60];
 };
 
 struct mlx5_ifc_fte_match_set_misc3_bits {
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH mlx5-next 2/3] net/mlx5: Move iseg access helper routines close to mlx5_core driver
  2020-05-15 22:16 [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
  2020-05-15 22:16 ` [PATCH mlx5-next 1/3] net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits Saeed Mahameed
@ 2020-05-15 22:16 ` Saeed Mahameed
  2020-05-15 22:16 ` [PATCH mlx5-next 3/3] net/mlx5: Add support for RDMA TX FT headers modifying Saeed Mahameed
  2020-05-18 16:23 ` [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
  3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2020-05-15 22:16 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky; +Cc: netdev, linux-rdma, Parav Pandit

From: Parav Pandit <parav@mellanox.com>

Only mlx5_core driver handles fw initialization check and command
interface revision check.
Hence move them inside the mlx5_core driver where it is used.
This avoid exposing these helpers to all mlx5 drivers.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/cmd.c  |  5 +++++
 drivers/net/ethernet/mellanox/mlx5/core/main.c |  5 +++++
 include/linux/mlx5/driver.h                    | 10 ----------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index 34cba97f7bf4..e6567d5570ba 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -1890,6 +1890,11 @@ static void free_cmd_page(struct mlx5_core_dev *dev, struct mlx5_cmd *cmd)
 			  cmd->alloc_dma);
 }
 
+static u16 cmdif_rev(struct mlx5_core_dev *dev)
+{
+	return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16;
+}
+
 int mlx5_cmd_init(struct mlx5_core_dev *dev)
 {
 	int size = sizeof(struct mlx5_cmd_prot_block);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 061b69ea9cc4..8a375e3ed5c1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -177,6 +177,11 @@ static struct mlx5_profile profile[] = {
 #define FW_PRE_INIT_TIMEOUT_MILI	120000
 #define FW_INIT_WARN_MESSAGE_INTERVAL	20000
 
+static int fw_initializing(struct mlx5_core_dev *dev)
+{
+	return ioread32be(&dev->iseg->initializing) >> 31;
+}
+
 static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili,
 			u32 warn_time_mili)
 {
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 24e04901f92e..a988eb405aa6 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -823,11 +823,6 @@ static inline u16 fw_rev_sub(struct mlx5_core_dev *dev)
 	return ioread32be(&dev->iseg->cmdif_rev_fw_sub) & 0xffff;
 }
 
-static inline u16 cmdif_rev(struct mlx5_core_dev *dev)
-{
-	return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16;
-}
-
 static inline u32 mlx5_base_mkey(const u32 key)
 {
 	return key & 0xffffff00u;
@@ -1012,11 +1007,6 @@ int mlx5_core_roce_gid_set(struct mlx5_core_dev *dev, unsigned int index,
 			   u8 roce_version, u8 roce_l3_type, const u8 *gid,
 			   const u8 *mac, bool vlan, u16 vlan_id, u8 port_num);
 
-static inline int fw_initializing(struct mlx5_core_dev *dev)
-{
-	return ioread32be(&dev->iseg->initializing) >> 31;
-}
-
 static inline u32 mlx5_mkey_to_idx(u32 mkey)
 {
 	return mkey >> 8;
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH mlx5-next 3/3] net/mlx5: Add support for RDMA TX FT headers modifying
  2020-05-15 22:16 [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
  2020-05-15 22:16 ` [PATCH mlx5-next 1/3] net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits Saeed Mahameed
  2020-05-15 22:16 ` [PATCH mlx5-next 2/3] net/mlx5: Move iseg access helper routines close to mlx5_core driver Saeed Mahameed
@ 2020-05-15 22:16 ` Saeed Mahameed
  2020-05-18 16:23 ` [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
  3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2020-05-15 22:16 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky
  Cc: netdev, linux-rdma, Michael Guralnik, Mark Bloch, Maor Gottlieb

From: Michael Guralnik <michaelgur@mellanox.com>

Support adding header modifying actions to the RDMA TX flow table.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/infiniband/hw/mlx5/flow.c                | 5 ++++-
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/flow.c b/drivers/infiniband/hw/mlx5/flow.c
index 69cb7e6e8955..3a0601c2052c 100644
--- a/drivers/infiniband/hw/mlx5/flow.c
+++ b/drivers/infiniband/hw/mlx5/flow.c
@@ -404,7 +404,10 @@ static bool mlx5_ib_modify_header_supported(struct mlx5_ib_dev *dev)
 {
 	return MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev,
 					 max_modify_header_actions) ||
-	       MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, max_modify_header_actions);
+	       MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev,
+					 max_modify_header_actions) ||
+	       MLX5_CAP_FLOWTABLE_RDMA_TX(dev->mdev,
+					 max_modify_header_actions);
 }
 
 static int UVERBS_HANDLER(MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER)(
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
index 1a8e826ac86b..465a1076a477 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
@@ -781,6 +781,10 @@ static int mlx5_cmd_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
 		max_actions = MLX5_CAP_ESW_INGRESS_ACL(dev, max_modify_header_actions);
 		table_type = FS_FT_ESW_INGRESS_ACL;
 		break;
+	case MLX5_FLOW_NAMESPACE_RDMA_TX:
+		max_actions = MLX5_CAP_FLOWTABLE_RDMA_TX(dev, max_modify_header_actions);
+		table_type = FS_FT_RDMA_TX;
+		break;
 	default:
 		return -EOPNOTSUPP;
 	}
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020
  2020-05-15 22:16 [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
                   ` (2 preceding siblings ...)
  2020-05-15 22:16 ` [PATCH mlx5-next 3/3] net/mlx5: Add support for RDMA TX FT headers modifying Saeed Mahameed
@ 2020-05-18 16:23 ` Saeed Mahameed
  3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2020-05-18 16:23 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: netdev, linux-rdma

On Fri, 2020-05-15 at 15:16 -0700, Saeed Mahameed wrote:
> Hi,
> 
> This patchset is for mlx5-next branch with misc updates to
> mlx5 core driver.
> 
> 1) Header modify support for RDMA TX Flow table
> 2) Two small cleanups.
> 
> Thanks,
> Saeed.
> 
> ---
> 
> Michael Guralnik (1):
>   net/mlx5: Add support for RDMA TX FT headers modifying
> 
> Parav Pandit (1):
>   net/mlx5: Move iseg access helper routines close to mlx5_core
> driver
> 
> Raed Salem (1):
>   net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits
> 
>  drivers/infiniband/hw/mlx5/flow.c                      |  5 ++++-
>  drivers/net/ethernet/mellanox/mlx5/core/cmd.c          |  5 +++++
>  drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c       |  4 ++++
>  drivers/net/ethernet/mellanox/mlx5/core/main.c         |  5 +++++
>  .../net/ethernet/mellanox/mlx5/core/steering/dr_ste.c  |  1 -
>  .../ethernet/mellanox/mlx5/core/steering/dr_types.h    |  3 +--
>  include/linux/mlx5/driver.h                            | 10 --------
> --
>  include/linux/mlx5/mlx5_ifc.h                          |  4 +---
>  8 files changed, 20 insertions(+), 17 deletions(-)
> 


applied to mlx5-next.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-18 16:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 22:16 [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed
2020-05-15 22:16 ` [PATCH mlx5-next 1/3] net/mlx5: Cleanup mlx5_ifc_fte_match_set_misc2_bits Saeed Mahameed
2020-05-15 22:16 ` [PATCH mlx5-next 2/3] net/mlx5: Move iseg access helper routines close to mlx5_core driver Saeed Mahameed
2020-05-15 22:16 ` [PATCH mlx5-next 3/3] net/mlx5: Add support for RDMA TX FT headers modifying Saeed Mahameed
2020-05-18 16:23 ` [PATCH mlx5-next 0/3] Mellanox, updates for mlx5 next 15-05-2020 Saeed Mahameed

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.