Revert "net/sched: cls_flower: Remove match on n_proto"
Subsystems (3)
PATCH 1/1 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 <[email protected]>:
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.
--- net/sched/cls_flower.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/sched/cls_flower.c +2 -1
@@ -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 ); } }
Signature · 1 line
2.29.3
Quoted 12 lines · Boris Sukholitko
This reverts commit
0dca2c7404a938cb10c85d0515cee40ed5348788.The commit in question breaks hardware offload of flower filters.
Quoting Vladimir Oltean <[email protected]>:
fl_hw_replace_filter()andfl_reoffload()create a structflow_cls_offloadwith arule->match.maskmember 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.
Quoted 3 lines
Reported-by Vadym Kochan <[email protected]>Signed-off-by Boris Sukholitko <[email protected]>---
Perhaps not the most relevant crop from the quote, but anyway:
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 6 lines · On Mon, 21 Jun 2021 12:24:29 +0300 you wrote:
This reverts commit
0dca2c7404a938cb10c85d0515cee40ed5348788.The commit in question breaks hardware offload of flower filters.
Quoting Vladimir Oltean <[email protected]>:
Quoted 7 lines
fl_hw_replace_filter()andfl_reoffload()create a structflow_cls_offloadwith arule->match.maskmember 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.[...]
Here is the summary with links:
- [net-next] Revert "net/sched: cls_flower: Remove match on n_proto"
https://git.kernel.org/netdev/net-next/c/6d5516177d3b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html