Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c62091bc authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

Merge tag 'mlx5-updates-2018-05-17' of...

Merge tag 'mlx5-updates-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into for-next

mlx5-updates-2018-05-17

mlx5 core dirver updates for both net-next and rdma-next branches.

From Christophe JAILLET, first three patche to use kvfree where needed.

From: Or Gerlitz <ogerlitz@mellanox.com>

Next six patches from Roi and Co adds support for merged
sriov e-switch which comes to serve cases where both PFs, VFs set
on them and both uplinks are to be used in single v-switch SW model.
When merged e-switch is supported, the per-port e-switch is logically
merged into one e-switch that spans both physical ports and all the VFs.

This model allows to offload TC eswitch rules between VFs belonging
to different PFs (and hence have different eswitch affinity), it also
sets the some of the foundations needed for uplink LAG support.

* tag 'mlx5-updates-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux:
  net/mlx5e: Explicitly set source e-switch in offloaded TC rules
  net/mlx5: Add source e-switch owner
  net/mlx5e: Explicitly set destination e-switch in FDB rules
  net/mlx5: Add destination e-switch owner
  net/mlx5: Properly handle a vport destination when setting FTE
  net/mlx5: Add merged e-switch cap
  IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'
  net/mlx5: Eswitch, Use 'kvfree()' for memory allocated by 'kvzalloc()'
  net/mlx5: Vport, Use 'kvfree()' for memory allocated by 'kvzalloc()'
parents 724631a9 10ff5359
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -858,7 +858,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata,
	return 0;

err_cqb:
	kfree(*cqb);
	kvfree(*cqb);

err_db:
	mlx5_ib_db_unmap_user(to_mucontext(context), &cq->db);
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ const char *parse_fs_dst(struct trace_seq *p,

	switch (dst->type) {
	case MLX5_FLOW_DESTINATION_TYPE_VPORT:
		trace_seq_printf(p, "vport=%u\n", dst->vport_num);
		trace_seq_printf(p, "vport=%u\n", dst->vport.num);
		break;
	case MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE:
		trace_seq_printf(p, "ft=%p\n", dst->ft);
+3 −0
Original line number Diff line number Diff line
@@ -836,6 +836,7 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
		out_priv = netdev_priv(encap_dev);
		rpriv = out_priv->ppriv;
		attr->out_rep = rpriv->rep;
		attr->out_mdev = out_priv->mdev;
	}

	err = mlx5_eswitch_add_vlan_action(esw, attr);
@@ -2461,6 +2462,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,

	memset(attr, 0, sizeof(*attr));
	attr->in_rep = rpriv->rep;
	attr->in_mdev = priv->mdev;

	tcf_exts_to_list(exts, &actions);
	list_for_each_entry(a, &actions, list) {
@@ -2501,6 +2503,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
				out_priv = netdev_priv(out_dev);
				rpriv = out_priv->ppriv;
				attr->out_rep = rpriv->rep;
				attr->out_mdev = out_priv->mdev;
			} else if (encap) {
				parse_attr->mirred_ifindex = out_dev->ifindex;
				parse_attr->tun_info = *info;
+1 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u32 vport, bool rx_rule,
	}

	dest.type = MLX5_FLOW_DESTINATION_TYPE_VPORT;
	dest.vport_num = vport;
	dest.vport.num = vport;

	esw_debug(esw->dev,
		  "\tFDB add rule dmac_v(%pM) dmac_c(%pM) -> vport(%d)\n",
+2 −0
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ enum {
struct mlx5_esw_flow_attr {
	struct mlx5_eswitch_rep *in_rep;
	struct mlx5_eswitch_rep *out_rep;
	struct mlx5_core_dev	*out_mdev;
	struct mlx5_core_dev	*in_mdev;

	int	action;
	__be16	vlan_proto;
Loading