RE: NAT performance regression caused by vlan GRO support

2019-04-08 Thread David Laight
From: Rafal Milecki > Sent: 07 April 2019 12:55 ... > If not, maybe w really need to think about some good & clever condition for > disabling GRO by default on hw without checksum offloading. Maybe GRO could assume the checksums are valid so the checksum would only be verified when the packet is d

Re: NAT performance regression caused by vlan GRO support

2019-04-07 Thread Rafał Miłecki
Now I have some questions regarding possible optimizations. Note I'm too familiar with the net subsystem so maybe I got wrong ideas. On 07.04.2019 13:53, Rafał Miłecki wrote: On 04.04.2019 14:57, Rafał Miłecki wrote: Long story short, starting with the commit 66e5133f19e9 ("vlan: Add GRO suppor

Re: NAT performance regression caused by vlan GRO support

2019-04-07 Thread Rafał Miłecki
On 04.04.2019 14:57, Rafał Miłecki wrote: Long story short, starting with the commit 66e5133f19e9 ("vlan: Add GRO support for non hardware accelerated vlan") - which first hit kernel 4.2 - NAT performance of my router dropped by 30% - 40%. I'll try to provide some summary for this issue. I'll f

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Eric Dumazet
On 04/05/2019 03:51 AM, Florian Westphal wrote: > Toke Høiland-Jørgensen wrote: >> As a first approximation, maybe just: >> >> if (!has_hardware_cksum_offload(netdev) && link_rate(netdev) <= 1Gbps) >> disable_gro(); > > I don't think its a good idea. For local delivery case, there is no > w

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Florian Westphal
Toke Høiland-Jørgensen wrote: > As a first approximation, maybe just: > > if (!has_hardware_cksum_offload(netdev) && link_rate(netdev) <= 1Gbps) > disable_gro(); I don't think its a good idea. For local delivery case, there is no way to avoid the checksum cost, so might as well have GRO enabl

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Toke Høiland-Jørgensen
Toshiaki Makita writes: > On 2019/04/05 16:14, Felix Fietkau wrote: >> On 2019-04-05 09:11, Rafał Miłecki wrote: >>> On 05.04.2019 07:48, Rafał Miłecki wrote: On 05.04.2019 06:26, Toshiaki Makita wrote: > My test results: > > Receiving packets from eth0.10, forwarding them to eth

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Rafał Miłecki
On 05.04.2019 10:12, Rafał Miłecki wrote: On 05.04.2019 09:58, Toshiaki Makita wrote: On 2019/04/05 16:14, Felix Fietkau wrote: On 2019-04-05 09:11, Rafał Miłecki wrote: I guess its GRO + csum_partial() to be blamed for this performance drop. Maybe csum_partial() is very fast on your powerful

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Rafał Miłecki
On 05.04.2019 09:58, Toshiaki Makita wrote: On 2019/04/05 16:14, Felix Fietkau wrote: On 2019-04-05 09:11, Rafał Miłecki wrote: I guess its GRO + csum_partial() to be blamed for this performance drop. Maybe csum_partial() is very fast on your powerful machine and few extra calls don't make a d

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Toshiaki Makita
On 2019/04/05 16:14, Felix Fietkau wrote: > On 2019-04-05 09:11, Rafał Miłecki wrote: >> On 05.04.2019 07:48, Rafał Miłecki wrote: >>> On 05.04.2019 06:26, Toshiaki Makita wrote: My test results: Receiving packets from eth0.10, forwarding them to eth0.20 and applying MASQUERADE

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Rafał Miłecki
On 05.04.2019 07:48, Rafał Miłecki wrote: On 05.04.2019 06:26, Toshiaki Makita wrote: My test results: Receiving packets from eth0.10, forwarding them to eth0.20 and applying MASQUERADE on eth0.20, using i40e 25G NIC on kernel 4.20.13. Disabled rxvlan by ethtool -K to exercise vlan_gro_receive(

Re: NAT performance regression caused by vlan GRO support

2019-04-05 Thread Felix Fietkau
On 2019-04-05 09:11, Rafał Miłecki wrote: > On 05.04.2019 07:48, Rafał Miłecki wrote: >> On 05.04.2019 06:26, Toshiaki Makita wrote: >>> My test results: >>> >>> Receiving packets from eth0.10, forwarding them to eth0.20 and applying >>> MASQUERADE on eth0.20, using i40e 25G NIC on kernel 4.20.13.

Re: NAT performance regression caused by vlan GRO support

2019-04-04 Thread Rafał Miłecki
On 05.04.2019 06:26, Toshiaki Makita wrote: On 2019/04/05 5:22, Rafał Miłecki wrote: On 04.04.2019 17:17, Toshiaki Makita wrote: On 19/04/04 (木) 21:57:15, Rafał Miłecki wrote: I'd like to report a regression that goes back to the 2015. I know it's damn late, but the good thing is, the regressi

Re: NAT performance regression caused by vlan GRO support

2019-04-04 Thread Toshiaki Makita
On 2019/04/05 5:22, Rafał Miłecki wrote: > On 04.04.2019 17:17, Toshiaki Makita wrote: >> On 19/04/04 (木) 21:57:15, Rafał Miłecki wrote: >>> I'd like to report a regression that goes back to the 2015. I know >>> it's damn >>> late, but the good thing is, the regression is still easy to >>> reproduc

Re: NAT performance regression caused by vlan GRO support

2019-04-04 Thread Rafał Miłecki
On 04.04.2019 17:17, Toshiaki Makita wrote: On 19/04/04 (木) 21:57:15, Rafał Miłecki wrote: I'd like to report a regression that goes back to the 2015. I know it's damn late, but the good thing is, the regression is still easy to reproduce, verify & revert. Long story short, starting with the co

Re: NAT performance regression caused by vlan GRO support

2019-04-04 Thread Toshiaki Makita
Hi Rafał, On 19/04/04 (木) 21:57:15, Rafał Miłecki wrote: Hello, I'd like to report a regression that goes back to the 2015. I know it's damn late, but the good thing is, the regression is still easy to reproduce, verify & revert. Long story short, starting with the commit 66e5133f19e9 ("vla

NAT performance regression caused by vlan GRO support

2019-04-04 Thread Rafał Miłecki
Hello, I'd like to report a regression that goes back to the 2015. I know it's damn late, but the good thing is, the regression is still easy to reproduce, verify & revert. Long story short, starting with the commit 66e5133f19e9 ("vlan: Add GRO support for non hardware accelerated vlan") - which