Commit cff9b79e authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'mlx5-updates-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5-updates-2023-01-18

1) From Rahul,
  1.1) extended range for PTP adjtime and adjphase
  1.2) adjphase function to support hardware-only offset control

2) From Roi, code cleanup to the TC module.

3) From Maor, TC support for Geneve and GRE with VF tunnel offload

4) Cleanups and minor updates.

* tag 'mlx5-updates-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
  net/mlx5e: Use read lock for eswitch get callbacks
  net/mlx5e: Remove redundant allocation of spec in create indirect fwd group
  net/mlx5e: Support Geneve and GRE with VF tunnel offload
  net/mlx5: E-Switch, Fix typo for egress
  net/mlx5e: Warn when destroying mod hdr hash table that is not empty
  net/mlx5e: TC, Use common function allocating flow mod hdr or encap mod hdr
  net/mlx5e: TC, Add tc prefix to attach/detach hdr functions
  net/mlx5e: TC, Pass flow attr to attach/detach mod hdr functions
  net/mlx5e: Add warning when log WQE size is smaller than log stride size
  net/mlx5e: Fail with messages when params are not valid for XSK
  net/mlx5: E-switch, Remove redundant comment about meta rules
  net/mlx5: Add hardware extended range support for PTP adjtime and adjphase
  net/mlx5: Add adjphase function to support hardware-only offset control
  net/mlx5: Suppress error logging on UCTX creation
  net/mlx5e: Suppress Send WQEBB room warning for PAGE_SIZE >= 16KB
====================

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


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 1038bfb2 efb4879f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -813,7 +813,8 @@ static void cmd_status_print(struct mlx5_core_dev *dev, void *in, void *out)
	op_mod = MLX5_GET(mbox_in, in, op_mod);
	uid    = MLX5_GET(mbox_in, in, uid);

	if (!uid && opcode != MLX5_CMD_OP_DESTROY_MKEY)
	if (!uid && opcode != MLX5_CMD_OP_DESTROY_MKEY &&
	    opcode != MLX5_CMD_OP_CREATE_UCTX)
		mlx5_cmd_out_err(dev, opcode, op_mod, out);
}

+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ void mlx5e_mod_hdr_tbl_init(struct mod_hdr_tbl *tbl)

void mlx5e_mod_hdr_tbl_destroy(struct mod_hdr_tbl *tbl)
{
	WARN_ON(!hash_empty(tbl->hlist));
	mutex_destroy(&tbl->lock);
}

+14 −4
Original line number Diff line number Diff line
@@ -411,9 +411,14 @@ u8 mlx5e_mpwqe_get_log_num_strides(struct mlx5_core_dev *mdev,
{
	enum mlx5e_mpwrq_umr_mode umr_mode = mlx5e_mpwrq_umr_mode(mdev, xsk);
	u8 page_shift = mlx5e_mpwrq_page_shift(mdev, xsk);
	u8 log_wqe_size, log_stride_size;

	return mlx5e_mpwrq_log_wqe_sz(mdev, page_shift, umr_mode) -
		mlx5e_mpwqe_get_log_stride_size(mdev, params, xsk);
	log_wqe_size = mlx5e_mpwrq_log_wqe_sz(mdev, page_shift, umr_mode);
	log_stride_size = mlx5e_mpwqe_get_log_stride_size(mdev, params, xsk);
	WARN(log_wqe_size < log_stride_size,
	     "Log WQE size %u < log stride size %u (page shift %u, umr mode %d, xsk on? %d)\n",
	     log_wqe_size, log_stride_size, page_shift, umr_mode, !!xsk);
	return log_wqe_size - log_stride_size;
}

u8 mlx5e_mpwqe_get_min_wqe_bulk(unsigned int wq_sz)
@@ -581,11 +586,16 @@ int mlx5e_mpwrq_validate_xsk(struct mlx5_core_dev *mdev, struct mlx5e_params *pa
	bool unaligned = xsk ? xsk->unaligned : false;
	u16 max_mtu_pkts;

	if (!mlx5e_check_fragmented_striding_rq_cap(mdev, page_shift, umr_mode))
	if (!mlx5e_check_fragmented_striding_rq_cap(mdev, page_shift, umr_mode)) {
		mlx5_core_err(mdev, "Striding RQ for XSK can't be activated with page_shift %u and umr_mode %d\n",
			      page_shift, umr_mode);
		return -EOPNOTSUPP;
	}

	if (!mlx5e_rx_mpwqe_is_linear_skb(mdev, params, xsk))
	if (!mlx5e_rx_mpwqe_is_linear_skb(mdev, params, xsk)) {
		mlx5_core_err(mdev, "Striding RQ linear mode for XSK can't be activated with current params\n");
		return -EINVAL;
	}

	/* Current RQ length is too big for the given frame size, the
	 * needed number of WQEs exceeds the maximum.
+0 −2
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ struct mlx5e_tc_flow {
	 */
	struct encap_flow_item encaps[MLX5_MAX_FLOW_FWD_VPORTS];
	struct mlx5e_tc_flow *peer_flow;
	struct mlx5e_mod_hdr_handle *mh; /* attached mod header instance */
	struct mlx5e_mod_hdr_handle *slow_mh; /* attached mod header instance for slow path */
	struct mlx5e_hairpin_entry *hpe; /* attached hairpin instance */
	struct list_head hairpin; /* flows sharing the same hairpin */
	struct list_head peer;    /* flows with peer flow */
+0 −2
Original line number Diff line number Diff line
@@ -745,8 +745,6 @@ int mlx5e_tc_tun_route_lookup(struct mlx5e_priv *priv,
		if (err)
			goto out;

		esw_attr->rx_tun_attr->vni = MLX5_GET(fte_match_param, spec->match_value,
						      misc_parameters.vxlan_vni);
		esw_attr->rx_tun_attr->decap_vport = vport_num;
	} else if (netif_is_ovs_master(attr.route_dev) && mlx5e_tc_int_port_supported(esw)) {
		int_port = mlx5e_tc_int_port_get(mlx5e_get_int_port_priv(priv),
Loading