]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:09:24 +0000 (10:09 +0200)
[ Upstream commit 1dbd0d373ac338903d27fab5204b13122cc5accd ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 704c3d30493e8218a13a1a1c0ebb4eac7885f9c0..0db51cc3949bd11d4ec626b3a540e1aae5f4e76c 100644 (file)
@@ -150,7 +150,7 @@ static int parse_cls_flower(struct mlx5e_priv *priv,
        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;
        }