net/mlx5e: Use correct flow dissector key on flower offloading
authorHadar Hen Zion <hadarh@mellanox.com>
Thu, 18 Aug 2016 18:09:07 +0000 (21:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 23:09:56 +0000 (16:09 -0700)
The wrong key is used when extracting the address type field set by
the flower offload code. We have to use the control key and not the
basic key, fix that.

Fixes: e3a2b7ed018e ('net/mlx5e: Support offload cls_flower with drop action')
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index dc8b1cb0fdc8562b8564b78a324321bd479f80c4..22cfc4ac1837500cc9fb5a2fa6062d77f49550aa 100644 (file)
@@ -170,7 +170,7 @@ static int parse_cls_flower(struct mlx5e_priv *priv, struct mlx5_flow_spec *spec
        if (dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_CONTROL)) {
                struct flow_dissector_key_control *key =
                        skb_flow_dissector_target(f->dissector,
-                                                 FLOW_DISSECTOR_KEY_BASIC,
+                                                 FLOW_DISSECTOR_KEY_CONTROL,
                                                  f->key);
                addr_type = key->addr_type;
        }