Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp58557ybt; Tue, 23 Jun 2020 15:15:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJUxe6U01Hjk3bjuuhwM9m0kjSq7ruYSZUWeiHTE9eZ4gMwQvuDeosDx4UPmgsuLfisyk7 X-Received: by 2002:a17:906:2e55:: with SMTP id r21mr21444253eji.338.1592950515490; Tue, 23 Jun 2020 15:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592950515; cv=none; d=google.com; s=arc-20160816; b=VX52LYiQ64kqihA3GtOzFF3kfkEzkeeAMnfX291E8Yr2wQQTWkHnwJEjDW644y6viS u9RRTObRX9e0WzaAPIRVUjILFeosERVDXBMeHztnieWGqP0Yu13lLH38Z+npCdYAlb2T kL6lj4vT/6zr/hV1InJa35NgTtYnA6HA1/igj4k8+KcvSp/3lr7JgaKLTPDxOla7i60P 8QOV1ci0OhNq6spjZMFXS8KR4w6bQl+3lEvuu6KCnN3MmK07WIUH8Bqk7zP8evTz3fSs lMh6LSkv24SYrMaqN6v1RvxDfJrQNOS4JvrfN2ouctKs5blq2TibhaycPLoKzcEbrG1K AljA== 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:from:subject:cc:to:message-id:date; bh=WvCticZ5C7PE3xQPCiqPoHUme260DyFbN7D9AHHr09I=; b=lHVetA3fArM8Fm6yK3c18twwWVQ9BhJcVqHfuLBr1AIryXOHdCLylrtOJGdrCVlZ2V lEjOIDt7KUBg8zWe21/MW7kvA4kAIGTn0Ba2dIPYUZ1wgzfzaFDcynlnmCiyevUR5Sja TbFaiD5viP5nbHgCb08sXprCrThKVx5AofXsCsuYjOreYslqHeidNbqKU8ngluW6pRbF rR3dAbhcdb3Iamir1WHNN0YveAyHFKfWzJAweUPZ2Euz8TfoxVm83n3VZGKZGgc3vjyx v466N5/XdyiKvbigPE2yDZ7I0bu/25keXCuM1FRtV92dtSdJ6Br20kSQ23X2j/Z0vTFm j5cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si14055199edj.163.2020.06.23.15.14.52; Tue, 23 Jun 2020 15:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390204AbgFWWLr (ORCPT + 99 others); Tue, 23 Jun 2020 18:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388955AbgFWWLq (ORCPT ); Tue, 23 Jun 2020 18:11:46 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66973C061573; Tue, 23 Jun 2020 15:11:46 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E0D0B1294AFBF; Tue, 23 Jun 2020 15:11:45 -0700 (PDT) Date: Tue, 23 Jun 2020 15:11:45 -0700 (PDT) Message-Id: <20200623.151145.1336624346097080182.davem@davemloft.net> To: brianvv@google.com Cc: brianvv.kernel@gmail.com, edumazet@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, lrizzo@google.com, pabeni@redhat.com Subject: Re: [PATCH v2 net-next 2/2] ipv6: fib6: avoid indirect calls from fib6_rule_lookup From: David Miller In-Reply-To: <20200623164232.175846-2-brianvv@google.com> References: <20200623164232.175846-1-brianvv@google.com> <20200623164232.175846-2-brianvv@google.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 23 Jun 2020 15:11:46 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brian Vazquez Date: Tue, 23 Jun 2020 09:42:32 -0700 > It was reported that a considerable amount of cycles were spent on the > expensive indirect calls on fib6_rule_lookup. This patch introduces an > inline helper called pol_route_func that uses the indirect_call_wrappers > to avoid the indirect calls. > > This patch saves around 50ns per call. > > Performance was measured on the receiver by checking the amount of > syncookies that server was able to generate under a synflood load. > > Traffic was generated using trafgen[1] which was pushing around 1Mpps on > a single queue. Receiver was using only one rx queue which help to > create a bottle neck and make the experiment rx-bounded. > > These are the syncookies generated over 10s from the different runs: > > Whithout the patch: ... > With the patch: ... > Without the patch the average is 354263 pkt/s or 2822 ns/pkt and with > the patch the average is 360738 pkt/s or 2772 ns/pkt which gives an > estimate of 50 ns per packet. > > [1] http://netsniff-ng.org/ > > Changelog since v1: > - Change ordering in the ICW (Paolo Abeni) > > Cc: Luigi Rizzo > Cc: Paolo Abeni > Reported-by: Eric Dumazet > Signed-off-by: Brian Vazquez Applied.