Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1286935ybi; Thu, 30 May 2019 14:58:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxi/iAjeQw8WhrRbUhVEVXm/7GdcI+6rD4RfiGF8HuirLA4+A736OR/CdyXr0OQLw4c8TA X-Received: by 2002:a62:2703:: with SMTP id n3mr5894390pfn.199.1559253515156; Thu, 30 May 2019 14:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559253515; cv=none; d=google.com; s=arc-20160816; b=mqDZdydSvk4RVgpnovEON5zwh9CHnWFlcIkBzX4hTPJSr+8AxUBh5de35z8ifwBM4f Rx6XkE1Mo1RkVwrFnY0CvEbBcLeeAwLW5aA/12PoULXUK5Fv/J+E4YQGat9Ri0BpJDkU TgfpvgEVqJ+E7qzEiAuzJeaRtZCWkhZUAUbfvsEynVBvt0aRPyTdFvD4r2E8Faw9uqQo Bl3bI5TDOAY5kF97ebWU5YBlH5eR0R17otKKAEbXv8EVr7yNqAL0yxoDrcmh5u+V6v6G rdWOzT6l0J1mjm9WhTn+GNa4/09wwzCO4mWGjuSS2c1DJB33VYQiCQSKys43UoKIWWMg 52uQ== 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=x+hXRp6lJXEHxXlw5NVqC5oEQlUldL0Qkm1n2EMT9ck=; b=jqaWMjN3o5bnns2HEm0FacVH+NZeCC8HIfjScpFDgEFO/VgKRFd8nJnkhoW+wplxzE o6Pl5rtcHhTDBD9kCCbAGOeJ7LD8CxO1YJUGPdZMIZVcX7KxoGWmhjUrGvlpcbJajw32 1c7zpwENCr6KbqLJ+ZMsiMgO3COv9MbW7Hfb6diCXJrboPowU/K3rHzcbeypfr9P924M OTY2P0AYZ2avJ+UeGI6r/IY13sbROL+Uh/WU1+ixIrhVfK8iDE4FopeJl26DnTRRgR++ k+kfVrlC30u9UDUVv9hix70EcKjOuuK8cWzDZoqtavQ63ozKcGHFm424jXmXpcV9srEE XLxQ== ARC-Authentication-Results: i=1; mx.google.com; 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 c103si319463pje.10.2019.05.30.14.58.19; Thu, 30 May 2019 14:58:35 -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; 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 S1726749AbfE3Vxv (ORCPT + 99 others); Thu, 30 May 2019 17:53:51 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:60834 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbfE3Vxu (ORCPT ); Thu, 30 May 2019 17:53:50 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::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 B069C14DB1C74; Thu, 30 May 2019 14:34:45 -0700 (PDT) Date: Thu, 30 May 2019 14:34:45 -0700 (PDT) Message-Id: <20190530.143445.293369224441787273.davem@davemloft.net> To: mcroce@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2] net: avoid indirect calls in L4 checksum calculation From: David Miller In-Reply-To: <20190529151348.31311-1-mcroce@redhat.com> References: <20190529151348.31311-1-mcroce@redhat.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Thu, 30 May 2019 14:34:45 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matteo Croce Date: Wed, 29 May 2019 17:13:48 +0200 > Commit 283c16a2dfd3 ("indirect call wrappers: helpers to speed-up > indirect calls of builtin") introduces some macros to avoid doing > indirect calls. > > Use these helpers to remove two indirect calls in the L4 checksum > calculation for devices which don't have hardware support for it. > > As a test I generate packets with pktgen out to a dummy interface > with HW checksumming disabled, to have the checksum calculated in > every sent packet. > The packet rate measured with an i7-6700K CPU and a single pktgen > thread raised from 6143 to 6608 Kpps, an increase by 7.5% > > Suggested-by: Davide Caratti > Signed-off-by: Matteo Croce Applied.