Merge tag 'mlx5-updates-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel...
authorDavid S. Miller <davem@davemloft.net>
Fri, 18 May 2018 17:00:08 +0000 (13:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 May 2018 17:00:08 +0000 (13:00 -0400)
Saeed Mahameed says:

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

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
include/linux/mlx5/mlx5_ifc.h

index 1dc24e3a0841b45fe77ac94dcd5ce3eb1413c4d6,1d2ba687b902ffd8a913be274b2cd6329de1c541..630dd6dcabb9554ea12a32a68ce5f0fe620c7b95
@@@ -2496,7 -2460,9 +2497,8 @@@ static int parse_tc_fdb_actions(struct 
        if (!tcf_exts_has_actions(exts))
                return -EINVAL;
  
 -      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) {
index 8dd0eca032027c67840b2e22a35713c6708ef6ed,6c83eef5141a94b8d10cb9e21e435f209ff7f9c0..b9ea464bcfa9afbbcf8f2d8aa4080cdab43ab619
@@@ -88,15 -93,19 +93,23 @@@ mlx5_eswitch_add_offloaded_rule(struct 
        misc = MLX5_ADDR_OF(fte_match_param, spec->match_value, misc_parameters);
        MLX5_SET(fte_match_set_misc, misc, source_port, attr->in_rep->vport);
  
+       if (MLX5_CAP_ESW(esw->dev, merged_eswitch))
+               MLX5_SET(fte_match_set_misc, misc,
+                        source_eswitch_owner_vhca_id,
+                        MLX5_CAP_GEN(attr->in_mdev, vhca_id));
        misc = MLX5_ADDR_OF(fte_match_param, spec->match_criteria, misc_parameters);
        MLX5_SET_TO_ONES(fte_match_set_misc, misc, source_port);
+       if (MLX5_CAP_ESW(esw->dev, merged_eswitch))
+               MLX5_SET_TO_ONES(fte_match_set_misc, misc,
+                                source_eswitch_owner_vhca_id);
  
 -      spec->match_criteria_enable = MLX5_MATCH_OUTER_HEADERS |
 -                                    MLX5_MATCH_MISC_PARAMETERS;
 +      if (attr->match_level == MLX5_MATCH_NONE)
 +              spec->match_criteria_enable = MLX5_MATCH_MISC_PARAMETERS;
 +      else
 +              spec->match_criteria_enable = MLX5_MATCH_OUTER_HEADERS |
 +                                            MLX5_MATCH_MISC_PARAMETERS;
 +
        if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_DECAP)
                spec->match_criteria_enable |= MLX5_MATCH_INNER_HEADERS;
  
Simple merge