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 27C13C43381 for ; Thu, 21 Feb 2019 15:50:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F283920823 for ; Thu, 21 Feb 2019 15:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728337AbfBUPuQ convert rfc822-to-8bit (ORCPT ); Thu, 21 Feb 2019 10:50:16 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45664 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728157AbfBUPuQ (ORCPT ); Thu, 21 Feb 2019 10:50:16 -0500 Received: by mail-ed1-f68.google.com with SMTP id d9so23499097edh.12 for ; Thu, 21 Feb 2019 07:50:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=ij5STFgY3+HeDsvAC/XtLUOoYA+/tTVic6Pd2Vzmuxk=; b=CyU75uLxcByaRgeS4kv1o0biuv6C4ahFCF7UdDXiTRpYLJoaDft6THQv8yrl/jtseh +co57R97Pix626VuIuKuXfvXExDJW+zvlGLdD3dZmlOREYGPb9GfoQ2M018lPElKD0UK 3d8jTJ/VvosU+cf4ogB5lUoxxecv06IOdB/zaTxv2VBkjL78bD1RaX6NaC7s6N1YN6R0 ObEuGEaJEAosa9IkI+7Z0cTCy4m7uwKJIWowK47YtiAAhRNlAR3wMabOqbcOepZQweid PYfMEdVyrGEpYAGkWzOrKJIsx1Sm8QjhNJf7uEl4761Ie6fMCQB2SXtHruGhWFiwQkkE Jm5w== X-Gm-Message-State: AHQUAuYmlupiBFO0St3rGs+Nz5jBsa6jqmIuowJ3KLXf4elAnZElre6F qaXawWln8Nyu3fZ4Qi1ORWSkUyknxefNeA== X-Google-Smtp-Source: AHgI3IZCV8uxZr5SPl9ozTh/MichK2qRJ7zpLXN9DdB+zYP1QIQGcOH+ueRq8MC7OqTA/ovhDCqmng== X-Received: by 2002:a50:90b0:: with SMTP id c45mr4594604eda.44.1550764214689; Thu, 21 Feb 2019 07:50:14 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk (alrua-x1.vpn.toke.dk. [2a00:7660:6da:10::2]) by smtp.gmail.com with ESMTPSA id l53sm542067eda.66.2019.02.21.07.50.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Feb 2019 07:50:13 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 57B361803B8; Thu, 21 Feb 2019 16:50:13 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Jesper Dangaard Brouer 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 In-Reply-To: <20190221162348.51d739a0@carbon> References: <155075021399.13610.12521373406832889226.stgit@alrua-x1> <155075021407.13610.6656977312753058829.stgit@alrua-x1> <20190221162348.51d739a0@carbon> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 21 Feb 2019 16:50:13 +0100 Message-ID: <87o975i1je.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jesper Dangaard Brouer writes: > 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 :-) Nope, the difference between the two patches is just random noise; the numbers vary more between runs (or even between samples in the same run), which is why I didn't mention that difference. -Toke