From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f172.google.com (mail-ua0-f172.google.com [209.85.217.172]) by dpdk.org (Postfix) with ESMTP id 14180FBA8 for ; Thu, 22 Dec 2016 14:36:23 +0100 (CET) Received: by mail-ua0-f172.google.com with SMTP id 2so107346376uax.2 for ; Thu, 22 Dec 2016 05:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uibDV7ZCbLMlyJbs0bM7Y1QaFOmni8TNDY9Mz5vRSUA=; b=QIITl2NpqrBUwcyHCY3Ljod+IkKWTEaTOJccEku6t+SH1vQ0puyGd1DRm18VcCJ2HK S4e4AUH5e1AW1kqQMD0irfesViUYrdeYdA30nx5PM69SyrIDZxy9tOKm066CH+i6tGPP kETAslaWupmPOe3uRgg4ufhEEFkJEjPXQTYdOE0mPdvewAXBvwODjIpVIGNjHTNuQIZ+ auocu011VqRzQrG0vR+vNPx3XUlUkmRsluRc0vE8rfQ7eN/3anNFVJBx7rcK+OSxQ24l Q0ujkPcEsrqzjjGv07fOYtE+bKdV4W0L+wZTSd8NEwn7ToTse27cYsCtAW/FoRmsFkCI NLiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uibDV7ZCbLMlyJbs0bM7Y1QaFOmni8TNDY9Mz5vRSUA=; b=CmIUSEFnjbcGlrJgEgSRabXTBSHqySwGXXxHFAzgBZObsZwkb9ZZBXCdfZ7ULHaHsQ rjSSbEUiCni/fUBl/kW7n+LUxTk3nzML2X4/H4dhJT8Dm02ZQIZkfpV6gS4mDbNmLYoa vJU6/0Z2k2P5lj4OjUJKXNW9eewLDK183xwOzlnTQfoCVSstezkMe+xGc7OcMl0sMgvx sy94gdCSnBcjmPyJLAPYE8ajfK7t+F71UNV8HFDbi6dmwUVNxTacw60od2lObBJyrh/Q vl3giXNLiRq/RDNL3OEwKHwlUxKTgTO5ps1K/C29pr29vCgi3wqGdfuC0et8K+jHACJI N8JQ== X-Gm-Message-State: AIkVDXL5apoqhvJgLE/V+QCNl8hKtj7SF8zg10d/7TqYEeV7Vxv7sc8hp7nWzzmHRSNkxw== X-Received: by 10.176.5.69 with SMTP id 63mr6093125uax.71.1482413782094; Thu, 22 Dec 2016 05:36:22 -0800 (PST) Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com. [209.85.217.170]) by smtp.gmail.com with ESMTPSA id c124sm8309169vkh.17.2016.12.22.05.36.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2016 05:36:21 -0800 (PST) Received: by mail-ua0-f170.google.com with SMTP id 2so107345351uax.2 for ; Thu, 22 Dec 2016 05:36:20 -0800 (PST) X-Received: by 10.159.32.99 with SMTP id 90mr6365019uam.138.1482413780056; Thu, 22 Dec 2016 05:36:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.33.147 with HTTP; Thu, 22 Dec 2016 05:36:19 -0800 (PST) In-Reply-To: <20161222132542.GA44940@bricha3-MOBL3.ger.corp.intel.com> References: <20161222111528.GA11104@bricha3-MOBL3.ger.corp.intel.com> <20161222132542.GA44940@bricha3-MOBL3.ger.corp.intel.com> From: Royce Niu Date: Thu, 22 Dec 2016 21:36:19 +0800 X-Gmail-Original-Message-ID: Message-ID: To: Bruce Richardson Cc: Royce Niu , dev@dpdk.org, cristian.dumitrescu@intel.com Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Why IP_PIPELINE is faster than L2FWD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2016 13:36:23 -0000 Dear Bruce, Thanks for your kind explanation. I will try to follow your suggestion and see the source code. On Thu, Dec 22, 2016 at 9:25 PM, Bruce Richardson < bruce.richardson@intel.com> wrote: > On Thu, Dec 22, 2016 at 08:48:50PM +0800, Royce Niu wrote: > > But, actually, L3FWD of IP_PIPELINE is also faster than stock L2FWD, > which > > also modifies mac addr. How can explain this? > > > > Actually, I want to know why IP_PIPELINE is much faster and I can learn > > from IP_PIPELINE and make our own program. > > > > But, the documentation of that is not detailed enough. if it is possible, > > could you tell me where is the key to boost? Thanks! > > > > Adding Cristian as IP Pipeline maintainer. > > A lot of tuning work went into IP Pipeline and the table and port > libraries it uses, so I'm not sure that there is just one or two key > changes which give it such good performance. L2 forward just hasn't had > the same level of tuning and, while performing well, is also simplified > to make it understandable as an example. Contrast the code in l2fwd > against equivalent vector code in l3fwd-lpm* files e.g. l3fwd_lpm_sse.h. > The latter is very high performing, the former is more readable. > > Regards, > /Bruce > > > On Thu, Dec 22, 2016 at 7:15 PM, Bruce Richardson < > > bruce.richardson@intel.com> wrote: > > > > > On Thu, Dec 22, 2016 at 12:18:12AM +0800, Royce Niu wrote: > > > > Hi all, > > > > > > > > I tested default L2FWD and IP_PIPELINE (pass-through). The > throughput of > > > > IP_PIPELINE is higher immensely. > > > > > > > > There are only two virtual NICs in KVM. The experiment is just moving > > > > packet from vNIC0 to vNIC1. I think the function is so simple. Why > L2FWD > > > > is much slower? > > > > > > > > How can I improve L2FWD, to make L2FWD faster? > > > > > > > Is IP_PIPELINE in passthrough mode modifying the packets? L2FWD swaps > > > the mac addresses on each packet as it processes them, which can slow > it > > > down. L2FWD is also more an example of how the APIs work than anything > > > else. For fastest possible port-to-port forwarding, testpmd should give > > > the highest performance. > > > > > > /Bruce > > > > > > > > > > > -- > > Regards, > > > > Royce > -- Regards, Royce