Commit 7fecf0a1 authored by David S. Miller's avatar David S. Miller

Merge branch 'flow_offload-fix-CVLAN-support'

Edward Cree says:

====================
flow_offload: fix CVLAN support

When the flow_offload infrastructure was added, CVLAN matches weren't
 plumbed through, and flow_rule_match_vlan() was incorrectly called in
 the mlx5 driver when populating CVLAN match information.  This series
 adds flow_rule_match_cvlan(), and uses it in the mlx5 code.
Both patches should also go to 5.1 stable.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2407a88a 12d5cbf8
...@@ -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) {
......
...@@ -71,6 +71,8 @@ void flow_rule_match_eth_addrs(const struct flow_rule *rule, ...@@ -71,6 +71,8 @@ void flow_rule_match_eth_addrs(const struct flow_rule *rule,
struct flow_match_eth_addrs *out); struct flow_match_eth_addrs *out);
void flow_rule_match_vlan(const struct flow_rule *rule, void flow_rule_match_vlan(const struct flow_rule *rule,
struct flow_match_vlan *out); struct flow_match_vlan *out);
void flow_rule_match_cvlan(const struct flow_rule *rule,
struct flow_match_vlan *out);
void flow_rule_match_ipv4_addrs(const struct flow_rule *rule, void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
struct flow_match_ipv4_addrs *out); struct flow_match_ipv4_addrs *out);
void flow_rule_match_ipv6_addrs(const struct flow_rule *rule, void flow_rule_match_ipv6_addrs(const struct flow_rule *rule,
......
...@@ -54,6 +54,13 @@ void flow_rule_match_vlan(const struct flow_rule *rule, ...@@ -54,6 +54,13 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
} }
EXPORT_SYMBOL(flow_rule_match_vlan); EXPORT_SYMBOL(flow_rule_match_vlan);
void flow_rule_match_cvlan(const struct flow_rule *rule,
struct flow_match_vlan *out)
{
FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_CVLAN, out);
}
EXPORT_SYMBOL(flow_rule_match_cvlan);
void flow_rule_match_ipv4_addrs(const struct flow_rule *rule, void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
struct flow_match_ipv4_addrs *out) struct flow_match_ipv4_addrs *out)
{ {
......
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