* [PATCH net-next] Revert "net/sched: cls_flower: Remove match on n_proto"
@ 2021-06-21 9:24 Boris Sukholitko
2021-06-21 10:11 ` Vladimir Oltean
2021-06-21 21:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Boris Sukholitko @ 2021-06-21 9:24 UTC (permalink / raw)
To: netdev, Jamal Hadi Salim, Jiri Pirko, Cong Wang
Cc: David S . Miller, Jakub Kicinski, Vladimir Oltean, Vadym Kochan,
Ilya Lifshits, Boris Sukholitko
[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]
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>
---
net/sched/cls_flower.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
}
--
2.29.3
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] Revert "net/sched: cls_flower: Remove match on n_proto"
2021-06-21 9:24 [PATCH net-next] Revert "net/sched: cls_flower: Remove match on n_proto" Boris Sukholitko
@ 2021-06-21 10:11 ` Vladimir Oltean
2021-06-21 21:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Oltean @ 2021-06-21 10:11 UTC (permalink / raw)
To: Boris Sukholitko
Cc: netdev, Jamal Hadi Salim, Jiri Pirko, Cong Wang,
David S . Miller, Jakub Kicinski, Vadym Kochan, Ilya Lifshits
On Mon, Jun 21, 2021 at 12:24:29PM +0300, Boris Sukholitko wrote:
> 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>
> ---
Perhaps not the most relevant crop from the quote, but anyway:
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] Revert "net/sched: cls_flower: Remove match on n_proto"
2021-06-21 9:24 [PATCH net-next] Revert "net/sched: cls_flower: Remove match on n_proto" Boris Sukholitko
2021-06-21 10:11 ` Vladimir Oltean
@ 2021-06-21 21:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-21 21:50 UTC (permalink / raw)
To: Boris Sukholitko
Cc: netdev, jhs, jiri, xiyou.wangcong, davem, kuba, olteanv,
vadym.kochan, ilya.lifshits
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
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 <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.
>
> [...]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-21 21:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 9:24 [PATCH net-next] Revert "net/sched: cls_flower: Remove match on n_proto" Boris Sukholitko
2021-06-21 10:11 ` Vladimir Oltean
2021-06-21 21:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.