netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the net-next tree with the rdma-fixes tree
@ 2018-03-16  0:56 Stephen Rothwell
  2018-03-16  1:18 ` Doug Ledford
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2018-03-16  0:56 UTC (permalink / raw)
  To: David Miller, Networking, Doug Ledford, Jason Gunthorpe
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Mark Bloch,
	Leon Romanovsky

[-- Attachment #1: Type: text/plain, Size: 5754 bytes --]

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/infiniband/hw/mlx5/main.c

between commit:

  42cea83f9524 ("IB/mlx5: Fix cleanup order on unload")

from the rdma-fixes tree and commit:

  b5ca15ad7e61 ("IB/mlx5: Add proper representors support")

from the net-next tree.

I fixed it up (see below and the merge fix patch as well) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 16 Mar 2018 11:54:01 +1100
Subject: [PATCH] IB/mlx5: merge fix for "Fix cleanup order on unload"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/infiniband/hw/mlx5/ib_rep.c  | 6 +++---
 drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/ib_rep.c b/drivers/infiniband/hw/mlx5/ib_rep.c
index 61cc3d7db257..7fb997dadd80 100644
--- a/drivers/infiniband/hw/mlx5/ib_rep.c
+++ b/drivers/infiniband/hw/mlx5/ib_rep.c
@@ -33,9 +33,9 @@ static const struct mlx5_ib_profile rep_profile = {
 	STAGE_CREATE(MLX5_IB_STAGE_IB_REG,
 		     mlx5_ib_stage_ib_reg_init,
 		     mlx5_ib_stage_ib_reg_cleanup),
-	STAGE_CREATE(MLX5_IB_STAGE_UMR_RESOURCES,
-		     mlx5_ib_stage_umr_res_init,
-		     mlx5_ib_stage_umr_res_cleanup),
+	STAGE_CREATE(MLX5_IB_STAGE_POST_IB_REG_UMR,
+		     mlx5_ib_stage_post_ib_reg_umr_init,
+		     NULL),
 	STAGE_CREATE(MLX5_IB_STAGE_CLASS_ATTR,
 		     mlx5_ib_stage_class_attr_init,
 		     NULL),
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index 7ec753ec7962..c45a7abdbe3e 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -1071,8 +1071,7 @@ int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev);
 void mlx5_ib_stage_bfrag_cleanup(struct mlx5_ib_dev *dev);
 int mlx5_ib_stage_ib_reg_init(struct mlx5_ib_dev *dev);
 void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev);
-int mlx5_ib_stage_umr_res_init(struct mlx5_ib_dev *dev);
-void mlx5_ib_stage_umr_res_cleanup(struct mlx5_ib_dev *dev);
+int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev);
 int mlx5_ib_stage_class_attr_init(struct mlx5_ib_dev *dev);
 void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
 		      const struct mlx5_ib_profile *profile,
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/infiniband/hw/mlx5/main.c
index da091de4e69d,d9474b95d8e5..000000000000
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@@ -4860,19 -4999,19 +4996,19 @@@ int mlx5_ib_stage_ib_reg_init(struct ml
  	return ib_register_device(&dev->ib_dev, NULL);
  }
  
 -void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
 +static void mlx5_ib_stage_pre_ib_reg_umr_cleanup(struct mlx5_ib_dev *dev)
  {
 -	ib_unregister_device(&dev->ib_dev);
 +	destroy_umrc_res(dev);
  }
  
- static void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
 -int mlx5_ib_stage_umr_res_init(struct mlx5_ib_dev *dev)
++void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
  {
 -	return create_umr_res(dev);
 +	ib_unregister_device(&dev->ib_dev);
  }
  
- static int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev)
 -void mlx5_ib_stage_umr_res_cleanup(struct mlx5_ib_dev *dev)
++int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev)
  {
 -	destroy_umrc_res(dev);
 +	return create_umr_res(dev);
  }
  
  static int mlx5_ib_stage_delay_drop_init(struct mlx5_ib_dev *dev)
@@@ -4999,6 -5144,48 +5144,48 @@@ static const struct mlx5_ib_profile pf_
  		     NULL),
  };
  
+ static const struct mlx5_ib_profile nic_rep_profile = {
+ 	STAGE_CREATE(MLX5_IB_STAGE_INIT,
+ 		     mlx5_ib_stage_init_init,
+ 		     mlx5_ib_stage_init_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_FLOW_DB,
+ 		     mlx5_ib_stage_flow_db_init,
+ 		     mlx5_ib_stage_flow_db_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_CAPS,
+ 		     mlx5_ib_stage_caps_init,
+ 		     NULL),
+ 	STAGE_CREATE(MLX5_IB_STAGE_NON_DEFAULT_CB,
+ 		     mlx5_ib_stage_rep_non_default_cb,
+ 		     NULL),
+ 	STAGE_CREATE(MLX5_IB_STAGE_ROCE,
+ 		     mlx5_ib_stage_rep_roce_init,
+ 		     mlx5_ib_stage_rep_roce_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_DEVICE_RESOURCES,
+ 		     mlx5_ib_stage_dev_res_init,
+ 		     mlx5_ib_stage_dev_res_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_COUNTERS,
+ 		     mlx5_ib_stage_counters_init,
+ 		     mlx5_ib_stage_counters_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_UAR,
+ 		     mlx5_ib_stage_uar_init,
+ 		     mlx5_ib_stage_uar_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_BFREG,
+ 		     mlx5_ib_stage_bfrag_init,
+ 		     mlx5_ib_stage_bfrag_cleanup),
+ 	STAGE_CREATE(MLX5_IB_STAGE_IB_REG,
+ 		     mlx5_ib_stage_ib_reg_init,
+ 		     mlx5_ib_stage_ib_reg_cleanup),
 -	STAGE_CREATE(MLX5_IB_STAGE_UMR_RESOURCES,
 -		     mlx5_ib_stage_umr_res_init,
 -		     mlx5_ib_stage_umr_res_cleanup),
++	STAGE_CREATE(MLX5_IB_STAGE_POST_IB_REG_UMR,
++		     mlx5_ib_stage_post_ib_reg_umr_init,
++		     NULL),
+ 	STAGE_CREATE(MLX5_IB_STAGE_CLASS_ATTR,
+ 		     mlx5_ib_stage_class_attr_init,
+ 		     NULL),
+ 	STAGE_CREATE(MLX5_IB_STAGE_REP_REG,
+ 		     mlx5_ib_stage_rep_reg_init,
+ 		     mlx5_ib_stage_rep_reg_cleanup),
+ };
+ 
  static void *mlx5_ib_add_slave_port(struct mlx5_core_dev *mdev, u8 port_num)
  {
  	struct mlx5_ib_multiport_info *mpi;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* linux-next: manual merge of the net-next tree with the rdma-fixes tree
@ 2023-06-13  1:43 Stephen Rothwell
  2023-06-13 12:39 ` Leon Romanovsky
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2023-06-13  1:43 UTC (permalink / raw)
  To: David Miller, Doug Ledford, Jason Gunthorpe
  Cc: Networking, Daniel Jurgens, Leon Romanovsky,
	Linux Kernel Mailing List, Linux Next Mailing List, Mark Bloch,
	Saeed Mahameed

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  include/linux/mlx5/driver.h

