diff options
author | Boris Sukholitko <boris.sukholitko@broadcom.com> | 2021-06-21 12:24:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-22 00:46:36 +0300 |
commit | 6d5516177d3b723fe9701b89e69db18cf0ca0421 (patch) | |
tree | 293bdb66a14c193b45047d3b7d1400d2f815048a /net/sched | |
parent | ce03b94ba682a67e8233c9ee3066071656ded58f (diff) | |
download | linux-6d5516177d3b723fe9701b89e69db18cf0ca0421.tar.xz |
Revert "net/sched: cls_flower: Remove match on n_proto"
This reverts commit 0dca2c7404a938cb10c85d0515cee40ed5348788.
The commit in question breaks hardware offload of flower filters.
Quoting Vladimir Oltean <olteanv@gmail.com>:
fl_hw_replace_filter() and fl_reoffload() create a struct
flow_cls_offload with a rule->match.mask member derived from the mask
of the software classifier: &f->mask->key - that same mask that is used
for initializing the flow dissector keys, and the one from which Boris
removed the basic.n_proto member because it was bothering him.
Reported-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_flower.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 2e704c7a105a..d7869a984881 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -1531,13 +1531,14 @@ static int fl_set_key(struct net *net, struct nlattr **tb, &mask->basic.n_proto, TCA_FLOWER_UNSPEC, sizeof(key->basic.n_proto)); - mask->basic.n_proto = cpu_to_be16(0); } else { key->basic.n_proto = ethertype; + mask->basic.n_proto = cpu_to_be16(~0); } } } else { key->basic.n_proto = ethertype; + mask->basic.n_proto = cpu_to_be16(~0); } } |