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=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 6BF9AC4321A for ; Fri, 28 Jun 2019 13:04:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A5C920645 for ; Fri, 28 Jun 2019 13:04:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726750AbfF1NEn (ORCPT ); Fri, 28 Jun 2019 09:04:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58810 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726566AbfF1NEn (ORCPT ); Fri, 28 Jun 2019 09:04:43 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D28FF87630; Fri, 28 Jun 2019 13:04:42 +0000 (UTC) Received: from carbon (ovpn-200-45.brq.redhat.com [10.40.200.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48B335D704; Fri, 28 Jun 2019 13:04:35 +0000 (UTC) Date: Fri, 28 Jun 2019 15:04:34 +0200 From: Jesper Dangaard Brouer To: Ilias Apalodimas Cc: netdev@vger.kernel.org, jaswinder.singh@linaro.org, ard.biesheuvel@linaro.org, bjorn.topel@intel.com, magnus.karlsson@intel.com, daniel@iogearbox.net, ast@kernel.org, makita.toshiaki@lab.ntt.co.jp, jakub.kicinski@netronome.com, john.fastabend@gmail.com, davem@davemloft.net, maciejromanfijalkowski@gmail.com, brouer@redhat.com Subject: Re: [PATCH 1/3, net-next] net: netsec: Use page_pool API Message-ID: <20190628150434.30da8852@carbon> In-Reply-To: <1561718355-13919-2-git-send-email-ilias.apalodimas@linaro.org> References: <1561718355-13919-1-git-send-email-ilias.apalodimas@linaro.org> <1561718355-13919-2-git-send-email-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 28 Jun 2019 13:04:43 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 28 Jun 2019 13:39:13 +0300 Ilias Apalodimas wrote: > Use page_pool and it's DMA mapping capabilities for Rx buffers instead > of netdev/napi_alloc_frag() > > Although this will result in a slight performance penalty on small sized > packets (~10%) the use of the API will allow to easily add XDP support. > The penalty won't be visible in network testing i.e ipef/netperf etc, it > only happens during raw packet drops. > Furthermore we intend to add recycling capabilities on the API > in the future. Once the recycling is added the performance penalty will > go away. > The only 'real' penalty is the slightly increased memory usage, since we > now allocate a page per packet instead of the amount of bytes we need + > skb metadata (difference is roughly 2kb per packet). > With a minimum of 4BG of RAM on the only SoC that has this NIC the > extra memory usage is negligible (a bit more on 64K pages) > > Signed-off-by: Ilias Apalodimas > --- > drivers/net/ethernet/socionext/Kconfig | 1 + > drivers/net/ethernet/socionext/netsec.c | 121 +++++++++++++++--------- > 2 files changed, 75 insertions(+), 47 deletions(-) Acked-by: Jesper Dangaard Brouer -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer