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=-1.0 required=3.0 tests=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 B22D4C43381 for ; Thu, 21 Feb 2019 15:23:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81E6F20661 for ; Thu, 21 Feb 2019 15:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728172AbfBUPX4 convert rfc822-to-8bit (ORCPT ); Thu, 21 Feb 2019 10:23:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727253AbfBUPX4 (ORCPT ); Thu, 21 Feb 2019 10:23:56 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F39B3002DA1; Thu, 21 Feb 2019 15:23:56 +0000 (UTC) Received: from carbon (ovpn-200-42.brq.redhat.com [10.40.200.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id F0A555C204; Thu, 21 Feb 2019 15:23:49 +0000 (UTC) Date: Thu, 21 Feb 2019 16:23:48 +0100 From: Jesper Dangaard Brouer To: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Cc: David Miller , netdev@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov , brouer@redhat.com Subject: Re: [PATCH net-next 2/2] xdp: Add devmap_idx map type for looking up devices by ifindex Message-ID: <20190221162348.51d739a0@carbon> In-Reply-To: <155075021407.13610.6656977312753058829.stgit@alrua-x1> References: <155075021399.13610.12521373406832889226.stgit@alrua-x1> <155075021407.13610.6656977312753058829.stgit@alrua-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 21 Feb 2019 15:23:56 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 21 Feb 2019 12:56:54 +0100 Toke Høiland-Jørgensen wrote: > The default maps used by xdp_redirect() are changed to use the new map > type, which means that xdp_redirect() is no longer limited to ifindex < 64, > but instead to 64 total simultaneous interfaces per network namespace. This > also provides an easy way to compare the performance of devmap and > devmap_idx: > > xdp_redirect_map (devmap): 8394560 pkt/s > xdp_redirect (devmap_idx): 8179480 pkt/s > > Difference: 215080 pkt/s or 3.1 nanoseconds per packet. (1/8394560-1/8179480)*10^9 = -3.13239 ns But was the xdp_redirect_map code-path affected from patch 1/1? (1/8412754-1/8394560)*10^9 = -0.2576 ns It doesn't look like any performance regression to xdp_redirect_map from these code changes :-) -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer