Merge tag 'mlx5-updates-2019-04-02' of git://git.kernel.org/pub/scm/linux/kernel...
authorDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 21:31:25 +0000 (14:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 21:31:25 +0000 (14:31 -0700)
Saeed Mamameed says:

====================
mlx5-updates-2019-04-02

This series provides misc updates to mlx5 driver

1) Aya Levin (1): Handle event of power detection in the PCIE slot

2) Eli Britstein (6):
  Some TC VLAN related updates and fixes to the previous VLAN modify action
  support patchset.
  Offload TC e-switch rules with egress/ingress VLAN devices

3) Max Gurtovoy (1): Fix double mutex initialization in esiwtch.c

4) Tariq Toukan (3): Misc small updates
  A write memory barrier is sufficient in EQ ci update
  Obsolete param field holding a constant value
  Unify logic of MTU boundaries

5) Tonghao Zhang (4): Misc updates to en_tc.c
  Make the log friendly when decapsulation offload not supported
  Remove 'parse_attr' argument in parse_tc_fdb_actions()
  Deletes unnecessary setting of esw_attr->parse_attr
  Return -EOPNOTSUPP when attempting to offload an unsupported action
====================

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_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h

index ffc4a36551c836ef78928fdf5cae98007b4d1c13,ff9756c3dee515c0b69e7b9d26786590fceda619..a2070817a6271f72257ae5ed4f83cce47864edeb
@@@ -2214,16 -2268,12 +2314,12 @@@ static bool modify_header_match_support
  {
        const struct flow_action_entry *act;
        bool modify_ip_header;
 -      u8 htype, ip_proto;
        void *headers_v;
        u16 ethertype;
 +      u8 ip_proto;
        int i;
  
-       if (actions & MLX5_FLOW_CONTEXT_ACTION_DECAP)
-               headers_v = MLX5_ADDR_OF(fte_match_param, spec->match_value, inner_headers);
-       else
-               headers_v = MLX5_ADDR_OF(fte_match_param, spec->match_value, outer_headers);
+       headers_v = get_match_headers_value(actions, spec);
        ethertype = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ethertype);
  
        /* for non-IP we only re-write MACs, so we're okay */
@@@ -2771,10 -2894,20 +2948,20 @@@ static int parse_tc_fdb_actions(struct 
  
        if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits ||
            hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) {
 -              err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL,
 +              err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB,
-                                           parse_attr, hdrs, extack);
+                                           parse_attr, hdrs, &action, extack);
                if (err)
                        return err;
+               /* in case all pedit actions are skipped, remove the MOD_HDR
+                * flag. we might have set split_count either by pedit or
+                * pop/push. if there is no pop/push either, reset it too.
+                */
+               if (parse_attr->num_mod_hdr_actions == 0) {
+                       action &= ~MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
+                       if (!((action & MLX5_FLOW_CONTEXT_ACTION_VLAN_POP) ||
+                             (action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH)))
+                               attr->split_count = 0;
+               }
        }
  
        attr->action = action;
Simple merge