* [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones
@ 2022-02-17 9:30 Paul Blakey
2022-02-17 23:09 ` Marcelo Ricardo Leitner
2022-02-18 11:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Paul Blakey @ 2022-02-17 9:30 UTC (permalink / raw)
To: Paul Blakey, dev, netdev, Jamal Hadi Salim, davem, Jiri Pirko,
Cong Wang, Jakub Kicinski
Cc: Oz Shlomo, Vlad Buslov, Roi Dayan, Ariel Levkovich
Flow table lookup is skipped if packet either went through ct clear
action (which set the IP_CT_UNTRACKED flag on the packet), or while
switching zones and there is already a connection associated with
the packet. This will result in no SW offload of the connection,
and the and connection not being removed from flow table with
TCP teardown (fin/rst packet).
To fix the above, remove these unneccary checks in flow
table lookup.
Fixes: 46475bb20f4b ("net/sched: act_ct: Software offload of established flows")
Signed-off-by: Paul Blakey <paulb@nvidia.com>
---
net/sched/act_ct.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index f99247fc6468..33e70d60f0bf 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -533,11 +533,6 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p,
struct nf_conn *ct;
u8 dir;
- /* Previously seen or loopback */
- ct = nf_ct_get(skb, &ctinfo);
- if ((ct && !nf_ct_is_template(ct)) || ctinfo == IP_CT_UNTRACKED)
- return false;
-
switch (family) {
case NFPROTO_IPV4:
if (!tcf_ct_flow_table_fill_tuple_ipv4(skb, &tuple, &tcph))
--
2.30.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones
2022-02-17 9:30 [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones Paul Blakey
@ 2022-02-17 23:09 ` Marcelo Ricardo Leitner
2022-02-18 11:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Ricardo Leitner @ 2022-02-17 23:09 UTC (permalink / raw)
To: Paul Blakey
Cc: dev, netdev, Jamal Hadi Salim, davem, Jiri Pirko, Cong Wang,
Jakub Kicinski, Oz Shlomo, Vlad Buslov, Roi Dayan,
Ariel Levkovich
On Thu, Feb 17, 2022 at 11:30:48AM +0200, Paul Blakey wrote:
> Flow table lookup is skipped if packet either went through ct clear
> action (which set the IP_CT_UNTRACKED flag on the packet), or while
> switching zones and there is already a connection associated with
> the packet. This will result in no SW offload of the connection,
> and the and connection not being removed from flow table with
> TCP teardown (fin/rst packet).
>
> To fix the above, remove these unneccary checks in flow
> table lookup.
>
> Fixes: 46475bb20f4b ("net/sched: act_ct: Software offload of established flows")
> Signed-off-by: Paul Blakey <paulb@nvidia.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones
2022-02-17 9:30 [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones Paul Blakey
2022-02-17 23:09 ` Marcelo Ricardo Leitner
@ 2022-02-18 11:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-18 11:10 UTC (permalink / raw)
To: Paul Blakey
Cc: dev, netdev, jhs, davem, jiri, xiyou.wangcong, kuba, ozsh, vladbu,
roid, lariel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 17 Feb 2022 11:30:48 +0200 you wrote:
> Flow table lookup is skipped if packet either went through ct clear
> action (which set the IP_CT_UNTRACKED flag on the packet), or while
> switching zones and there is already a connection associated with
> the packet. This will result in no SW offload of the connection,
> and the and connection not being removed from flow table with
> TCP teardown (fin/rst packet).
>
> [...]
Here is the summary with links:
- [net,1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones
https://git.kernel.org/netdev/net/c/2f131de361f6
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:[~2022-02-18 11:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 9:30 [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup after ct clear or switching zones Paul Blakey
2022-02-17 23:09 ` Marcelo Ricardo Leitner
2022-02-18 11:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).