Commit 12d5cbf8 authored by Jianbo Liu's avatar Jianbo Liu Committed by David S. Miller

net/mlx5e: Fix calling wrong function to get inner vlan key and mask

When flow_rule_match_XYZ() functions were first introduced,
flow_rule_match_cvlan() for inner vlan is missing.

In mlx5_core driver, to get inner vlan key and mask, flow_rule_match_vlan()
is just called, which is wrong because it obtains outer vlan information by
FLOW_DISSECTOR_KEY_VLAN.

This commit fixes this by changing to call flow_rule_match_cvlan() after
it's added.

Fixes: 8f256622 ("flow_offload: add flow_rule and flow_match structures and use them")
Signed-off-by: default avatarJianbo Liu <jianbol@mellanox.com>
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bae9ed69
...@@ -1595,7 +1595,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv, ...@@ -1595,7 +1595,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) { if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) {
struct flow_match_vlan match; struct flow_match_vlan match;
flow_rule_match_vlan(rule, &match); flow_rule_match_cvlan(rule, &match);
if (match.mask->vlan_id || if (match.mask->vlan_id ||
match.mask->vlan_priority || match.mask->vlan_priority ||
match.mask->vlan_tpid) { match.mask->vlan_tpid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment