Commit 5facf497 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'mlx5-fixes-2022-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5 fixes 2022-02-22

This series provides bug fixes to mlx5 driver.
Please pull and let me know if there is any problem.

* tag 'mlx5-fixes-2022-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
  net/mlx5e: Fix VF min/max rate parameters interchange mistake
  net/mlx5e: Add missing increment of count
  net/mlx5e: MPLSoUDP decap, fix check for unsupported matches
  net/mlx5e: Fix MPLSoUDP encap to use MPLS action information
  net/mlx5e: Add feature check for set fec counters
  net/mlx5e: TC, Skip redundant ct clear actions
  net/mlx5e: TC, Reject rules with forward and drop actions
  net/mlx5e: TC, Reject rules with drop and modify hdr action
  net/mlx5e: kTLS, Use CHECKSUM_UNNECESSARY for device-offloaded packets
  net/mlx5e: Fix wrong return value on ioctl EEPROM query failure
  net/mlx5: Fix possible deadlock on rule deletion
  net/mlx5: Fix tc max supported prio for nic mode
  net/mlx5: Fix wrong limitation of metadata match on ecpf
  net/mlx5: Update log_max_qp value to be 17 at most
  net/mlx5: DR, Fix the threshold that defines when pool sync is initiated
  net/mlx5: DR, Don't allow match on IP w/o matching on full ethertype/ip_version
  net/mlx5: DR, Fix slab-out-of-bounds in mlx5_cmd_dr_create_fte
  net/mlx5: DR, Cache STE shadow memory
  net/mlx5: Update the list of the PCI supported devices
====================

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


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 0228d37b ca49df96
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,11 +16,13 @@ struct mlx5e_tc_act_parse_state {
	unsigned int num_actions;
	struct mlx5e_tc_flow *flow;
	struct netlink_ext_ack *extack;
	bool ct_clear;
	bool encap;
	bool decap;
	bool mpls_push;
	bool ptype_host;
	const struct ip_tunnel_info *tun_info;
	struct mlx5e_mpls_info mpls_info;
	struct pedit_headers_action hdrs[__PEDIT_CMD_MAX];
	int ifindexes[MLX5_MAX_FLOW_FWD_VPORTS];
	int if_count;
+7 −0
Original line number Diff line number Diff line
@@ -27,8 +27,13 @@ tc_act_parse_ct(struct mlx5e_tc_act_parse_state *parse_state,
		struct mlx5e_priv *priv,
		struct mlx5_flow_attr *attr)
{
	bool clear_action = act->ct.action & TCA_CT_ACT_CLEAR;
	int err;

	/* It's redundant to do ct clear more than once. */
	if (clear_action && parse_state->ct_clear)
		return 0;

	err = mlx5_tc_ct_parse_action(parse_state->ct_priv, attr,
				      &attr->parse_attr->mod_hdr_acts,
				      act, parse_state->extack);
@@ -40,6 +45,8 @@ tc_act_parse_ct(struct mlx5e_tc_act_parse_state *parse_state,
	if (mlx5e_is_eswitch_flow(parse_state->flow))
		attr->esw_attr->split_count = attr->esw_attr->out_count;

	parse_state->ct_clear = clear_action;

	return 0;
}

+6 −0
Original line number Diff line number Diff line
@@ -177,6 +177,12 @@ parse_mirred_encap(struct mlx5e_tc_act_parse_state *parse_state,
		return -ENOMEM;

	parse_state->encap = false;

	if (parse_state->mpls_push) {
		memcpy(&parse_attr->mpls_info[esw_attr->out_count],
		       &parse_state->mpls_info, sizeof(parse_state->mpls_info));
		parse_state->mpls_push = false;
	}
	esw_attr->dests[esw_attr->out_count].flags |= MLX5_ESW_DEST_ENCAP;
	esw_attr->out_count++;
	/* attr->dests[].rep is resolved when we handle encap */
+11 −0
Original line number Diff line number Diff line
@@ -22,6 +22,16 @@ tc_act_can_offload_mpls_push(struct mlx5e_tc_act_parse_state *parse_state,
	return true;
}

static void
copy_mpls_info(struct mlx5e_mpls_info *mpls_info,
	       const struct flow_action_entry *act)
{
	mpls_info->label = act->mpls_push.label;
	mpls_info->tc = act->mpls_push.tc;
	mpls_info->bos = act->mpls_push.bos;
	mpls_info->ttl = act->mpls_push.ttl;
}

static int
tc_act_parse_mpls_push(struct mlx5e_tc_act_parse_state *parse_state,
		       const struct flow_action_entry *act,
@@ -29,6 +39,7 @@ tc_act_parse_mpls_push(struct mlx5e_tc_act_parse_state *parse_state,
		       struct mlx5_flow_attr *attr)
{
	parse_state->mpls_push = true;
	copy_mpls_info(&parse_state->mpls_info, act);

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ enum {

struct mlx5e_tc_flow_parse_attr {
	const struct ip_tunnel_info *tun_info[MLX5_MAX_FLOW_FWD_VPORTS];
	struct mlx5e_mpls_info mpls_info[MLX5_MAX_FLOW_FWD_VPORTS];
	struct net_device *filter_dev;
	struct mlx5_flow_spec spec;
	struct mlx5e_tc_mod_hdr_acts mod_hdr_acts;
Loading