* [net-next] net: fib_rules: do not flow dissect local packets
@ 2019-07-05 18:46 Petar Penkov
2019-07-08 23:12 ` David Miller
2019-07-11 21:23 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Petar Penkov @ 2019-07-05 18:46 UTC (permalink / raw)
To: netdev; +Cc: davem, roopa, edumazet, Petar Penkov
Rules matching on loopback iif do not need early flow dissection as the
packet originates from the host. Stop counting such rules in
fib_rule_requires_fldissect
Signed-off-by: Petar Penkov <ppenkov@google.com>
---
include/net/fib_rules.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index eba8465e1d86..20dcadd8eed9 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -180,9 +180,9 @@ static inline bool fib_rule_port_range_compare(struct fib_rule_port_range *a,
static inline bool fib_rule_requires_fldissect(struct fib_rule *rule)
{
- return rule->ip_proto ||
+ return rule->iifindex != LOOPBACK_IFINDEX && (rule->ip_proto ||
fib_rule_port_range_set(&rule->sport_range) ||
- fib_rule_port_range_set(&rule->dport_range);
+ fib_rule_port_range_set(&rule->dport_range));
}
struct fib_rules_ops *fib_rules_register(const struct fib_rules_ops *,
--
2.22.0.410.gd8fdbe21b5-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next] net: fib_rules: do not flow dissect local packets
2019-07-05 18:46 [net-next] net: fib_rules: do not flow dissect local packets Petar Penkov
@ 2019-07-08 23:12 ` David Miller
2019-07-12 4:13 ` Roopa Prabhu
2019-07-11 21:23 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2019-07-08 23:12 UTC (permalink / raw)
To: ppenkov; +Cc: netdev, roopa, edumazet
From: Petar Penkov <ppenkov@google.com>
Date: Fri, 5 Jul 2019 11:46:43 -0700
> Rules matching on loopback iif do not need early flow dissection as the
> packet originates from the host. Stop counting such rules in
> fib_rule_requires_fldissect
>
> Signed-off-by: Petar Penkov <ppenkov@google.com>
Roopa, please review.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next] net: fib_rules: do not flow dissect local packets
2019-07-05 18:46 [net-next] net: fib_rules: do not flow dissect local packets Petar Penkov
2019-07-08 23:12 ` David Miller
@ 2019-07-11 21:23 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-07-11 21:23 UTC (permalink / raw)
To: ppenkov; +Cc: netdev, roopa, edumazet
From: Petar Penkov <ppenkov@google.com>
Date: Fri, 5 Jul 2019 11:46:43 -0700
> Rules matching on loopback iif do not need early flow dissection as the
> packet originates from the host. Stop counting such rules in
> fib_rule_requires_fldissect
>
> Signed-off-by: Petar Penkov <ppenkov@google.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next] net: fib_rules: do not flow dissect local packets
2019-07-08 23:12 ` David Miller
@ 2019-07-12 4:13 ` Roopa Prabhu
0 siblings, 0 replies; 4+ messages in thread
From: Roopa Prabhu @ 2019-07-12 4:13 UTC (permalink / raw)
To: David Miller; +Cc: ppenkov, netdev, Eric Dumazet
On Mon, Jul 8, 2019 at 4:12 PM David Miller <davem@davemloft.net> wrote:
>
> From: Petar Penkov <ppenkov@google.com>
> Date: Fri, 5 Jul 2019 11:46:43 -0700
>
> > Rules matching on loopback iif do not need early flow dissection as the
> > packet originates from the host. Stop counting such rules in
> > fib_rule_requires_fldissect
> >
> > Signed-off-by: Petar Penkov <ppenkov@google.com>
>
> Roopa, please review.
sorry about the delay. I was traveling the last few days.
looks ok to me. thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-12 4:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 18:46 [net-next] net: fib_rules: do not flow dissect local packets Petar Penkov
2019-07-08 23:12 ` David Miller
2019-07-12 4:13 ` Roopa Prabhu
2019-07-11 21:23 ` David Miller
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).