netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question: ip forwarding and fq/mq qdisc
@ 2018-12-14 12:02 Sergey Matyukevich
  2018-12-14 13:06 ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Matyukevich @ 2018-12-14 12:02 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	sergey.matyukevich.os-P/7pdk10T0iB+jHODAdFcQ

Hi all,

I have been running 4.18-rc8 kernel with enabled IP forwarding between
wired and wireless interfaces, where both interfaces
were configured as fq qdisc.

However after moving to 4.20-rc1 kernel the same configuration does not
work anymore: pass-through packets are not forwarded in both directions.
Forwarding starts working again only if I change qdisc of _both_ interfaces
to anything but fq/mq. For instance any combination of pfifo/fq_codel/noqueue
works fine.

Does it look like a regression or it is a known change in behavior ?

Regards,
Sergey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question: ip forwarding and fq/mq qdisc
  2018-12-14 12:02 question: ip forwarding and fq/mq qdisc Sergey Matyukevich
@ 2018-12-14 13:06 ` Eric Dumazet
  2018-12-14 14:12   ` Sergey Matyukevich
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2018-12-14 13:06 UTC (permalink / raw)
  To: Sergey Matyukevich, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	sergey.matyukevich.os-P/7pdk10T0iB+jHODAdFcQ



On 12/14/2018 04:02 AM, Sergey Matyukevich wrote:
> Hi all,
> 
> I have been running 4.18-rc8 kernel with enabled IP forwarding between
> wired and wireless interfaces, where both interfaces
> were configured as fq qdisc.
> 
> However after moving to 4.20-rc1 kernel the same configuration does not
> work anymore: pass-through packets are not forwarded in both directions.
> Forwarding starts working again only if I change qdisc of _both_ interfaces
> to anything but fq/mq. For instance any combination of pfifo/fq_codel/noqueue
> works fine.
> 
> Does it look like a regression or it is a known change in behavior ?
> 
> Regards,
> Sergey
> 

Hi Sergey

I guess EDT model broke this use case.

I was under the impression skb->tstamp was cleared when forwarding packets, maybe I was wrong.

Can you try the following ?

diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 06ee4696703c0ce72ea914403b739839e60f1584..00ec819f949b5e76ea96be901a697f4e12d5cf4d 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -79,6 +79,7 @@ static int ip_forward_finish(struct net *net, struct sock *sk, struct sk_buff *s
        if (unlikely(opt->optlen))
                ip_forward_options(skb);
 
+       skb->tstamp = 0;
        return dst_output(net, sk, skb);
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: question: ip forwarding and fq/mq qdisc
  2018-12-14 13:06 ` Eric Dumazet
@ 2018-12-14 14:12   ` Sergey Matyukevich
  2018-12-14 14:21     ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Matyukevich @ 2018-12-14 14:12 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: netdev, linux-wireless, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	sergey.matyukevich.os

> > Hi all,
> > 
> > I have been running 4.18-rc8 kernel with enabled IP forwarding between
> > wired and wireless interfaces, where both interfaces
> > were configured as fq qdisc.
> > 
> > However after moving to 4.20-rc1 kernel the same configuration does not
> > work anymore: pass-through packets are not forwarded in both directions.
> > Forwarding starts working again only if I change qdisc of _both_ interfaces
> > to anything but fq/mq. For instance any combination of pfifo/fq_codel/noqueue
> > works fine.
> > 
> > Does it look like a regression or it is a known change in behavior ?
> > 
> > Regards,
> > Sergey
> > 
> 
> Hi Sergey
> 
> I guess EDT model broke this use case.
> 
> I was under the impression skb->tstamp was cleared when forwarding packets, maybe I was wrong.
> 
> Can you try the following ?
> 
> diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
> index 06ee4696703c0ce72ea914403b739839e60f1584..00ec819f949b5e76ea96be901a697f4e12d5cf4d 100644
> --- a/net/ipv4/ip_forward.c
> +++ b/net/ipv4/ip_forward.c
> @@ -79,6 +79,7 @@ static int ip_forward_finish(struct net *net, struct sock *sk, struct sk_buff *s
>         if (unlikely(opt->optlen))
>                 ip_forward_options(skb);
>  
> +       skb->tstamp = 0;
>         return dst_output(net, sk, skb);
>  }

Hi Eric,

This patch fixes the issue: ip forwarding works for fq/mq qdisc.

Thanks,
Sergey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question: ip forwarding and fq/mq qdisc
  2018-12-14 14:12   ` Sergey Matyukevich
@ 2018-12-14 14:21     ` Eric Dumazet
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2018-12-14 14:21 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: netdev, linux-wireless, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	sergey.matyukevich.os



On 12/14/2018 06:12 AM, Sergey Matyukevich wrote:

> Hi Eric,
> 
> This patch fixes the issue: ip forwarding works for fq/mq qdisc.
> 

Thanks for testing, I will send a formal patch for IPv4 and IPv6.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-14 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14 12:02 question: ip forwarding and fq/mq qdisc Sergey Matyukevich
2018-12-14 13:06 ` Eric Dumazet
2018-12-14 14:12   ` Sergey Matyukevich
2018-12-14 14:21     ` Eric Dumazet

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).