Received: by 10.213.65.68 with SMTP id h4csp1677394imn; Sun, 1 Apr 2018 11:53:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+0VGmOqsY2dUuuQM4+knQl13PRra+QQ3eswLyu2eHcKFkOoB0bQTsNH4ZaoszY1Nq1sgs7 X-Received: by 10.98.246.25 with SMTP id x25mr5249371pfh.138.1522608780941; Sun, 01 Apr 2018 11:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522608780; cv=none; d=google.com; s=arc-20160816; b=v3PYWN3n7Tw/MiDeC5y22Y8jTYf4HGissT+ngqI9oEgmaSAzY9IrpqVLzLkCOQWBrA efdQ1ouSRIM6To9eWbIeSxo8W9S7dHlH3rsIESJtVfjSANWbezmgWThNLvnPH9JTV+Dp +XAtdjEsCSUeZ9TovUGF8UexOpxq8xC044Mg14OYiaeQRw/3ljdk0+RoM/MEphphKdLo Jr0l/d1PF5gqHEsGEj42I2SJX68qem0v4h3EUR3N0al/dg6uO7nFZrwT3gcWmGj2jwIf kFx82oKMCFAiilC4kjL9jiUojoHPixNLdYqsKpMHO6Heb90nr0M7cpm5dvFFiRQFsLIX UwYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=GpMqpa/DPHSBueWjhK+BXNIkWnNQaYxUOynF/l+18jA=; b=hEu7zc8KCc6LQdxQsSWcyLfyz3L/TC41bYJzEZCM9t9jkxAPz2+zBPxQkgr8Snt0tu Yq6M65B+uR2gCiwnBtHetWLEMdmJetdhdxGjTC+dlnc4KIZYW6yp2xgHypByJsiuXldz 6oAuotBOGiYhNgFcu6B/8O58yRLZAC7rLeqFPjTiPYBBdwEFcU/xvsQcfSf5kgQ3yLrg R+YTdIOxNiP9AJetCRzSah5NYL2Egd66XSXMM5fDwNBiomoh45HlftwKCHJhDXsEanpn 7RHO6hmgZ6IDbs0lAUczKdOYkMnxsNDjpPd4Z3X4OSJDOUywh6JjW7id0rPIhMoqqtba 1DlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=MS4lofIT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si9472487pfe.306.2018.04.01.11.52.34; Sun, 01 Apr 2018 11:53:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=MS4lofIT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753858AbeDASut (ORCPT + 99 others); Sun, 1 Apr 2018 14:50:49 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34749 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbeDASur (ORCPT ); Sun, 1 Apr 2018 14:50:47 -0400 Received: by mail-pf0-f195.google.com with SMTP id q9so8123443pff.1 for ; Sun, 01 Apr 2018 11:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GpMqpa/DPHSBueWjhK+BXNIkWnNQaYxUOynF/l+18jA=; b=MS4lofITXY+8ue81DauZpINZIeDHrG2D2XB5mVSpQ/XaITrEB8/J6zO+Hh8TiELmTm PlAxWQBK1ajcVjQ4wzAgnLVYGbXO9EU1A6a8rigRsNKaXX9zT3wCd4nKqO2hcei3Lwj6 pFI67Mwkx9FEesKSQkQAI8xOTSFVmUCuZlq4aYGA/t/Fibged/m9yW80adsuT4kaJJRJ mmxkv+X+hCMR66KzjE6ivvaa/ga2Cs+HcJps+2YI8AkcXr4EqXgs3W5lW+C0RapbjTso YLh8tV1JRbQsYW19j2OeMTHfocbkjQCyZc2+/M7y7IhO6Zb+QcTLBpCZAHitylEf7VqN OQ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GpMqpa/DPHSBueWjhK+BXNIkWnNQaYxUOynF/l+18jA=; b=B62+kWRTjEEsrXrmuj6LJeNVYkgIXYFXCwF4g1/zt2jhBqIv3YRWcOiG3OE8aHO/kS 0wK6tjlpWhFpEqdgnlh3/On7XhothjBP0Hpu3D+jEDkgStjKafKqTg7Lf8JetQvjU5t9 zCJsvs/ey8Zc69UTDG1jL5noSU1h9adnXXm8WTzqas3Ed8uC9+gFQGufkf/pQJJlQEHl 5RVlVW67UZHRKW+d9WKqnWKZ0yLMLOQPBNKHk/kQ8p5cpEuwiJl2I1Ii7QgkwSjYoOSo MoGEh4ZZoYkGu5GbKmWMKrOXaqU1rqUKJFSc/GEWGCQ+Q6BYaxuhhRy+AsthTEd38FbV 5CVw== X-Gm-Message-State: AElRT7HAQPSYu0vYKOAhv9TCJG1xfNEYMT+N/3mhGNN1eZRW6AkJireI 3DYB591o2nxCWxuJZxf9fzyDlg== X-Received: by 10.98.93.149 with SMTP id n21mr5264361pfj.222.1522608647033; Sun, 01 Apr 2018 11:50:47 -0700 (PDT) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id a65sm29281183pfg.170.2018.04.01.11.50.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Apr 2018 11:50:46 -0700 (PDT) Date: Sun, 1 Apr 2018 11:50:44 -0700 From: Stephen Hemminger To: Anton Gary Ceph Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: improve ipv4 performances Message-ID: <20180401115044.17f7ccb4@xeon-e3> In-Reply-To: <20180401183121.13022-1-agaceph@gmail.com> References: <20180401183121.13022-1-agaceph@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 1 Apr 2018 20:31:21 +0200 Anton Gary Ceph wrote: > As the Linux networking stack is growing, more and more protocols are > added, increasing the complexity of stack itself. > Modern processors, contrary to common belief, are very bad in branch > prediction, so it's our task to give hints to the compiler when possible. > > After a few profiling and analysis, turned out that the ethertype field > of the packets has the following distribution: > > 92.1% ETH_P_IP > 3.2% ETH_P_ARP > 2.7% ETH_P_8021Q > 1.4% ETH_P_PPP_SES > 0.6% don't know/no opinion > > From a projection on statistics collected by Google about IPv6 adoption[1], > IPv6 should peak at 25% usage at the beginning of 2030. Hence, we should > give proper hints to the compiler about the low IPv6 usage. > > Here is an iperf3 run before and after the patch: > > Before: > [ ID] Interval Transfer Bandwidth Retr > [ 4] 0.00-100.00 sec 100 GBytes 8.60 Gbits/sec 0 sender > [ 4] 0.00-100.00 sec 100 GBytes 8.60 Gbits/sec receiver > > After > [ ID] Interval Transfer Bandwidth Retr > [ 4] 0.00-100.00 sec 109 GBytes 9.35 Gbits/sec 0 sender > [ 4] 0.00-100.00 sec 109 GBytes 9.35 Gbits/sec receiver > > [1] https://www.google.com/intl/en/ipv6/statistics.html > > Signed-off-by: Anton Gary Ceph I am surprised it makes that much of an impact. It would be easier to manage future bisection if the big patch was split into several pieces. Bridge, bonding, netfilter, etc. There doesn't appear to be any direct cross dependencies.