Commit 95b5c291 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Saeed Mahameed says:

====================
mlx5-next 2021-04-09

This pr contains changes from  mlx5-next branch,
already reviewed on netdev and rdma mailing lists, links below.

1) From Leon, Dynamically assign MSI-X vectors count
Already Acked by Bjorn Helgaas.
https://patchwork.kernel.org/project/netdevbpf/cover/20210314124256.70253-1-leon@kernel.org/

2) Cleanup series:
https://patchwork.kernel.org/project/netdevbpf/cover/20210311070915.321814-1-saeed@kernel.org/

From Mark, E-Switch cleanups and refactoring, and the addition
of single FDB mode needed HW bits.

From Mikhael, Remove unused struct field

From Saeed, Cleanup W=1 prototype warning

From Zheng, Esw related cleanup

From Tariq, User order-0 page allocation for EQs

* 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux:
  net/mlx5: Implement sriov_get_vf_total_msix/count() callbacks
  net/mlx5: Dynamically assign MSI-X vectors count
  net/mlx5: Add dynamic MSI-X capabilities bits
  PCI/IOV: Add sysfs MSI-X vector assignment interface
  net/mlx5: Use order-0 allocations for EQs
  net/mlx5: Add IFC bits needed for single FDB mode
  net/mlx5: E-Switch, Refactor send to vport to be more generic
  RDMA/mlx5: Use representor E-Switch when getting netdev and metadata
  net/mlx5: E-Switch, Add eswitch pointer to each representor
  net/mlx5: E-Switch, Add match on vhca id to default send rules
  net/mlx5: Remove unused mlx5_core_health member recover_work
  net/mlx5: simplify the return expression of mlx5_esw_offloads_pair()
  net/mlx5: Cleanup prototype warning
====================

Link: https://lore.kernel.org/r/20210409200704.10886-1-saeed@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 626b598a e71b75f7
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -375,3 +375,32 @@ Description:
		The value comes from the PCI kernel device state and can be one
		of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".
		The file is read only.

What:		/sys/bus/pci/devices/.../sriov_vf_total_msix
Date:		January 2021
Contact:	Leon Romanovsky <leonro@nvidia.com>
Description:
		This file is associated with a SR-IOV physical function (PF).
		It contains the total number of MSI-X vectors available for
		assignment to all virtual functions (VFs) associated with PF.
		The value will be zero if the device doesn't support this
		functionality. For supported devices, the value will be
		constant and won't be changed after MSI-X vectors assignment.

What:		/sys/bus/pci/devices/.../sriov_vf_msix_count
Date:		January 2021
Contact:	Leon Romanovsky <leonro@nvidia.com>
Description:
		This file is associated with a SR-IOV virtual function (VF).
		It allows configuration of the number of MSI-X vectors for
		the VF. This allows devices that have a global pool of MSI-X
		vectors to optimally divide them between VFs based on VF usage.

		The values accepted are:
		 * > 0 - this number will be reported as the Table Size in the
			 VF's MSI-X capability
		 * < 0 - not valid
		 * = 0 - will reset to the device default value

		The file is writable if the PF is bound to a driver that
		implements ->sriov_set_msix_vec_count().
+1 −1
Original line number Diff line number Diff line
@@ -879,7 +879,7 @@ static void mlx5_ib_set_rule_source_port(struct mlx5_ib_dev *dev,
				    misc_parameters_2);

		MLX5_SET(fte_match_set_misc2, misc, metadata_reg_c_0,
			 mlx5_eswitch_get_vport_metadata_for_match(esw,
			 mlx5_eswitch_get_vport_metadata_for_match(rep->esw,
								   rep->vport));
		misc = MLX5_ADDR_OF(fte_match_param, spec->match_criteria,
				    misc_parameters_2);
+2 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ mlx5_ib_set_vport_rep(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
	rep->rep_data[REP_IB].priv = ibdev;
	write_lock(&ibdev->port[vport_index].roce.netdev_lock);
	ibdev->port[vport_index].roce.netdev =
		mlx5_ib_get_rep_netdev(dev->priv.eswitch, rep->vport);
		mlx5_ib_get_rep_netdev(rep->esw, rep->vport);
	write_unlock(&ibdev->port[vport_index].roce.netdev_lock);

	return 0;
@@ -123,8 +123,7 @@ struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,

	rep = dev->port[port - 1].rep;

	return mlx5_eswitch_add_send_to_vport_rule(esw, rep->vport,
						   sq->base.mqp.qpn);
	return mlx5_eswitch_add_send_to_vport_rule(esw, rep, sq->base.mqp.qpn);
}

static int mlx5r_rep_probe(struct auxiliary_device *adev,
+1 −2
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ static struct mlx5_roce *mlx5_get_rep_roce(struct mlx5_ib_dev *dev,
					   struct net_device *ndev,
					   u8 *port_num)
{
	struct mlx5_eswitch *esw = dev->mdev->priv.eswitch;
	struct net_device *rep_ndev;
	struct mlx5_ib_port *port;
	int i;
@@ -137,7 +136,7 @@ static struct mlx5_roce *mlx5_get_rep_roce(struct mlx5_ib_dev *dev,
			continue;

		read_lock(&port->roce.netdev_lock);
		rep_ndev = mlx5_ib_get_rep_netdev(esw,
		rep_ndev = mlx5_ib_get_rep_netdev(port->rep->esw,
						  port->rep->vport);
		if (rep_ndev == ndev) {
			read_unlock(&port->roce.netdev_lock);
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ int mlx5e_health_eq_diag_fmsg(struct mlx5_eq_comp *eq, struct devlink_fmsg *fmsg
	if (err)
		return err;

	err = devlink_fmsg_u32_pair_put(fmsg, "size", eq->core.nent);
	err = devlink_fmsg_u32_pair_put(fmsg, "size", eq_get_size(&eq->core));
	if (err)
		return err;

Loading