between commit:

  617f5db1a626 ("RDMA/mlx5: Fix affinity assignment")

from the rdma-fixes tree and commit:

  dc13180824b7 ("net/mlx5: Enable devlink port for embedded cpu VF vports")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/mlx5/driver.h
index e0156b54d0b3,18a608a1f567..000000000000
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@@ -1228,18 -1246,11 +1236,23 @@@ static inline u16 mlx5_core_max_vfs(con
  	return dev->priv.sriov.max_vfs;
  }
  
 +static inline int mlx5_lag_is_lacp_owner(struct mlx5_core_dev *dev)
 +{
 +	/* LACP owner conditions:
 +	 * 1) Function is physical.
 +	 * 2) LAG is supported by FW.
 +	 * 3) LAG is managed by driver (currently the only option).
 +	 */
 +	return  MLX5_CAP_GEN(dev, vport_group_manager) &&
 +		   (MLX5_CAP_GEN(dev, num_lag_ports) > 1) &&
 +		    MLX5_CAP_GEN(dev, lag_master);
 +}
 +
+ static inline u16 mlx5_core_max_ec_vfs(const struct mlx5_core_dev *dev)
+ {
+ 	return dev->priv.sriov.max_ec_vfs;
+ }
+ 
  static inline int mlx5_get_gid_table_len(u16 param)
  {
  	if (param > 4) {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* linux-next: manual merge of the net-next tree with the rdma-fixes tree
@ 2025-05-13  3:06 Stephen Rothwell
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2025-05-13  3:06 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski, Paolo Abeni, Networking,
	Jason Gunthorpe, Leon Romanovsky
  Cc: Dan Carpenter, Dave Ertman, Leon Romanovsky,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Michal Swiatkowski, Mustafa Ismail, Shiraz Saleem,
	Tatyana Nikolova, Tony Nguyen

[-- Attachment #1: Type: text/plain, Size: 3725 bytes --]

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/infiniband/hw/irdma/main.c

between commits:

  80f2ab46c2ee ("irdma: free iwdev->rf after removing MSI-X")
  4bcc063939a5 ("ice, irdma: fix an off by one in error handling code")

from the rdma-fixes tree and commit:

  c24a65b6a27c ("iidc/ice/irdma: Update IDC to support multiple consumers")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/infiniband/hw/irdma/main.c
index 7599e31b5743,abb532bc8ce4..000000000000
--- a/drivers/infiniband/hw/irdma/main.c
+++ b/drivers/infiniband/hw/irdma/main.c
@@@ -221,8 -221,8 +221,8 @@@ static int irdma_init_interrupts(struc
  			break;
  
  	if (i < IRDMA_MIN_MSIX) {
 -		for (; i > 0; i--)
 +		while (--i >= 0)
- 			ice_free_rdma_qvector(pf, &rf->msix_entries[i]);
+ 			ice_free_rdma_qvector(cdev, &rf->msix_entries[i]);
  
  		kfree(rf->msix_entries);
  		return -ENOMEM;
@@@ -245,35 -245,40 +245,42 @@@ static void irdma_deinit_interrupts(str
  
  static void irdma_remove(struct auxiliary_device *aux_dev)
  {
- 	struct iidc_auxiliary_dev *iidc_adev = container_of(aux_dev,
- 							    struct iidc_auxiliary_dev,
- 							    adev);
- 	struct ice_pf *pf = iidc_adev->pf;
  	struct irdma_device *iwdev = auxiliary_get_drvdata(aux_dev);
+ 	struct iidc_rdma_core_auxiliary_dev *iidc_adev;
+ 	struct iidc_rdma_core_dev_info *cdev_info;
  
+ 	iidc_adev = container_of(aux_dev, struct iidc_rdma_core_auxiliary_dev, adev);
+ 	cdev_info = iidc_adev->cdev_info;
+ 
+ 	ice_rdma_update_vsi_filter(cdev_info, iwdev->vsi_num, false);
  	irdma_ib_unregister_device(iwdev);
- 	ice_rdma_update_vsi_filter(pf, iwdev->vsi_num, false);
- 	irdma_deinit_interrupts(iwdev->rf, pf);
+ 	irdma_deinit_interrupts(iwdev->rf, cdev_info);
  
 +	kfree(iwdev->rf);
 +
- 	pr_debug("INIT: Gen2 PF[%d] device remove success\n", PCI_FUNC(pf->pdev->devfn));
+ 	pr_debug("INIT: Gen2 PF[%d] device remove success\n", PCI_FUNC(cdev_info->pdev->devfn));
  }
  
- static void irdma_fill_device_info(struct irdma_device *iwdev, struct ice_pf *pf,
- 				   struct ice_vsi *vsi)
+ static void irdma_fill_device_info(struct irdma_device *iwdev,
+ 				   struct iidc_rdma_core_dev_info *cdev_info)
  {
+ 	struct iidc_rdma_priv_dev_info *iidc_priv = cdev_info->iidc_priv;
  	struct irdma_pci_f *rf = iwdev->rf;
  
- 	rf->cdev = pf;
+ 	rf->sc_dev.hw = &rf->hw;
+ 	rf->iwdev = iwdev;
+ 	rf->cdev = cdev_info;
+ 	rf->hw.hw_addr = iidc_priv->hw_addr;
+ 	rf->pcidev = cdev_info->pdev;
+ 	rf->hw.device = &rf->pcidev->dev;
+ 	rf->pf_id = iidc_priv->pf_id;
  	rf->gen_ops.register_qset = irdma_lan_register_qset;
  	rf->gen_ops.unregister_qset = irdma_lan_unregister_qset;
- 	rf->hw.hw_addr = pf->hw.hw_addr;
- 	rf->pcidev = pf->pdev;
- 	rf->pf_id = pf->hw.pf_id;
- 	rf->default_vsi.vsi_idx = vsi->vsi_num;
- 	rf->protocol_used = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ?
- 			    IRDMA_ROCE_PROTOCOL_ONLY : IRDMA_IWARP_PROTOCOL_ONLY;
+ 
+ 	rf->default_vsi.vsi_idx = iidc_priv->vport_id;
+ 	rf->protocol_used =
+ 		cdev_info->rdma_protocol == IIDC_RDMA_PROTOCOL_ROCEV2 ?
+ 		IRDMA_ROCE_PROTOCOL_ONLY : IRDMA_IWARP_PROTOCOL_ONLY;
  	rf->rdma_ver = IRDMA_GEN_2;
  	rf->rsrc_profile = IRDMA_HMC_PROFILE_DEFAULT;
  	rf->rst_to = IRDMA_RST_TIMEOUT_HZ;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2025-05-13  3:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-16  0:56 linux-next: manual merge of the net-next tree with the rdma-fixes tree Stephen Rothwell
2018-03-16  1:18 ` Doug Ledford
2018-03-16  2:05   ` Jason Gunthorpe
2018-03-16  6:54   ` Saeed Mahameed
2018-03-23  4:19   ` David Miller
2018-03-23  4:33     ` Jason Gunthorpe
2018-03-23 14:22       ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2023-06-13  1:43 Stephen Rothwell
2023-06-13 12:39 ` Leon Romanovsky
2025-05-13  3:06 Stephen Rothwell

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).