From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FROM_EXCESS_BASE64, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF6ACC4360F for ; Thu, 4 Apr 2019 20:22:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FEF7206B7 for ; Thu, 4 Apr 2019 20:22:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UgwRH2qA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729457AbfDDUWG (ORCPT ); Thu, 4 Apr 2019 16:22:06 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:36004 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfDDUWG (ORCPT ); Thu, 4 Apr 2019 16:22:06 -0400 Received: by mail-ed1-f67.google.com with SMTP id s16so3470440edr.3 for ; Thu, 04 Apr 2019 13:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=x3gcDuSKwlu0si8VGXiSTO2O82qOLRsxAtBJS1cwU74=; b=UgwRH2qA59nZO1KRb3AOLemrrJbAF+8w4TMO7/mOoSra30gEdp56J5fF83RA5D6dCB mRL9T3Q5UzAfz4qjoOaO49Qv0ShIJCXdO9epi9npshch6qIxN+tejxkCAU+tGU/s2bIB 0yrTmleOBd9Bb9A4CV8JGrJJMrUBqbROYrYxL5IGiexzRd6XzyuLWIdka4MHehiuBUeR XRfLA3R4i6RKSZE1cxBOIleJjw7IXjQCj3rUCZ9YBG3P2X2Mk8sIQFd8p2CTJb4IrYCC 1PatKvkNjYA5wHLhLi/Z4/zHxk9J6rKF3+oI/hwLq39pAhOfiEpKpsmluQPBZS22l9X6 llhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=x3gcDuSKwlu0si8VGXiSTO2O82qOLRsxAtBJS1cwU74=; b=MJKLA3SBJnvXZAHV1+Kxe3+4UTDxKEnBc5FS94gQ5XMoE+gKDv7AaD3hyEg6gtfJBq YW3BQFC4+CspQvgyfw6bTAE65CB8HNjG9v5WK2S2G/tmUrmTBKHtz/VHRAsfLWg01+0M Cu2ssH8JsomyCj9RvZMMeIyuuYmhQMdr4kz/xT/1KHLWhlTgEhQ36irwbd4rZ09+gLE5 PT/dQ69yq7RtdgcZnWoWEh7Y8V4c5dQ1B56Wv5UAstURzoLdQiUECz7jLQ318F6slTtt aDBkRfJDjAIxKIf5q7pSoCbkD0mqvKhch+9GNVtZ4v5UYJN0gNvHpXEIE1aIZLLp70QX 249g== X-Gm-Message-State: APjAAAXQHVCgElN+WsYSE52C8sXbpYOB0DDCIQ7I+lSYoJuR34ZDYatk bt7Jx8sak78Ew3DRJkchFUE= X-Google-Smtp-Source: APXvYqxnsx3pAvjkBWD+2p8RSVurzZXqQB097ptn+WVoSgIHMGfrQNp2qS7hZF2pV3hggyQdU8UU8w== X-Received: by 2002:aa7:d710:: with SMTP id t16mr5220379edq.222.1554409324528; Thu, 04 Apr 2019 13:22:04 -0700 (PDT) Received: from elitebook.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.googlemail.com with ESMTPSA id z39sm5876963edz.26.2019.04.04.13.22.02 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 13:22:03 -0700 (PDT) Subject: Re: NAT performance regression caused by vlan GRO support To: Toshiaki Makita Cc: netdev@vger.kernel.org, "David S. Miller" , Toshiaki Makita , Stefano Brivio , Sabrina Dubroca , David Ahern , Felix Fietkau , Jo-Philipp Wich , Koen Vandeputte References: <73223229-6bc0-2647-6952-975961811866@gmail.com> <75961408-fd62-0f12-bd4b-79008b27576c@gmail.com> From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Message-ID: <53588a9f-8cc8-0ee5-0947-8ab2b2e56f15@gmail.com> Date: Thu, 4 Apr 2019 22:22:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <75961408-fd62-0f12-bd4b-79008b27576c@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 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%. >> >> My hardware is BCM47094 SoC (dual core ARM) with integrated network controller >> and external BCM53012 switch. >> >> Relevant setup: >> * SoC network controller is wired to the hardware switch >> * Switch passes 802.1q frames with VID 1 to four LAN ports >> * Switch passes 802.1q frames with VID 2 to WAN port >> * Linux does NAT for LAN (eth0.1) to WAN (eth0.2) >> * Linux uses pfifo and "echo 2 > rps_cpus" >> * Ryzen 5 PRO 2500U (x86_64) laptop connected to a LAN port >> * Intel i7-2670QM laptop connected to a WAN port >> * Speed of LAN to WAN measured using iperf & TCP over 10 minutes >> >> 1) 5.1.0-rc3 >> [  6]  0.0-600.0 sec  39.9 GBytes   572 Mbits/sec >> >> 2) 5.1.0-rc3 + rtcache patch >> [  6]  0.0-600.0 sec  40.0 GBytes   572 Mbits/sec >> >> 3) 5.1.0-rc3 + disable GRO support >> [  6]  0.0-300.4 sec  27.5 GBytes   786 Mbits/sec >> >> 4) 5.1.0-rc3 + rtcache patch + disable GRO support >> [  6]  0.0-600.0 sec  65.6 GBytes   939 Mbits/sec > > Did you test it with disabling GRO by ethtool -K? Oh, I didn't know about such possibility! I just tested: 1) Kernel with GRO support left in place (no local patch disabling it) 2) ethtool -K eth0 gro off and it bumped my NAT performance from 576 Mb/s to 939 Mb/s. I can reliably break/fix NAT performance by just calling ethtool -K eth0 gro on/off. > Is this the result with your reverting patch? Previous results were coming from kernel with patched vlan_offload_init() - see diff at the end of my first e-mail. > It's late night in Japan so I think I will try to reproduce it tomorrow. Thank you!